(* Content-type: application/mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 6.0' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 145, 7] NotebookDataLength[ 84283, 2332] NotebookOptionsPosition[ 76292, 2074] NotebookOutlinePosition[ 77440, 2113] CellTagsIndexPosition[ 77186, 2104] WindowFrame->Generic ContainsDynamic->True *) (* Beginning of Notebook Content *) Notebook[{ Cell[BoxData[ RowBox[{"ClearAll", "[", RowBox[{ "\"\\"", ",", "\"\\"", ",", "\"\\""}], "]"}]], "Input", CellChangeTimes->{{3.418303708417405*^9, 3.41830372627236*^9}, { 3.418307415084172*^9, 3.418307453184601*^9}, {3.418356919871125*^9, 3.418356930836427*^9}, 3.419205578213283*^9}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"SetDirectory", "[", RowBox[{"NotebookDirectory", "[", "]"}], "]"}]], "Input", CellChangeTimes->{{3.418303082417898*^9, 3.418303097006797*^9}}], Cell[BoxData["\<\"/home/tmcd/0enskog/mathematica\"\>"], "Output", CellChangeTimes->{3.4192080304452*^9, 3.419216615375023*^9}] }, Open ]], Cell[BoxData[ RowBox[{"<<", "\"\\""}]], "Input", CellChangeTimes->{{3.419069645420698*^9, 3.419069646377679*^9}, 3.419204333861201*^9, 3.419205578317134*^9}], Cell[BoxData[ RowBox[{"<<", "\"\\""}]], "Input", CellChangeTimes->{{3.418303066433944*^9, 3.41830306664642*^9}, { 3.418303106926804*^9, 3.418303113767158*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"ResetDirectory", "[", "]"}], ";"}]], "Input", CellChangeTimes->{{3.418323958846006*^9, 3.418323960172372*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"?", "shorg"}]], "Input", CellChangeTimes->{{3.418307322114145*^9, 3.418307339212991*^9}, 3.418323302946087*^9, 3.418323381000443*^9, 3.418323452906091*^9, 3.418374599104985*^9}], Cell[BoxData[ StyleBox["\<\"g = shorg[x]\\nReturns the gradient of Shor's piece-wise \ quadratic function\\n at a point .\"\>", "MSG"]], "Print", "PrintUsage", CellChangeTimes->{3.419216616225483*^9}, CellTags->"Info3419220215-8367318"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"?", "SolvOpt`*"}]], "Input", CellChangeTimes->{{3.418506545048979*^9, 3.418506568842465*^9}, { 3.418507099908001*^9, 3.418507137907312*^9}, {3.419205778912236*^9, 3.419205782711811*^9}}], Cell[CellGroupData[{ Cell[BoxData[ DynamicModuleBox[{Typeset`open$$ = True}, PaneSelectorBox[{False-> RowBox[{ OpenerBox[Dynamic[Typeset`open$$], ImageSize->Small], StyleBox["SolvOpt`", "InfoHeading"]}], True->GridBox[{ { RowBox[{ OpenerBox[Dynamic[Typeset`open$$], ImageSize->Small], StyleBox["SolvOpt`", "InfoHeading"]}]}, {GridBox[{ { ButtonBox["Action", BaseStyle->"InformationLink", ButtonData:>{"Info3419220216-1894353", "SolvOpt`Action"}, ButtonNote->"SolvOpt`"], ButtonBox["ConstraintResidual", BaseStyle->"InformationLink", ButtonData:>{ "Info3419220216-1894353", "SolvOpt`ConstraintResidual"}, ButtonNote->"SolvOpt`"], ButtonBox["MinimumGradientStep", BaseStyle->"InformationLink", ButtonData:>{ "Info3419220216-1894353", "SolvOpt`MinimumGradientStep"}, ButtonNote->"SolvOpt`"], ButtonBox["RelativeErrorF", BaseStyle->"InformationLink", ButtonData:>{"Info3419220216-1894353", "SolvOpt`RelativeErrorF"}, ButtonNote->"SolvOpt`"], ButtonBox["SolvOpt", BaseStyle->"InformationLink", ButtonData:>{"Info3419220216-1894353", "SolvOpt`SolvOpt"}, ButtonNote->"SolvOpt`"]}, { ButtonBox["ConstraintGradient", BaseStyle->"InformationLink", ButtonData:>{ "Info3419220216-1894353", "SolvOpt`ConstraintGradient"}, ButtonNote->"SolvOpt`"], ButtonBox["MaximalResidual", BaseStyle->"InformationLink", ButtonData:>{"Info3419220216-1894353", "SolvOpt`MaximalResidual"}, ButtonNote->"SolvOpt`"], ButtonBox["PrintLevel", BaseStyle->"InformationLink", ButtonData:>{"Info3419220216-1894353", "SolvOpt`PrintLevel"}, ButtonNote->"SolvOpt`"], ButtonBox["RelativeErrorX", BaseStyle->"InformationLink", ButtonData:>{"Info3419220216-1894353", "SolvOpt`RelativeErrorX"}, ButtonNote->"SolvOpt`"], ButtonBox["SpaceDilation", BaseStyle->"InformationLink", ButtonData:>{"Info3419220216-1894353", "SolvOpt`SpaceDilation"}, ButtonNote->"SolvOpt`"]} }, DefaultBaseStyle->"InfoGrid", GridBoxItemSize->{"Columns" -> {{ Scaled[0.19]}}}]} }, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}]}, Dynamic[Typeset`open$$], ImageSize->Automatic]]], "Print", "InfoCell", CellChangeTimes->{3.419216616609639*^9}], Cell[BoxData[ StyleBox["\<\"{Minimize|Maximize,H} where H is a factor for the first trial \ step size.\\nMaximize is valid only for an unconstrained problem.\"\>", "MSG"]], "Print", "PrintUsage", CellTags->"Info3419220216-1894353"], Cell[BoxData[ DynamicModuleBox[{Typeset`open$$ = True}, PaneSelectorBox[{False-> RowBox[{ OpenerBox[Dynamic[Typeset`open$$], ImageSize->Small], StyleBox["SolvOpt`", "InfoHeading"]}], True->GridBox[{ { RowBox[{ OpenerBox[Dynamic[Typeset`open$$], ImageSize->Small], StyleBox["SolvOpt`", "InfoHeading"]}]}, {GridBox[{ { ButtonBox["Action", BaseStyle->"InformationLink", ButtonData:>{"Info3419211630-1118324", "SolvOpt`Action"}, ButtonNote->"SolvOpt`"], ButtonBox["ConstraintResidual", BaseStyle->"InformationLink", ButtonData:>{ "Info3419211630-1118324", "SolvOpt`ConstraintResidual"}, ButtonNote->"SolvOpt`"], ButtonBox["MaximalResidual", BaseStyle->"InformationLink", ButtonData:>{"Info3419211630-1118324", "SolvOpt`MaximalResidual"}, ButtonNote->"SolvOpt`"], ButtonBox["RelativeErrorF", BaseStyle->"InformationLink", ButtonData:>{"Info3419211630-1118324", "SolvOpt`RelativeErrorF"}, ButtonNote->"SolvOpt`"], ButtonBox["SolvOpt", BaseStyle->"InformationLink", ButtonData:>{"Info3419211630-1118324", "SolvOpt`SolvOpt"}, ButtonNote->"SolvOpt`"]}, { ButtonBox["ConstraintGradient", BaseStyle->"InformationLink", ButtonData:>{ "Info3419211630-1118324", "SolvOpt`ConstraintGradient"}, ButtonNote->"SolvOpt`"], ButtonBox["PrintLevel", BaseStyle->"InformationLink", ButtonData:>{"Info3419211630-1118324", "SolvOpt`DisplayControl"}, ButtonNote->"SolvOpt`"], ButtonBox["MinimumGradientStep", BaseStyle->"InformationLink", ButtonData:>{ "Info3419211630-1118324", "SolvOpt`MinimumGradientStep"}, ButtonNote->"SolvOpt`"], ButtonBox["RelativeErrorX", BaseStyle->"InformationLink", ButtonData:>{"Info3419211630-1118324", "SolvOpt`RelativeErrorX"}, ButtonNote->"SolvOpt`"], ButtonBox["SpaceDilation", BaseStyle->"InformationLink", ButtonData:>{"Info3419211630-1118324", "SolvOpt`SpaceDilation"}, ButtonNote->"SolvOpt`"]} }, DefaultBaseStyle->"InfoGrid", GridBoxItemSize->{"Columns" -> {{ Scaled[0.19]}}}]} }, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}]}, Dynamic[Typeset`open$$], ImageSize->Automatic]]], "Print", "InfoCell", GeneratedCell->False, CellAutoOverwrite->False, CellChangeTimes->{3.419208031018213*^9, 3.419216598303901*^9}], Cell[BoxData[ StyleBox["\<\"Lower bound for the stepsize used for the \ differenceapproximation of gradients \"\>", "MSG"]], "Print", "PrintUsage", CellTags->"Info3419211630-1118324"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"?", "SolvOpt"}]], "Input", CellChangeTimes->{{3.418356544846503*^9, 3.418356550851663*^9}, 3.418357599403939*^9, {3.419205173866772*^9, 3.419205179408799*^9}, 3.41920557844304*^9}], Cell[BoxData[ StyleBox["\<\"{f,x,options} = SolvOpt[fun,xstart]\\n\\n SolvOpt performs a \ modified version of Shor's r-algorithm\\n in order to find a local \ minimum/maximum of a nonlinear function\\n defined on the n-dimensional \ Euclidean space\\n or\\n a local minimum for a nonlinear constrained \ problem:\\n min { f(x): g(x) <= 0, g(x) in R(m), x in R(n) }.\\n\\n \ Arguments:\\n fun is the entry name of a function which computes the \ value\\n of the function at a point x, f=fun[x]\\n\\n xstart \ is the n-vector, the coordinates of the starting point.\\n\\n Returns:\\n f \ The optimum function value (real).\\n x The position of the \ optimum.\\n options A vector of optional parameters (real) which stores the \ options\\n used (1-8) and other information about the optimization \ (9-13):\\n\\n options[[1]]= H, a factor for the first trial step \ size.\\n options[[2]]= RelativeErrorX.\\n options[[3]]= \ RelativeErrorF.\\n options[[4]]= MaxIterations.\\n \ options[[5]]= PrintLevel.\\n options[[6]]= MaximalResidual.\\n \ #options[[7]]= SpaceDilation. ( # changes should be made with \ care)\\n #options[[8]]= MinimumGradientStep. ( # changes should be \ made with care)\\n\\n options[[9]]= The number of iterations, if \ positive,\\n or an abnormal stop code, if negative \ (see manual for more),\\n -2: improper space dimension,\\n \ -3: returns an improper value,\\n -4: \ returns a zero vector or improper value at the\\n \ starting point,\\n -5: returns an \ improper value,\\n -6: returns an \ improper value,\\n -7: function is unbounded,\\n \ -8: gradient is zero at the point,\\n but stopping \ criteria are not fulfilled,\\n -9: iterations limit exceeded,\ \\n -11: Premature stop is possible,\\n -12: \ Result may not provide the true optimum,\\n -13: Function is \ flat: result may be inaccurate\\n in view of a point,\\n \ -14: Function is steep: result may be inaccurate\\n \ in view of a function value.\\n options[[10]]= The number of \ objective function evaluations.\\n options[[11]]= The number of \ gradient evaluations.\\n options[[12]]= The number of constraint \ function evaluations.\\n options[[13]]= The number of constraint \ gradient evaluations.\"\>", "MSG"]], "Print", "PrintUsage", CellChangeTimes->{3.419216617046259*^9}, CellTags->"Info3419220216-9971345"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Options", "[", "SolvOpt", "]"}]], "Input", CellChangeTimes->{{3.419205316147451*^9, 3.419205338120777*^9}, 3.419205578612622*^9}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"Gradient", "\[Rule]", "None"}], ",", RowBox[{"ConstraintResidual", "\[Rule]", "None"}], ",", RowBox[{"ConstraintGradient", "\[Rule]", "None"}], ",", RowBox[{"Action", "\[Rule]", RowBox[{"{", RowBox[{"Minimize", ",", RowBox[{"-", "1.`"}]}], "}"}]}], ",", RowBox[{"RelativeErrorX", "\[Rule]", "0.0001`"}], ",", RowBox[{"RelativeErrorF", "\[Rule]", "1.`*^-6"}], ",", RowBox[{"MaxIterations", "\[Rule]", "15000"}], ",", RowBox[{"PrintLevel", "\[Rule]", "0"}], ",", RowBox[{"MaximalResidual", "\[Rule]", "1.`*^-8"}], ",", RowBox[{"SpaceDilation", "\[Rule]", "2.5`"}], ",", RowBox[{"MinimumGradientStep", "\[Rule]", "1.`*^-11"}]}], "}"}]], "Output",\ CellChangeTimes->{3.419208031642901*^9, 3.419216617259479*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"?", "MinimumGradientStep"}]], "Input", CellChangeTimes->{{3.419205347274537*^9, 3.419205363774994*^9}}], Cell[BoxData[ StyleBox["\<\"Lower bound for the stepsize used for the \ differenceapproximation of gradients \"\>", "MSG"]], "Print", "PrintUsage", CellChangeTimes->{3.419216617504821*^9}, CellTags->"Info3419220217-3125471"] }, Open ]], Cell[CellGroupData[{ Cell["Shor test using built in functions NMinimize and FindMinimum", "Section", CellChangeTimes->{{3.418303634691325*^9, 3.418303645346734*^9}, { 3.418356603463764*^9, 3.418356625911383*^9}, {3.419206962496631*^9, 3.419206969368508*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"x0", "=", RowBox[{"{", RowBox[{ RowBox[{"-", "1.0"}], ",", "1.0", ",", RowBox[{"-", "1.0"}], ",", "1.0", ",", RowBox[{"-", "1.0"}]}], "}"}]}], ";"}]], "Input", CellChangeTimes->{{3.418303625723771*^9, 3.418303629089419*^9}, { 3.41830367315689*^9, 3.418303688415876*^9}, 3.418304321439011*^9, 3.418304500183382*^9}], Cell[BoxData[ RowBox[{ RowBox[{"x", "=", RowBox[{"{", RowBox[{"x1", ",", "x2", ",", "x3", ",", "x4", ",", "x5"}], "}"}]}], ";"}]], "Input", CellChangeTimes->{{3.418304504795662*^9, 3.418304517971029*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"rules", "=", RowBox[{"MapThread", "[", RowBox[{"Rule", ",", RowBox[{"{", RowBox[{"x", ",", "x0"}], "}"}]}], "]"}]}]], "Input", CellChangeTimes->{{3.418324566409516*^9, 3.418324607920664*^9}, { 3.418324640199122*^9, 3.418324643762212*^9}, {3.418324769135442*^9, 3.418324771690292*^9}, {3.418346153353455*^9, 3.418346156028986*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"x1", "\[Rule]", RowBox[{"-", "1.`"}]}], ",", RowBox[{"x2", "\[Rule]", "1.`"}], ",", RowBox[{"x3", "\[Rule]", RowBox[{"-", "1.`"}]}], ",", RowBox[{"x4", "\[Rule]", "1.`"}], ",", RowBox[{"x5", "\[Rule]", RowBox[{"-", "1.`"}]}]}], "}"}]], "Output", CellChangeTimes->{3.419208032072772*^9, 3.419216617754686*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"shorf", "[", "x0", "]"}]], "Input", CellChangeTimes->{{3.418325314623696*^9, 3.418325320574928*^9}}], Cell[BoxData["180.`"], "Output", CellChangeTimes->{3.419208032170511*^9, 3.419216617876372*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"shorf", "[", "x", "]"}], "/.", RowBox[{"MapThread", "[", RowBox[{"Rule", ",", RowBox[{"{", RowBox[{"x", ",", "x0"}], "}"}]}], "]"}]}]], "Input", CellChangeTimes->{{3.4183040731163*^9, 3.41830408366257*^9}, 3.418304332239188*^9, 3.418304523038379*^9, {3.418304663485856*^9, 3.418304667580526*^9}, {3.418307486636546*^9, 3.41830749057309*^9}, { 3.418323432610028*^9, 3.41832344082612*^9}, {3.418323551800391*^9, 3.418323571434155*^9}, 3.418323676136624*^9, {3.418324316502168*^9, 3.418324336158803*^9}, 3.418324503214007*^9, 3.41832531157702*^9, 3.418345226322389*^9}], Cell[BoxData["180.`"], "Output", CellChangeTimes->{3.419208032180207*^9, 3.419216617921435*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"shorg", "[", "x0", "]"}]], "Input", CellChangeTimes->{{3.418308468636685*^9, 3.418308470515832*^9}, 3.41831078423177*^9, 3.418310914352148*^9, 3.418311280886648*^9, { 3.418323420560794*^9, 3.418323423749557*^9}, {3.418325358251001*^9, 3.418325359192542*^9}, 3.418326860310397*^9, 3.418345266451041*^9}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"-", "10.`"}], ",", RowBox[{"-", "5.`"}], ",", RowBox[{"-", "10.`"}], ",", "0.`", ",", RowBox[{"-", "15.`"}]}], "}"}]], "Output", CellChangeTimes->{3.419208032233766*^9, 3.419216617929913*^9}] }, Open ]], Cell["This is the required solution", "Text", CellChangeTimes->{{3.419206154688752*^9, 3.419206163439131*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"xsol", "=", RowBox[{"{", RowBox[{ "1.12437450703594", ",", "0.979399386605537", ",", "1.47744316500768", ",", "0.920360602026234", ",", "1.12420844022117"}], "}"}]}], ";"}]], "Input", CellChangeTimes->{{3.418346702405708*^9, 3.418346771026116*^9}, 3.419206178475727*^9}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"shorf", "[", "xsol", "]"}]], "Input", CellChangeTimes->{{3.418346868262296*^9, 3.418346872986671*^9}, { 3.419206268818147*^9, 3.41920628979849*^9}, {3.419206326428663*^9, 3.41920632906351*^9}}], Cell[BoxData["22.60016387230226`"], "Output", CellChangeTimes->{3.41920803228782*^9, 3.419216617981128*^9}] }, Open ]], Cell[BoxData[ RowBox[{"(*", RowBox[{ RowBox[{"method", "=", RowBox[{"{", "\[IndentingNewLine]", RowBox[{"\"\\"", ",", "\[IndentingNewLine]", RowBox[{"\"\\"", "\[Rule]", "0.001"}], ",", "\[IndentingNewLine]", RowBox[{"\"\\"", "\[Rule]", "Automatic"}], ",", "\[IndentingNewLine]", RowBox[{"\"\\"", "\[Rule]", "50"}]}], "\[IndentingNewLine]", "}"}]}], ";"}], "*)"}]], "Input", CellChangeTimes->{{3.418347097548796*^9, 3.418347120129388*^9}, { 3.419205931209565*^9, 3.419205953474825*^9}}], Cell[BoxData[ RowBox[{"(*", RowBox[{ RowBox[{"method", "=", RowBox[{"{", "\"\\"", "}"}]}], ";"}], "*)"}]], "Input", CellChangeTimes->{ 3.41834713995651*^9, {3.419207004392182*^9, 3.419207009125273*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"method", "=", RowBox[{"{", "\"\\"", "}"}]}], ";"}]], "Input", CellChangeTimes->{{3.418347070064902*^9, 3.418347078677072*^9}, { 3.419205935960343*^9, 3.419205949088591*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"sol", "=", RowBox[{"NMinimize", "[", RowBox[{ RowBox[{"shorf", "[", RowBox[{"{", RowBox[{"x1", ",", "x2", ",", "x3", ",", "x4", ",", "x5"}], "}"}], "]"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"x1", ",", RowBox[{ RowBox[{"x0", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], "-", ".1"}], ",", RowBox[{ RowBox[{"x0", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], "+", ".1"}]}], "}"}], ",", RowBox[{"{", RowBox[{"x2", ",", RowBox[{ RowBox[{"x0", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], "-", ".1"}], ",", RowBox[{ RowBox[{"x0", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], "+", ".1"}]}], "}"}], ",", RowBox[{"{", RowBox[{"x3", ",", RowBox[{ RowBox[{"x0", "\[LeftDoubleBracket]", "3", "\[RightDoubleBracket]"}], "-", ".1"}], ",", RowBox[{ RowBox[{"x0", "\[LeftDoubleBracket]", "3", "\[RightDoubleBracket]"}], "+", ".1"}]}], "}"}], ",", RowBox[{"{", RowBox[{"x4", ",", RowBox[{ RowBox[{"x0", "\[LeftDoubleBracket]", "4", "\[RightDoubleBracket]"}], "-", ".1"}], ",", RowBox[{ RowBox[{"x0", "\[LeftDoubleBracket]", "4", "\[RightDoubleBracket]"}], "+", ".1"}]}], "}"}], ",", RowBox[{"{", RowBox[{"x5", ",", RowBox[{ RowBox[{"x0", "\[LeftDoubleBracket]", "5", "\[RightDoubleBracket]"}], "-", ".1"}], ",", RowBox[{ RowBox[{"x0", "\[LeftDoubleBracket]", "5", "\[RightDoubleBracket]"}], "+", ".1"}]}], "}"}]}], "}"}], ",", RowBox[{"Method", "\[Rule]", "method"}], ",", RowBox[{"MaxIterations", "\[Rule]", "500"}]}], "]"}]}]], "Input", CellChangeTimes->{{3.418312940480341*^9, 3.418312941813193*^9}, { 3.418345507339568*^9, 3.418345516919332*^9}, {3.418346790363681*^9, 3.418346792206039*^9}, {3.418346976311257*^9, 3.418346983201449*^9}, { 3.41834721336106*^9, 3.418347216586683*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{"22.76675633636367`", ",", RowBox[{"{", RowBox[{ RowBox[{"x1", "\[Rule]", "1.0283391868569904`"}], ",", RowBox[{"x2", "\[Rule]", "0.9972508409711377`"}], ",", RowBox[{"x3", "\[Rule]", "1.4031666567163859`"}], ",", RowBox[{"x4", "\[Rule]", "0.7820054661973359`"}], ",", RowBox[{"x5", "\[Rule]", "1.157038033048343`"}]}], "}"}]}], "}"}]], "Output", CellChangeTimes->{3.419208036473862*^9, 3.419216622834111*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"shorf", "[", RowBox[{"{", RowBox[{"x1", ",", "x2", ",", "x3", ",", "x4", ",", "x5"}], "}"}], "]"}], "/.", RowBox[{"sol", "[", RowBox[{"[", "2", "]"}], "]"}]}]], "Input", CellChangeTimes->{{3.418346797398364*^9, 3.418346826123762*^9}}], Cell[BoxData["22.76675633636367`"], "Output", CellChangeTimes->{3.419208036612431*^9, 3.419216622926524*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"FindMinimum", "[", RowBox[{ RowBox[{"shorf", "[", RowBox[{"{", RowBox[{"x1", ",", "x2", ",", "x3", ",", "x4", ",", "x5"}], "}"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"x1", ",", RowBox[{"x0", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"x2", ",", RowBox[{"x0", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"x3", ",", RowBox[{"x0", "\[LeftDoubleBracket]", "3", "\[RightDoubleBracket]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"x4", ",", RowBox[{"x0", "\[LeftDoubleBracket]", "4", "\[RightDoubleBracket]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"x5", ",", RowBox[{"x0", "\[LeftDoubleBracket]", "5", "\[RightDoubleBracket]"}]}], "}"}]}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"MaxIterations", "\[Rule]", "500"}]}], "]"}]], "Input", CellChangeTimes->{{3.418304096760527*^9, 3.41830413967683*^9}, { 3.418304305126433*^9, 3.418304348027257*^9}, 3.418304534550703*^9, 3.418304641694875*^9, 3.418307757133341*^9, 3.418307797407312*^9, { 3.418307938083628*^9, 3.418307942177003*^9}, {3.418308163940173*^9, 3.4183082258279*^9}, 3.418308304001639*^9, {3.418308385586667*^9, 3.418308390541236*^9}, {3.418310821887312*^9, 3.418310841495101*^9}, 3.418312187691775*^9, {3.418345368341316*^9, 3.418345382982841*^9}, { 3.418345447958387*^9, 3.418345492869902*^9}, {3.418345596357145*^9, 3.41834560427271*^9}, {3.418345712964522*^9, 3.418345857978136*^9}, { 3.418345938713466*^9, 3.418345945805921*^9}, {3.418345985636874*^9, 3.418346105997967*^9}, {3.418346445066484*^9, 3.418346445906318*^9}, { 3.419205997776236*^9, 3.419206002476711*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"FindMinimum", "::", "\<\"lstol\"\>"}], RowBox[{ ":", " "}], "\<\"The line search decreased the step size to within \ tolerance specified by AccuracyGoal and PrecisionGoal but was unable to find \ a sufficient decrease in the function. You may need more than \ \\!\\(MachinePrecision\\) digits of working precision to meet these \ tolerances. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \ ButtonStyle->\\\"Link\\\", ButtonFrame->None, \ ButtonData:>\\\"paclet:ref/message/FindMinimum/lstol\\\", ButtonNote -> \ \\\"FindMinimum::lstol\\\"]\\)\"\>"}]], "Message", "MSG", CellChangeTimes->{3.419208036673171*^9, 3.419216623096742*^9}], Cell[BoxData[ RowBox[{"{", RowBox[{"25.665944666094354`", ",", RowBox[{"{", RowBox[{ RowBox[{"x1", "\[Rule]", "1.340092803948339`"}], ",", RowBox[{"x2", "\[Rule]", "1.1445722520270865`"}], ",", RowBox[{"x3", "\[Rule]", "1.598663128095798`"}], ",", RowBox[{"x4", "\[Rule]", "0.6673814490481198`"}], ",", RowBox[{"x5", "\[Rule]", "0.9487131725711424`"}]}], "}"}]}], "}"}]], "Output", CellChangeTimes->{3.419208036674342*^9, 3.41921662309997*^9}] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Shor test using SolvOpt", "Section", CellChangeTimes->{{3.418303924514528*^9, 3.418303925850291*^9}, { 3.418356645079281*^9, 3.418356650543283*^9}, 3.419205578668818*^9}], Cell[BoxData[ RowBox[{ RowBox[{"x0", "=", RowBox[{"{", RowBox[{ RowBox[{"-", "1.0"}], ",", "1.0", ",", RowBox[{"-", "1.0"}], ",", "1.0", ",", RowBox[{"-", "1.0"}]}], "}"}]}], ";"}]], "Input", CellChangeTimes->{{3.418303625723771*^9, 3.418303629089419*^9}, { 3.41830367315689*^9, 3.418303688415876*^9}, 3.418304321439011*^9, 3.418304500183382*^9}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"sol", "=", RowBox[{"SolvOpt", "[", RowBox[{"shorf", ",", "x0", ",", RowBox[{"PrintLevel", "\[Rule]", "5"}]}], "]"}]}]], "Input", CellChangeTimes->{{3.419069743691652*^9, 3.419069751585636*^9}, { 3.419078109673319*^9, 3.419078121717755*^9}, {3.419086578746445*^9, 3.419086588037063*^9}, 3.419086645624328*^9, 3.419205521739944*^9, 3.419205578722414*^9, {3.419206870393991*^9, 3.419206873902105*^9}, 3.419216591083992*^9}], Cell[CellGroupData[{ Cell[BoxData["\<\"# Iteration, Function Value, Step Value, Gradient \ Norm\"\>"], "Print", CellChangeTimes->{3.419208036761266*^9, 3.419216623169454*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\" \"\>", "\[InvisibleSpace]", "5", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "24.963286710925892`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "0.08846453556353084`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "19.98531532461623`"}], SequenceForm[ " ", 5, " ", 24.963286710925892`, " ", 0.08846453556353084, " ", 19.98531532461623], Editable->False]], "Print", CellChangeTimes->{3.419208036761266*^9, 3.419216623173043*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\" \"\>", "\[InvisibleSpace]", "10", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "23.304992417284126`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "0.10832800079121871`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "23.649949018907552`"}], SequenceForm[ " ", 10, " ", 23.304992417284126`, " ", 0.10832800079121871`, " ", 23.649949018907552`], Editable->False]], "Print", CellChangeTimes->{3.419208036761266*^9, 3.419216623220923*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\" \"\>", "\[InvisibleSpace]", "15", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "22.698392627738635`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "0.016391241548513447`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "19.057133287547856`"}], SequenceForm[ " ", 15, " ", 22.698392627738635`, " ", 0.016391241548513447`, " ", 19.057133287547856`], Editable->False]], "Print", CellChangeTimes->{3.419208036761266*^9, 3.419216623226875*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\" \"\>", "\[InvisibleSpace]", "20", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "22.610851437547147`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "0.004028169624614213`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "23.295076671723468`"}], SequenceForm[ " ", 20, " ", 22.610851437547147`, " ", 0.004028169624614213, " ", 23.295076671723468`], Editable->False]], "Print", CellChangeTimes->{3.419208036761266*^9, 3.419216623231471*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\" \"\>", "\[InvisibleSpace]", "25", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "22.603327776120288`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "0.005364415305672041`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "13.447187524835893`"}], SequenceForm[ " ", 25, " ", 22.603327776120288`, " ", 0.005364415305672041, " ", 13.447187524835893`], Editable->False]], "Print", CellChangeTimes->{3.419208036761266*^9, 3.419216623236363*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\" \"\>", "\[InvisibleSpace]", "30", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "22.600748874067076`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "0.009515233731788635`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "23.289864188034354`"}], SequenceForm[ " ", 30, " ", 22.600748874067076`, " ", 0.009515233731788635, " ", 23.289864188034354`], Editable->False]], "Print", CellChangeTimes->{3.419208036761266*^9, 3.419216623241242*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\" \"\>", "\[InvisibleSpace]", "35", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "22.600212287574745`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "0.0011866283976760096`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "23.289588893527437`"}], SequenceForm[ " ", 35, " ", 22.600212287574745`, " ", 0.0011866283976760096`, " ", 23.289588893527437`], Editable->False]], "Print", CellChangeTimes->{3.419208036761266*^9, 3.419216623284373*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\" \"\>", "\[InvisibleSpace]", "40", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "22.60016320852704`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "0.0003048319804789476`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "13.446238354620807`"}], SequenceForm[ " ", 40, " ", 22.60016320852704, " ", 0.0003048319804789476, " ", 13.446238354620807`], Editable->False]], "Print", CellChangeTimes->{3.419208036761266*^9, 3.419216623289308*^9}] }, Open ]], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ "1.1243572716913728`", ",", "0.9794583654733482`", ",", "1.4777037953665524`", ",", "0.920245076088287`", ",", "1.1242871613046141`"}], "}"}], ",", "22.600162818156385`", ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1.`"}], ",", "0.0001`", ",", "1.`*^-6", ",", "15000", ",", "5", ",", "1.`*^-8", ",", "2.5`", ",", "1.`*^-11", ",", "44", ",", "407.`", ",", "0.`", ",", "0.`", ",", "0.`"}], "}"}]}], "}"}]], "Output",\ CellChangeTimes->{3.419208036891247*^9, 3.41921662329496*^9}] }, Open ]], Cell[TextData[StyleBox["SolvOpt returns the correct minimum 22.6002 after 44 \ iterations with 407 objective function evaluations", FontWeight->"Bold"]], "Text", CellChangeTimes->{{3.419206800093286*^9, 3.419206826804467*^9}, { 3.419207777606198*^9, 3.419207807069531*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"sol", "=", RowBox[{"SolvOpt", "[", RowBox[{"shorf", ",", "x0", ",", RowBox[{"Gradient", "\[Rule]", "shorg"}], ",", RowBox[{"PrintLevel", "\[Rule]", "5"}]}], "]"}]}]], "Input", CellChangeTimes->{{3.419208002513872*^9, 3.419208013057835*^9}, 3.419216590995189*^9}], Cell[CellGroupData[{ Cell[BoxData["\<\"# Iteration, Function Value, Step Value, Gradient \ Norm\"\>"], "Print", CellChangeTimes->{3.41920803696333*^9, 3.419216623354025*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\" \"\>", "\[InvisibleSpace]", "5", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "32.08339540166218`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "0.2956645045572211`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "5.664220634973728`"}], SequenceForm[ " ", 5, " ", 32.08339540166218, " ", 0.2956645045572211, " ", 5.664220634973728], Editable->False]], "Print", CellChangeTimes->{3.41920803696333*^9, 3.4192166233574*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\" \"\>", "\[InvisibleSpace]", "10", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "23.904800383027503`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "0.11470861187007536`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "3.4572243478712443`"}], SequenceForm[ " ", 10, " ", 23.904800383027503`, " ", 0.11470861187007536`, " ", 3.4572243478712443`], Editable->False]], "Print", CellChangeTimes->{3.41920803696333*^9, 3.419216623363411*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\" \"\>", "\[InvisibleSpace]", "15", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "23.040020552605625`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "0.2196574283688159`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "5.878778004730952`"}], SequenceForm[ " ", 15, " ", 23.040020552605625`, " ", 0.2196574283688159, " ", 5.878778004730952], Editable->False]], "Print", CellChangeTimes->{3.41920803696333*^9, 3.41921662336979*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\" \"\>", "\[InvisibleSpace]", "20", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "22.675641264856594`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "0.0443724268315404`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "5.3239601408228765`"}], SequenceForm[ " ", 20, " ", 22.675641264856594`, " ", 0.0443724268315404, " ", 5.3239601408228765`], Editable->False]], "Print", CellChangeTimes->{3.41920803696333*^9, 3.419216623375745*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\" \"\>", "\[InvisibleSpace]", "25", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "22.627726351549185`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "0.02727509759031164`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "4.756860976689269`"}], SequenceForm[ " ", 25, " ", 22.627726351549185`, " ", 0.02727509759031164, " ", 4.756860976689269], Editable->False]], "Print", CellChangeTimes->{3.41920803696333*^9, 3.419216623381053*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\" \"\>", "\[InvisibleSpace]", "30", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "22.60755686154318`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "0.004631133571224232`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "3.3621092235041368`"}], SequenceForm[ " ", 30, " ", 22.60755686154318, " ", 0.004631133571224232, " ", 3.3621092235041368`], Editable->False]], "Print", CellChangeTimes->{3.41920803696333*^9, 3.419216623386352*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\" \"\>", "\[InvisibleSpace]", "35", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "22.60110609163624`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "0.0015754800203004124`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "4.754062062240694`"}], SequenceForm[ " ", 35, " ", 22.60110609163624, " ", 0.0015754800203004124`, " ", 4.754062062240694], Editable->False]], "Print", CellChangeTimes->{3.41920803696333*^9, 3.419216623391861*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\" \"\>", "\[InvisibleSpace]", "40", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "22.60048957679235`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "0.0021737010059688137`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "4.753997220949161`"}], SequenceForm[ " ", 40, " ", 22.60048957679235, " ", 0.0021737010059688137`, " ", 4.753997220949161], Editable->False]], "Print", CellChangeTimes->{3.41920803696333*^9, 3.419216623397112*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\" \"\>", "\[InvisibleSpace]", "45", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "22.600204604833042`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "0.00026487868058776683`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "5.315096965817398`"}], SequenceForm[ " ", 45, " ", 22.600204604833042`, " ", 0.00026487868058776683`, " ", 5.315096965817398], Editable->False]], "Print", CellChangeTimes->{3.41920803696333*^9, 3.419216623403768*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\" \"\>", "\[InvisibleSpace]", "50", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "22.60017912850708`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "0.0008493680304116523`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "5.822393725329868`"}], SequenceForm[ " ", 50, " ", 22.60017912850708, " ", 0.0008493680304116523, " ", 5.822393725329868], Editable->False]], "Print", CellChangeTimes->{3.41920803696333*^9, 3.419216623412411*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\" \"\>", "\[InvisibleSpace]", "55", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "22.600168900898158`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "0.0002501353446821269`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "4.7539634938541715`"}], SequenceForm[ " ", 55, " ", 22.600168900898158`, " ", 0.0002501353446821269, " ", 4.7539634938541715`], Editable->False]], "Print", CellChangeTimes->{3.41920803696333*^9, 3.419216623418876*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\" \"\>", "\[InvisibleSpace]", "60", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "22.600163348976224`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "0.000056838488596078696`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "4.753962909928539`"}], SequenceForm[ " ", 60, " ", 22.600163348976224`, " ", 0.000056838488596078696`, " ", 4.753962909928539], Editable->False]], "Print", CellChangeTimes->{3.41920803696333*^9, 3.419216623424098*^9}] }, Open ]], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ "1.1243946938730514`", ",", "0.979431355218943`", ",", "1.4776438240307446`", ",", "0.9203277742448746`", ",", "1.1242512755709608`"}], "}"}], ",", "22.600163348976224`", ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1.`"}], ",", "0.0001`", ",", "1.`*^-6", ",", "15000", ",", "5", ",", "1.`*^-8", ",", "2.5`", ",", "1.`*^-11", ",", "60", ",", "179.`", ",", "61.`", ",", "0.`", ",", "0.`"}], "}"}]}], "}"}]], "Output",\ CellChangeTimes->{3.419208037233303*^9, 3.419216623428989*^9}] }, Open ]], Cell[TextData[StyleBox["If the gradient is used then 179 objective function \ evaluations and 61 gradient function evaluations are required", FontWeight->"Bold"]], "Text", CellChangeTimes->{{3.419206800093286*^9, 3.419206826804467*^9}, { 3.419207777606198*^9, 3.419207807069531*^9}, {3.419208104174326*^9, 3.419208153788493*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Timing", "[", RowBox[{"SolvOpt", "[", RowBox[{"shorf", ",", "x0"}], "]"}], "]"}]], "Input", CellChangeTimes->{ 3.419205548779059*^9, 3.419205578782291*^9, {3.41920561307364*^9, 3.419205630842142*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{"0.12598099999999998`", ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ "1.1243572716913728`", ",", "0.9794583654733482`", ",", "1.4777037953665524`", ",", "0.920245076088287`", ",", "1.1242871613046141`"}], "}"}], ",", "22.600162818156385`", ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1.`"}], ",", "0.0001`", ",", "1.`*^-6", ",", "15000", ",", "0", ",", "1.`*^-8", ",", "2.5`", ",", "1.`*^-11", ",", "44", ",", "407.`", ",", "0.`", ",", "0.`", ",", "0.`"}], "}"}]}], "}"}]}], "}"}]], "Output", CellChangeTimes->{3.419208037436537*^9, 3.419216623565304*^9}] }, Open ]], Cell[CellGroupData[{ Cell["Test using compiled versions of Shor function", "Subsubsection", CellChangeTimes->{{3.419207042721791*^9, 3.419207075446523*^9}}], Cell[BoxData[ RowBox[{"Clear", "[", "sfc", "]"}]], "Input", CellChangeTimes->{{3.418525457304095*^9, 3.418525464976791*^9}}], Cell[BoxData[ RowBox[{"sfc", " ", ":=", " ", RowBox[{"Compile", "[", RowBox[{ RowBox[{"{", RowBox[{"{", RowBox[{"x", ",", "_Real", ",", "1"}], "}"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"a", "=", RowBox[{"{", RowBox[{ RowBox[{"{", " ", RowBox[{ "0", ",", " ", "2", ",", " ", "1", ",", " ", "1", ",", " ", "3", ",", " ", "0", ",", " ", "1", ",", " ", "1", ",", " ", "0", ",", " ", "1"}], "}"}], ",", "\n", " ", RowBox[{"{", " ", RowBox[{ "0", ",", " ", "1", ",", " ", "2", ",", " ", "4", ",", " ", "2", ",", " ", "2", ",", " ", "1", ",", " ", "0", ",", " ", "0", ",", " ", "1"}], "}"}], ",", "\n", " ", RowBox[{"{", " ", RowBox[{ "0", ",", " ", "1", ",", " ", "1", ",", " ", "1", ",", " ", "1", ",", " ", "1", ",", " ", "1", ",", " ", "1", ",", " ", "2", ",", " ", "2"}], "}"}], ",", "\n", " ", RowBox[{"{", " ", RowBox[{ "0", ",", " ", "1", ",", " ", "1", ",", " ", "2", ",", " ", "0", ",", " ", "0", ",", " ", "1", ",", " ", "2", ",", " ", "1", ",", " ", "0"}], "}"}], ",", "\n", " ", RowBox[{"{", " ", RowBox[{ "0", ",", " ", "3", ",", " ", "2", ",", " ", "2", ",", " ", "1", ",", " ", "1", ",", " ", "1", ",", " ", "1", ",", " ", "0", ",", " ", "0"}], "}"}]}], "}"}]}], ",", "\[IndentingNewLine]", " ", RowBox[{"b", "=", RowBox[{"{", RowBox[{ "1", ",", "5", ",", "10", ",", "2", ",", "4", ",", "3", ",", "1.7", ",", "2.5", ",", "6", ",", "4.5"}], "}"}]}]}], "\[IndentingNewLine]", "}"}], ",", "\[IndentingNewLine]", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"d", "=", RowBox[{"{", RowBox[{ "0.0", ",", "0.0", ",", "0.0", ",", "0.0", ",", "0.0", ",", "0.0", ",", "0.0", ",", "0.0", ",", "0.0", ",", "0.0"}], "}"}]}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"Do", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"d", "[", RowBox[{"[", "i", "]"}], "]"}], " ", "=", " ", RowBox[{ RowBox[{"b", "[", RowBox[{"[", "i", "]"}], "]"}], "*", RowBox[{"Total", "[", RowBox[{ RowBox[{"(", RowBox[{"x", " ", "-", " ", RowBox[{"a", "[", RowBox[{"[", RowBox[{ RowBox[{"1", " ", ";;", " ", "5"}], ",", " ", "i"}], "]"}], "]"}]}], ")"}], "^", "2"}], "]"}]}]}], ";"}], "\[IndentingNewLine]", ",", RowBox[{"{", RowBox[{"i", ",", " ", "1", ",", " ", RowBox[{"Length", "[", "b", "]"}]}], "}"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", RowBox[{"Return", "[", RowBox[{"Max", "[", "d", "]"}], "]"}]}]}], "\[IndentingNewLine]", "]"}]}], "\[IndentingNewLine]", "]"}]}], "\[IndentingNewLine]", "]"}]}]], "Input", CellChangeTimes->{{3.41851956745897*^9, 3.418519575868961*^9}, { 3.418519644349783*^9, 3.418519668962034*^9}, {3.418519729665182*^9, 3.418519838362242*^9}, {3.418524936298817*^9, 3.418524987036923*^9}, { 3.418525181585578*^9, 3.418525334392769*^9}, {3.418525376759222*^9, 3.418525377000817*^9}, {3.418525415825158*^9, 3.418525418275841*^9}, 3.418525452767129*^9, {3.418525516478207*^9, 3.418525539942933*^9}}], Cell[BoxData[ RowBox[{"sgc", ":=", RowBox[{"Compile", "[", RowBox[{ RowBox[{"{", RowBox[{"{", RowBox[{"x", ",", "_Real", ",", "1"}], "}"}], "}"}], ",", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"a", "=", RowBox[{"{", RowBox[{ RowBox[{"{", " ", RowBox[{ "0", ",", " ", "2", ",", " ", "1", ",", " ", "1", ",", " ", "3", ",", " ", "0", ",", " ", "1", ",", " ", "1", ",", " ", "0", ",", " ", "1"}], "}"}], ",", "\n", " ", RowBox[{"{", " ", RowBox[{ "0", ",", " ", "1", ",", " ", "2", ",", " ", "4", ",", " ", "2", ",", " ", "2", ",", " ", "1", ",", " ", "0", ",", " ", "0", ",", " ", "1"}], "}"}], ",", "\n", " ", RowBox[{"{", " ", RowBox[{ "0", ",", " ", "1", ",", " ", "1", ",", " ", "1", ",", " ", "1", ",", " ", "1", ",", " ", "1", ",", " ", "1", ",", " ", "2", ",", " ", "2"}], "}"}], ",", "\n", " ", RowBox[{"{", " ", RowBox[{ "0", ",", " ", "1", ",", " ", "1", ",", " ", "2", ",", " ", "0", ",", " ", "0", ",", " ", "1", ",", " ", "2", ",", " ", "1", ",", " ", "0"}], "}"}], ",", "\n", " ", RowBox[{"{", " ", RowBox[{ "0", ",", " ", "3", ",", " ", "2", ",", " ", "2", ",", " ", "1", ",", " ", "1", ",", " ", "1", ",", " ", "1", ",", " ", "0", ",", " ", "0"}], "}"}]}], "}"}]}], ",", "\[IndentingNewLine]", " ", RowBox[{"b", "=", RowBox[{"{", RowBox[{ "1", ",", "5", ",", "10", ",", "2", ",", "4", ",", "3", ",", "1.7", ",", "2.5", ",", "6", ",", "4.5"}], "}"}]}], ",", "g", ",", "fk", ",", "d"}], "}"}], ",", RowBox[{ RowBox[{"f", "=", "0.0"}], ";", "\n", RowBox[{"Do", "[", RowBox[{ RowBox[{ RowBox[{"d", "=", RowBox[{ RowBox[{"b", "[", RowBox[{"[", "i", "]"}], "]"}], "*", RowBox[{"Total", "[", RowBox[{ RowBox[{"(", RowBox[{"x", "-", RowBox[{"a", "[", RowBox[{"[", RowBox[{ RowBox[{"1", ";;", "5"}], ",", "i"}], "]"}], "]"}]}], ")"}], "^", "2"}], "]"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{"d", ">", "f"}], ",", RowBox[{ RowBox[{"f", "=", "d"}], ";", RowBox[{"k", "=", "i"}]}]}], "]"}], ";"}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", "10"}], "}"}]}], "]"}], ";", "\n", RowBox[{"g", "=", RowBox[{ RowBox[{"b", "[", RowBox[{"[", "k", "]"}], "]"}], "*", "0.5", "*", RowBox[{"(", RowBox[{"x", "-", RowBox[{"a", "[", RowBox[{"[", RowBox[{ RowBox[{"1", ";;", "5"}], ",", "k"}], "]"}], "]"}]}], ")"}]}]}], ";", "\n", RowBox[{"Return", "[", "g", "]"}]}]}], "]"}]}], "]"}]}]], "Input", CellChangeTimes->{{3.418525702359162*^9, 3.418525761816589*^9}, { 3.418525806336783*^9, 3.418525880281613*^9}, {3.418525910344316*^9, 3.418525912535464*^9}, {3.418525951424158*^9, 3.418525982583297*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"sfc", "[", "x0", "]"}]], "Input", CellChangeTimes->{{3.419206504268649*^9, 3.419206507301284*^9}}], Cell[BoxData["180.`"], "Output", CellChangeTimes->{3.419208037683696*^9, 3.41921662364793*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"sgc", "[", "x0", "]"}]], "Input", CellChangeTimes->{{3.418525133081236*^9, 3.418525143018716*^9}, 3.418525815683736*^9}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"-", "10.`"}], ",", RowBox[{"-", "5.`"}], ",", RowBox[{"-", "10.`"}], ",", "0.`", ",", RowBox[{"-", "15.`"}]}], "}"}]], "Output", CellChangeTimes->{3.419208037694567*^9, 3.419216623661037*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Timing", "[", RowBox[{"SolvOpt", "[", RowBox[{"sfc", ",", "x0", ",", RowBox[{"Gradient", "->", "shorg"}]}], "]"}], "]"}]], "Input", CellChangeTimes->{{3.418255234887016*^9, 3.418255251246065*^9}, { 3.418256485900581*^9, 3.418256491328289*^9}, {3.418261452256931*^9, 3.418261548431202*^9}, {3.418261643519905*^9, 3.418261644253166*^9}, { 3.418261694656496*^9, 3.418261719644934*^9}, {3.418261782045676*^9, 3.418261784612878*^9}, {3.4183566668463*^9, 3.418356668813679*^9}, { 3.418375318312226*^9, 3.418375319298875*^9}, {3.41849379849974*^9, 3.418493804705572*^9}, {3.418505232537293*^9, 3.418505239303318*^9}, { 3.418525578463241*^9, 3.418525579171689*^9}, 3.419205578802924*^9, { 3.419205651075045*^9, 3.419205663657479*^9}, {3.419205697073002*^9, 3.419205701001572*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{"0.04699299999999956`", ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ "1.1243946938730514`", ",", "0.979431355218943`", ",", "1.4776438240307446`", ",", "0.9203277742448746`", ",", "1.1242512755709608`"}], "}"}], ",", "22.600163348976224`", ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1.`"}], ",", "0.0001`", ",", "1.`*^-6", ",", "15000", ",", "0", ",", "1.`*^-8", ",", "2.5`", ",", "1.`*^-11", ",", "60", ",", "179.`", ",", "61.`", ",", "0.`", ",", "0.`"}], "}"}]}], "}"}]}], "}"}]], "Output", CellChangeTimes->{3.419208037780299*^9, 3.419216623719984*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Timing", "[", RowBox[{"SolvOpt", "[", RowBox[{"sfc", ",", "x0"}], "]"}], "]"}]], "Input", CellChangeTimes->{{3.418525127820527*^9, 3.418525128083986*^9}, 3.419205578130414*^9, {3.41920567929811*^9, 3.419205692113305*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{"0.06199099999999994`", ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ "1.1243572716913728`", ",", "0.9794583654733482`", ",", "1.4777037953665524`", ",", "0.920245076088287`", ",", "1.1242871613046141`"}], "}"}], ",", "22.600162818156385`", ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1.`"}], ",", "0.0001`", ",", "1.`*^-6", ",", "15000", ",", "0", ",", "1.`*^-8", ",", "2.5`", ",", "1.`*^-11", ",", "44", ",", "407.`", ",", "0.`", ",", "0.`", ",", "0.`"}], "}"}]}], "}"}]}], "}"}]], "Output", CellChangeTimes->{3.4192080378611*^9, 3.419216623791969*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Timing", "[", RowBox[{"SolvOpt", "[", RowBox[{"sfc", ",", "x0", ",", RowBox[{"Gradient", "->", "sgc"}]}], "]"}], "]"}]], "Input", CellChangeTimes->{{3.418525779413444*^9, 3.418525779713547*^9}, 3.419205578143337*^9, {3.419205704513838*^9, 3.419205723633098*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{"0.0439929999999997`", ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ "1.1243946938730514`", ",", "0.979431355218943`", ",", "1.4776438240307446`", ",", "0.9203277742448746`", ",", "1.1242512755709608`"}], "}"}], ",", "22.600163348976224`", ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1.`"}], ",", "0.0001`", ",", "1.`*^-6", ",", "15000", ",", "0", ",", "1.`*^-8", ",", "2.5`", ",", "1.`*^-11", ",", "60", ",", "179.`", ",", "61.`", ",", "0.`", ",", "0.`"}], "}"}]}], "}"}]}], "}"}]], "Output", CellChangeTimes->{3.419208037938669*^9, 3.419216623845451*^9}] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Test with Beale function", "Section", CellChangeTimes->{{3.419207348312271*^9, 3.419207357354835*^9}}], Cell[BoxData[ RowBox[{"<<", "Optimization`UnconstrainedProblems`"}]], "Input"], Cell[BoxData[ RowBox[{"ClearAll", "[", "\"\\"", "]"}]], "Input", CellChangeTimes->{{3.418563826172931*^9, 3.418563842043091*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"beale", "=", RowBox[{"GetFindMinimumProblem", "[", "Beale", "]"}]}]], "Input", CellChangeTimes->{{3.418517650269361*^9, 3.418517654406094*^9}}], Cell[BoxData[ RowBox[{"FindMinimumProblem", "[", RowBox[{ RowBox[{ SuperscriptBox[ RowBox[{"(", RowBox[{ FractionBox["3", "2"], "-", RowBox[{ SubscriptBox["X", "1"], " ", RowBox[{"(", RowBox[{"1", "-", SubscriptBox["X", "2"]}], ")"}]}]}], ")"}], "2"], "+", SuperscriptBox[ RowBox[{"(", RowBox[{ FractionBox["9", "4"], "-", RowBox[{ SubscriptBox["X", "1"], " ", RowBox[{"(", RowBox[{"1", "-", SubsuperscriptBox["X", "2", "2"]}], ")"}]}]}], ")"}], "2"], "+", SuperscriptBox[ RowBox[{"(", RowBox[{ FractionBox["21", "8"], "-", RowBox[{ SubscriptBox["X", "1"], " ", RowBox[{"(", RowBox[{"1", "-", SubsuperscriptBox["X", "2", "3"]}], ")"}]}]}], ")"}], "2"]}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ SubscriptBox["X", "1"], ",", "1.`"}], "}"}], ",", RowBox[{"{", RowBox[{ SubscriptBox["X", "2"], ",", "1.`"}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{"{", "}"}], "}"}], ",", "Beale", ",", RowBox[{"{", RowBox[{"2", ",", "3"}], "}"}]}], "]"}]], "Output", CellChangeTimes->{3.41920803803606*^9, 3.419216624059299*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"beale", "=", RowBox[{"GetFindMinimumProblem", "[", RowBox[{"Beale", ",", RowBox[{"Variables", "\[Rule]", RowBox[{"{", RowBox[{"x", ",", "y"}], "}"}]}]}], "]"}]}]], "Input", CellChangeTimes->{{3.418515674183557*^9, 3.418515678916028*^9}}], Cell[BoxData[ RowBox[{"FindMinimumProblem", "[", RowBox[{ RowBox[{ SuperscriptBox[ RowBox[{"(", RowBox[{ FractionBox["3", "2"], "-", RowBox[{"x", " ", RowBox[{"(", RowBox[{"1", "-", "y"}], ")"}]}]}], ")"}], "2"], "+", SuperscriptBox[ RowBox[{"(", RowBox[{ FractionBox["9", "4"], "-", RowBox[{"x", " ", RowBox[{"(", RowBox[{"1", "-", SuperscriptBox["y", "2"]}], ")"}]}]}], ")"}], "2"], "+", SuperscriptBox[ RowBox[{"(", RowBox[{ FractionBox["21", "8"], "-", RowBox[{"x", " ", RowBox[{"(", RowBox[{"1", "-", SuperscriptBox["y", "3"]}], ")"}]}]}], ")"}], "2"]}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"x", ",", "1.`"}], "}"}], ",", RowBox[{"{", RowBox[{"y", ",", "1.`"}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{"{", "}"}], "}"}], ",", "Beale", ",", RowBox[{"{", RowBox[{"2", ",", "3"}], "}"}]}], "]"}]], "Output", CellChangeTimes->{3.419208038041719*^9, 3.419216624108424*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"ProblemSolve", "[", "beale", "]"}]], "Input", CellChangeTimes->{{3.418515338196287*^9, 3.418515340052132*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{"2.637921497010256`*^-19", ",", RowBox[{"{", RowBox[{ RowBox[{"x", "\[Rule]", "2.999999999831437`"}], ",", RowBox[{"y", "\[Rule]", "0.5000000000642252`"}]}], "}"}]}], "}"}]], "Output", CellChangeTimes->{3.419208038047242*^9, 3.419216624158076*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"ProblemTime", "[", "beale", "]"}]], "Input", CellChangeTimes->{{3.418517285778746*^9, 3.418517297565517*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"2.637921497010256`*^-19", ",", RowBox[{"{", RowBox[{ RowBox[{"x", "\[Rule]", "2.999999999831437`"}], ",", RowBox[{"y", "\[Rule]", "0.5000000000642252`"}]}], "}"}]}], "}"}], ",", RowBox[{"\<\"Time\"\>", "\[Rule]", RowBox[{ "0.0010926064453125`", " ", "Optimization`UnconstrainedProblems`Private`Second"}]}]}], "}"}]], "Output", CellChangeTimes->{3.419208040416541*^9, 3.419216626413127*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"beale", "[", RowBox[{"[", "1", "]"}], "]"}]], "Input"], Cell[BoxData[ RowBox[{ SuperscriptBox[ RowBox[{"(", RowBox[{ FractionBox["3", "2"], "-", RowBox[{"x", " ", RowBox[{"(", RowBox[{"1", "-", "y"}], ")"}]}]}], ")"}], "2"], "+", SuperscriptBox[ RowBox[{"(", RowBox[{ FractionBox["9", "4"], "-", RowBox[{"x", " ", RowBox[{"(", RowBox[{"1", "-", SuperscriptBox["y", "2"]}], ")"}]}]}], ")"}], "2"], "+", SuperscriptBox[ RowBox[{"(", RowBox[{ FractionBox["21", "8"], "-", RowBox[{"x", " ", RowBox[{"(", RowBox[{"1", "-", SuperscriptBox["y", "3"]}], ")"}]}]}], ")"}], "2"]}]], "Output", CellChangeTimes->{3.419208040564952*^9, 3.419216626519914*^9}] }, Open ]], Cell[BoxData[ RowBox[{ RowBox[{"fb", "[", RowBox[{"{", RowBox[{"x_", ",", "y_"}], "}"}], "]"}], ":=", RowBox[{"Evaluate", "[", RowBox[{"beale", "[", RowBox[{"[", "1", "]"}], "]"}], "]"}]}]], "Input", CellChangeTimes->{{3.418515359176835*^9, 3.418515494436075*^9}, { 3.418515539545411*^9, 3.418515616815169*^9}, {3.418515697477319*^9, 3.418515703111073*^9}, {3.418516138839115*^9, 3.41851614514688*^9}, { 3.418516184142155*^9, 3.418516246490751*^9}}], Cell[BoxData[ RowBox[{"Clear", "[", RowBox[{"x", ",", "y", ",", "fbc"}], "]"}]], "Input", CellChangeTimes->{{3.418515513100394*^9, 3.4185155198599*^9}, { 3.418516873795275*^9, 3.418516876223532*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"fb", "[", RowBox[{"{", RowBox[{"x1", ",", "x2"}], "}"}], "]"}], "/.", RowBox[{"{", RowBox[{ RowBox[{"x1", "\[Rule]", RowBox[{"x", "[", RowBox[{"[", "1", "]"}], "]"}]}], ",", RowBox[{"x2", "\[Rule]", RowBox[{"x", "[", RowBox[{"[", "2", "]"}], "]"}]}]}], "}"}]}]], "Input", CellChangeTimes->{3.41851680503637*^9}], Cell[BoxData[ RowBox[{ RowBox[{"Part", "::", "\<\"partd\"\>"}], RowBox[{ ":", " "}], "\<\"Part specification \\!\\(x \[LeftDoubleBracket] 1 \ \[RightDoubleBracket]\\) is longer than depth of object. \ \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", \ ButtonFrame->None, ButtonData:>\\\"paclet:ref/message/General/partd\\\", \ ButtonNote -> \\\"Part::partd\\\"]\\)\"\>"}]], "Message", "MSG", CellChangeTimes->{3.419208040640554*^9, 3.419216626700671*^9}], Cell[BoxData[ RowBox[{ RowBox[{"Part", "::", "\<\"partd\"\>"}], RowBox[{ ":", " "}], "\<\"Part specification \\!\\(x \[LeftDoubleBracket] 1 \ \[RightDoubleBracket]\\) is longer than depth of object. \ \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", \ ButtonFrame->None, ButtonData:>\\\"paclet:ref/message/General/partd\\\", \ ButtonNote -> \\\"Part::partd\\\"]\\)\"\>"}]], "Message", "MSG", CellChangeTimes->{3.419208040640554*^9, 3.419216626707713*^9}], Cell[BoxData[ RowBox[{ RowBox[{"Part", "::", "\<\"partd\"\>"}], RowBox[{ ":", " "}], "\<\"Part specification \\!\\(x \[LeftDoubleBracket] 2 \ \[RightDoubleBracket]\\) is longer than depth of object. \ \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", \ ButtonFrame->None, ButtonData:>\\\"paclet:ref/message/General/partd\\\", \ ButtonNote -> \\\"Part::partd\\\"]\\)\"\>"}]], "Message", "MSG", CellChangeTimes->{3.419208040640554*^9, 3.41921662671284*^9}], Cell[BoxData[ RowBox[{ RowBox[{"General", "::", "\<\"stop\"\>"}], RowBox[{ ":", " "}], "\<\"Further output of \\!\\(Part :: \\\"partd\\\"\\) will be \ suppressed during this calculation. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\ \", ButtonStyle->\\\"Link\\\", ButtonFrame->None, \ ButtonData:>\\\"paclet:ref/message/General/stop\\\", ButtonNote -> \ \\\"General::stop\\\"]\\)\"\>"}]], "Message", "MSG", CellChangeTimes->{3.419208040640554*^9, 3.419216626757694*^9}], Cell[BoxData[ RowBox[{ SuperscriptBox[ RowBox[{"(", RowBox[{ FractionBox["3", "2"], "-", RowBox[{ RowBox[{"x", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], " ", RowBox[{"(", RowBox[{"1", "-", RowBox[{"x", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}]}], ")"}]}]}], ")"}], "2"], "+", SuperscriptBox[ RowBox[{"(", RowBox[{ FractionBox["9", "4"], "-", RowBox[{ RowBox[{"x", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], " ", RowBox[{"(", RowBox[{"1", "-", SuperscriptBox[ RowBox[{"x", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], "2"]}], ")"}]}]}], ")"}], "2"], "+", SuperscriptBox[ RowBox[{"(", RowBox[{ FractionBox["21", "8"], "-", RowBox[{ RowBox[{"x", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], " ", RowBox[{"(", RowBox[{"1", "-", SuperscriptBox[ RowBox[{"x", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], "3"]}], ")"}]}]}], ")"}], "2"]}]], "Output", CellChangeTimes->{3.419208040642422*^9, 3.419216626760449*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"fbc", "=", RowBox[{"Compile", "[", RowBox[{ RowBox[{"{", RowBox[{"{", RowBox[{"x", ",", "_Real", ",", "1"}], "}"}], "}"}], ",", RowBox[{ SuperscriptBox[ RowBox[{"(", RowBox[{ FractionBox["3", "2"], "-", RowBox[{ RowBox[{"x", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], " ", RowBox[{"(", RowBox[{"1", "-", RowBox[{ "x", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}]}], ")"}]}]}], ")"}], "2"], "+", SuperscriptBox[ RowBox[{"(", RowBox[{ FractionBox["9", "4"], "-", RowBox[{ RowBox[{"x", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], " ", RowBox[{"(", RowBox[{"1", "-", SuperscriptBox[ RowBox[{ "x", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], "2"]}], ")"}]}]}], ")"}], "2"], "+", SuperscriptBox[ RowBox[{"(", RowBox[{ FractionBox["21", "8"], "-", RowBox[{ RowBox[{"x", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], " ", RowBox[{"(", RowBox[{"1", "-", SuperscriptBox[ RowBox[{ "x", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], "3"]}], ")"}]}]}], ")"}], "2"]}]}], "]"}]}]], "Input", CellChangeTimes->{{3.418515976044148*^9, 3.418516032260657*^9}, { 3.418516337076806*^9, 3.418516340653742*^9}, {3.418516373060759*^9, 3.418516404019197*^9}, {3.418516536671674*^9, 3.41851653757186*^9}, { 3.418516570891536*^9, 3.418516595378969*^9}, {3.418516643967386*^9, 3.418516739074663*^9}, {3.418516913312428*^9, 3.418516924259766*^9}, { 3.418517120084725*^9, 3.418517129744002*^9}}], Cell[BoxData[ TagBox[ RowBox[{"CompiledFunction", "[", RowBox[{ RowBox[{"{", "x", "}"}], ",", RowBox[{"Block", "[", RowBox[{ RowBox[{"{", RowBox[{"Internal`$$159015", ",", "Internal`$$159016"}], "}"}], ",", RowBox[{ RowBox[{"Internal`$$159015", "=", RowBox[{"x", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}]}], ";", RowBox[{"Internal`$$159016", "=", RowBox[{"x", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}]}], ";", RowBox[{ SuperscriptBox[ RowBox[{"(", RowBox[{ FractionBox["3", "2"], "-", RowBox[{"Internal`$$159015", " ", RowBox[{"(", RowBox[{"1", "-", "Internal`$$159016"}], ")"}]}]}], ")"}], "2"], "+", SuperscriptBox[ RowBox[{"(", RowBox[{ FractionBox["9", "4"], "-", RowBox[{"Internal`$$159015", " ", RowBox[{"(", RowBox[{"1", "-", SuperscriptBox["Internal`$$159016", "2"]}], ")"}]}]}], ")"}], "2"], "+", SuperscriptBox[ RowBox[{"(", RowBox[{ FractionBox["21", "8"], "-", RowBox[{"Internal`$$159015", " ", RowBox[{"(", RowBox[{"1", "-", SuperscriptBox["Internal`$$159016", "3"]}], ")"}]}]}], ")"}], "2"]}]}]}], "]"}], ",", "\<\"-CompiledCode-\"\>"}], "]"}], False, Editable->False]], "Output", CellChangeTimes->{3.41920804064988*^9, 3.419216626769867*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"fb", "[", RowBox[{"{", RowBox[{"1.", ",", "2"}], "}"}], "]"}]], "Input", CellChangeTimes->{{3.418516052037979*^9, 3.418516056793681*^9}, { 3.418516202342717*^9, 3.418516205376042*^9}, 3.418516272533348*^9}], Cell[BoxData["126.453125`"], "Output", CellChangeTimes->{3.419208040655283*^9, 3.41921662681747*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"fbc", "[", RowBox[{"{", RowBox[{"1", ",", "2"}], "}"}], "]"}]], "Input", CellChangeTimes->{{3.418516312595843*^9, 3.418516318432997*^9}, { 3.4185168501648*^9, 3.418516854111447*^9}}], Cell[BoxData["126.453125`"], "Output", CellChangeTimes->{3.419208040723269*^9, 3.419216626825463*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Timing", "[", RowBox[{"FindMinimum", "[", RowBox[{ RowBox[{"fb", "[", RowBox[{"{", RowBox[{"x", ",", "y"}], "}"}], "]"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"x", ",", "1.0"}], "}"}], ",", RowBox[{"{", RowBox[{"y", ",", "1.0"}], "}"}]}], "}"}]}], "]"}], "]"}]], "Input", CellChangeTimes->{{3.418515727258924*^9, 3.41851577441226*^9}, { 3.41920723516803*^9, 3.419207240342301*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{"0.0019989999999998915`", ",", RowBox[{"{", RowBox[{"2.637921497010256`*^-19", ",", RowBox[{"{", RowBox[{ RowBox[{"x", "\[Rule]", "2.999999999831437`"}], ",", RowBox[{"y", "\[Rule]", "0.5000000000642252`"}]}], "}"}]}], "}"}]}], "}"}]], "Output", CellChangeTimes->{3.419208040792614*^9, 3.41921662687125*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Timing", "[", RowBox[{"SolvOpt", "[", RowBox[{"fbc", ",", RowBox[{"{", RowBox[{"1.0", ",", "1.0"}], "}"}], ",", RowBox[{"PrintLevel", "\[Rule]", "1"}]}], "]"}], "]"}]], "Input", CellChangeTimes->{{3.418515802209283*^9, 3.418515822925092*^9}, 3.418516428847112*^9, {3.418516466693707*^9, 3.418516500451448*^9}, { 3.41851716836535*^9, 3.418517187315109*^9}, {3.418517236897557*^9, 3.418517241871836*^9}, 3.418564119879373*^9, 3.419205578151953*^9, { 3.419205819937467*^9, 3.419205858240926*^9}, 3.419216591045312*^9}], Cell[CellGroupData[{ Cell[BoxData["\<\"# Iteration, Function Value, Step Value, Gradient \ Norm\"\>"], "Print", CellChangeTimes->{3.419208040869387*^9, 3.419216626917323*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\" \"\>", "\[InvisibleSpace]", "1", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "4.525561889820513`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "1.532519794037915`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "5.552302212481091`"}], SequenceForm[ " ", 1, " ", 4.525561889820513, " ", 1.532519794037915, " ", 5.552302212481091], Editable->False]], "Print", CellChangeTimes->{3.419208040869387*^9, 3.419216626920009*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\" \"\>", "\[InvisibleSpace]", "2", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "3.146028357794358`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "0.5858584689577756`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "5.744331670913281`"}], SequenceForm[ " ", 2, " ", 3.146028357794358, " ", 0.5858584689577756, " ", 5.744331670913281], Editable->False]], "Print", CellChangeTimes->{3.419208040869387*^9, 3.419216626925546*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\" \"\>", "\[InvisibleSpace]", "3", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "0.7215753626458311`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "1.0174114025160133`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "3.5299784167905286`"}], SequenceForm[ " ", 3, " ", 0.7215753626458311, " ", 1.0174114025160133`, " ", 3.5299784167905286`], Editable->False]], "Print", CellChangeTimes->{3.419208040869387*^9, 3.41921662692691*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\" \"\>", "\[InvisibleSpace]", "4", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "0.001794454579993808`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "0.9568757088851295`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "0.30586722796379145`"}], SequenceForm[ " ", 4, " ", 0.001794454579993808, " ", 0.9568757088851295, " ", 0.30586722796379145`], Editable->False]], "Print", CellChangeTimes->{3.419208040869387*^9, 3.419216626928229*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\" \"\>", "\[InvisibleSpace]", "5", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "0.0014804689769014167`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "0.03197934968973538`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "0.34395345504968444`"}], SequenceForm[ " ", 5, " ", 0.0014804689769014167`, " ", 0.03197934968973538, " ", 0.34395345504968444`], Editable->False]], "Print", CellChangeTimes->{3.419208040869387*^9, 3.41921662692953*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\" \"\>", "\[InvisibleSpace]", "6", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "0.0004689443860837718`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "0.01356704692202471`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "0.09147127683111396`"}], SequenceForm[ " ", 6, " ", 0.0004689443860837718, " ", 0.01356704692202471, " ", 0.09147127683111396], Editable->False]], "Print", CellChangeTimes->{3.419208040869387*^9, 3.419216626930848*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\" \"\>", "\[InvisibleSpace]", "7", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "0.000016310902133956772`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "0.04483140666456216`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "0.0364772874744979`"}], SequenceForm[ " ", 7, " ", 0.000016310902133956772`, " ", 0.04483140666456216, " ", 0.0364772874744979], Editable->False]], "Print", CellChangeTimes->{3.419208040869387*^9, 3.41921662693215*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\" \"\>", "\[InvisibleSpace]", "8", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "5.8436192004432155`*^-6", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "0.008588129001488053`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "0.017450214928725224`"}], SequenceForm[ " ", 8, " ", 5.8436192004432155`*^-6, " ", 0.008588129001488053, " ", 0.017450214928725224`], Editable->False]], "Print", CellChangeTimes->{3.419208040869387*^9, 3.419216626933475*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\" \"\>", "\[InvisibleSpace]", "9", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "1.6397817436057425`*^-8", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "0.004570831387665601`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "0.0007547417304185871`"}], SequenceForm[ " ", 9, " ", 1.6397817436057425`*^-8, " ", 0.004570831387665601, " ", 0.0007547417304185871], Editable->False]], "Print", CellChangeTimes->{3.419208040869387*^9, 3.419216626934913*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\" \"\>", "\[InvisibleSpace]", "10", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "3.2661756258823955`*^-10", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "0.00024450259244809076`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "0.0001579174028133902`"}], SequenceForm[ " ", 10, " ", 3.2661756258823955`*^-10, " ", 0.00024450259244809076`, " ", 0.0001579174028133902], Editable->False]], "Print", CellChangeTimes->{3.419208040869387*^9, 3.419216626936302*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\" \"\>", "\[InvisibleSpace]", "11", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "1.0475065642570252`*^-12", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "0.000020072328202284194`", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "5.966688538602776`*^-6"}], SequenceForm[ " ", 11, " ", 1.0475065642570252`*^-12, " ", 0.000020072328202284194`, " ", 5.966688538602776*^-6], Editable->False]], "Print", CellChangeTimes->{3.419208040869387*^9, 3.419216626937791*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\" \"\>", "\[InvisibleSpace]", "12", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "3.1787882598634525`*^-14", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "2.5192221636053376`*^-6", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "9.95923563255775`*^-7"}], SequenceForm[ " ", 12, " ", 3.1787882598634525`*^-14, " ", 2.5192221636053376`*^-6, " ", 9.95923563255775*^-7], Editable->False]], "Print", CellChangeTimes->{3.419208040869387*^9, 3.419216626939237*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\" \"\>", "\[InvisibleSpace]", "13", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "1.825247349032205`*^-14", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "6.878401916125277`*^-7", "\[InvisibleSpace]", "\<\" \"\>", "\[InvisibleSpace]", "6.379463629583773`*^-7"}], SequenceForm[ " ", 13, " ", 1.825247349032205*^-14, " ", 6.878401916125277*^-7, " ", 6.379463629583773*^-7], Editable->False]], "Print", CellChangeTimes->{3.419208040869387*^9, 3.41921662694084*^9}] }, Open ]], Cell[BoxData[ RowBox[{"{", RowBox[{"0.01799800000000025`", ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"2.999999699238261`", ",", "0.4999999382126847`"}], "}"}], ",", "1.825247349032205`*^-14", ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1.`"}], ",", "0.0001`", ",", "1.`*^-6", ",", "15000", ",", "1", ",", "1.`*^-8", ",", "2.5`", ",", "1.`*^-11", ",", "13", ",", "113.`", ",", "0.`", ",", "0.`", ",", "0.`"}], "}"}]}], "}"}]}], "}"}]], "Output", CellChangeTimes->{3.419208040902375*^9, 3.419216626942362*^9}] }, Open ]] }, Open ]] }, WindowToolbars->"EditBar", WindowSize->{1017, 1125}, WindowMargins->{{Automatic, 199}, {Automatic, 25}}, ShowSelection->True, FrontEndVersion->"6.0 for Linux x86 (32-bit) (February 7, 2008)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{ "Info3419220215-8367318"->{ Cell[1985, 64, 246, 4, 84, "Print", CellTags->"Info3419220215-8367318"]}, "Info3419220216-1894353"->{ Cell[5170, 152, 236, 4, 64, "Print", CellTags->"Info3419220216-1894353"]}, "Info3419211630-1118324"->{ Cell[8146, 231, 185, 3, 43, "Print", CellTags->"Info3419211630-1118324"]}, "Info3419220216-9971345"->{ Cell[8596, 246, 2836, 38, 1064, "Print", CellTags->"Info3419220216-9971345"]}, "Info3419220217-3125471"->{ Cell[12617, 321, 227, 4, 43, "Print", CellTags->"Info3419220217-3125471"]} } *) (*CellTagsIndex CellTagsIndex->{ {"Info3419220215-8367318", 76643, 2086}, {"Info3419220216-1894353", 76751, 2089}, {"Info3419211630-1118324", 76860, 2092}, {"Info3419220216-9971345", 76969, 2095}, {"Info3419220217-3125471", 77082, 2098} } *) (*NotebookFileOutline Notebook[{ Cell[569, 21, 335, 7, 32, "Input"], Cell[CellGroupData[{ Cell[929, 32, 170, 3, 32, "Input"], Cell[1102, 37, 127, 1, 31, "Output"] }, Open ]], Cell[1244, 41, 175, 3, 32, "Input"], Cell[1422, 46, 176, 3, 32, "Input"], Cell[1601, 51, 146, 3, 32, "Input"], Cell[CellGroupData[{ Cell[1772, 58, 210, 4, 32, "Input"], Cell[1985, 64, 246, 4, 84, "Print", CellTags->"Info3419220215-8367318"] }, Open ]], Cell[CellGroupData[{ Cell[2268, 73, 216, 4, 32, "Input"], Cell[CellGroupData[{ Cell[2509, 81, 2658, 69, 85, "Print"], Cell[5170, 152, 236, 4, 64, "Print", CellTags->"Info3419220216-1894353"], Cell[5409, 158, 2734, 71, 85, "Print"], Cell[8146, 231, 185, 3, 43, "Print", CellTags->"Info3419211630-1118324"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[8380, 240, 213, 4, 32, "Input"], Cell[8596, 246, 2836, 38, 1064, "Print", CellTags->"Info3419220216-9971345"] }, Open ]], Cell[CellGroupData[{ Cell[11469, 289, 158, 3, 32, "Input"], Cell[11630, 294, 819, 18, 77, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[12486, 317, 128, 2, 32, "Input"], Cell[12617, 321, 227, 4, 43, "Print", CellTags->"Info3419220217-3125471"] }, Open ]], Cell[CellGroupData[{ Cell[12881, 330, 243, 3, 72, "Section"], Cell[13127, 335, 383, 10, 32, "Input"], Cell[13513, 347, 220, 6, 32, "Input"], Cell[CellGroupData[{ Cell[13758, 357, 378, 8, 32, "Input"], Cell[14139, 367, 392, 11, 70, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[14568, 383, 125, 2, 32, "Input"], Cell[14696, 387, 96, 1, 70, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[14829, 393, 643, 13, 32, "Input"], Cell[15475, 408, 96, 1, 70, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[15608, 414, 338, 5, 32, "Input"], Cell[15949, 421, 256, 7, 70, "Output"] }, Open ]], Cell[16220, 431, 111, 1, 31, "Text"], Cell[16334, 434, 332, 9, 32, "Input"], Cell[CellGroupData[{ Cell[16691, 447, 223, 4, 32, "Input"], Cell[16917, 453, 108, 1, 70, "Output"] }, Open ]], Cell[17040, 457, 621, 13, 143, "Input"], Cell[17664, 472, 232, 6, 32, "Input"], Cell[17899, 480, 227, 5, 32, "Input"], Cell[CellGroupData[{ Cell[18151, 489, 2164, 55, 77, "Input"], Cell[20318, 546, 490, 11, 70, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[20845, 562, 289, 8, 32, "Input"], Cell[21137, 572, 109, 1, 70, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[21283, 578, 1895, 41, 77, "Input"], Cell[23181, 621, 673, 12, 70, "Message"], Cell[23857, 635, 489, 11, 70, "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell[24395, 652, 180, 2, 42, "Section"], Cell[24578, 656, 383, 10, 32, "Input"], Cell[CellGroupData[{ Cell[24986, 670, 472, 9, 32, "Input"], Cell[CellGroupData[{ Cell[25483, 683, 156, 2, 24, "Print"], Cell[25642, 687, 559, 12, 24, "Print"], Cell[26204, 701, 565, 12, 24, "Print"], Cell[26772, 715, 567, 12, 24, "Print"], Cell[27342, 729, 566, 12, 24, "Print"], Cell[27911, 743, 566, 12, 24, "Print"], Cell[28480, 757, 566, 12, 24, "Print"], Cell[29049, 771, 569, 12, 24, "Print"], Cell[29621, 785, 565, 12, 24, "Print"] }, Open ]], Cell[30201, 800, 588, 14, 56, "Output"] }, Open ]], Cell[30804, 817, 277, 4, 31, "Text"], Cell[CellGroupData[{ Cell[31106, 825, 308, 7, 32, "Input"], Cell[CellGroupData[{ Cell[31439, 836, 155, 2, 24, "Print"], Cell[31597, 840, 551, 12, 24, "Print"], Cell[32151, 854, 564, 12, 24, "Print"], Cell[32718, 868, 557, 12, 24, "Print"], Cell[33278, 882, 561, 12, 24, "Print"], Cell[33842, 896, 560, 12, 24, "Print"], Cell[34405, 910, 562, 12, 24, "Print"], Cell[34970, 924, 562, 12, 24, "Print"], Cell[35535, 938, 562, 12, 24, "Print"], Cell[36100, 952, 567, 12, 24, "Print"], Cell[36670, 966, 561, 12, 24, "Print"], Cell[37234, 980, 567, 12, 24, "Print"], Cell[37804, 994, 569, 12, 24, "Print"] }, Open ]], Cell[38388, 1009, 590, 14, 56, "Output"] }, Open ]], Cell[38993, 1026, 336, 5, 31, "Text"], Cell[CellGroupData[{ Cell[39354, 1035, 238, 6, 32, "Input"], Cell[39595, 1043, 678, 16, 56, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[40310, 1064, 136, 1, 30, "Subsubsection"], Cell[40449, 1067, 126, 2, 32, "Input"], Cell[40578, 1071, 4109, 93, 385, "Input"], Cell[44690, 1166, 3706, 90, 231, "Input"], Cell[CellGroupData[{ Cell[48421, 1260, 123, 2, 32, "Input"], Cell[48547, 1264, 95, 1, 31, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[48679, 1270, 149, 3, 32, "Input"], Cell[48831, 1275, 256, 7, 31, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[49124, 1287, 840, 14, 32, "Input"], Cell[49967, 1303, 679, 16, 56, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[50683, 1324, 257, 5, 32, "Input"], Cell[50943, 1331, 676, 16, 56, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[51656, 1352, 303, 6, 32, "Input"], Cell[51962, 1360, 678, 16, 56, "Output"] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[52701, 1383, 109, 1, 72, "Section"], Cell[52813, 1386, 79, 1, 32, "Input"], Cell[52895, 1389, 142, 2, 32, "Input"], Cell[CellGroupData[{ Cell[53062, 1395, 171, 3, 32, "Input"], Cell[53236, 1400, 1303, 43, 47, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[54576, 1448, 287, 7, 32, "Input"], Cell[54866, 1457, 1120, 37, 47, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[56023, 1499, 135, 2, 32, "Input"], Cell[56161, 1503, 310, 8, 33, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[56508, 1516, 134, 2, 32, "Input"], Cell[56645, 1520, 514, 15, 33, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[57196, 1540, 81, 2, 32, "Input"], Cell[57280, 1544, 719, 25, 47, "Output"] }, Open ]], Cell[58014, 1572, 481, 11, 32, "Input"], Cell[58498, 1585, 206, 4, 32, "Input"], Cell[CellGroupData[{ Cell[58729, 1593, 398, 13, 32, "Input"], Cell[59130, 1608, 486, 9, 24, "Message"], Cell[59619, 1619, 486, 9, 24, "Message"], Cell[60108, 1630, 485, 9, 24, "Message"], Cell[60596, 1641, 475, 9, 24, "Message"], Cell[61074, 1652, 1202, 37, 47, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[62313, 1694, 1859, 51, 55, "Input"], Cell[64175, 1747, 1582, 45, 142, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[65794, 1797, 241, 5, 32, "Input"], Cell[66038, 1804, 101, 1, 31, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[66176, 1810, 216, 5, 32, "Input"], Cell[66395, 1817, 102, 1, 31, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[66534, 1823, 483, 14, 32, "Input"], Cell[67020, 1839, 387, 10, 33, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[67444, 1854, 577, 11, 32, "Input"], Cell[CellGroupData[{ Cell[68046, 1869, 156, 2, 24, "Print"], Cell[68205, 1873, 552, 12, 24, "Print"], Cell[68760, 1887, 554, 12, 24, "Print"], Cell[69317, 1901, 559, 12, 24, "Print"], Cell[69879, 1915, 565, 12, 24, "Print"], Cell[70447, 1929, 569, 12, 24, "Print"], Cell[71019, 1943, 568, 12, 24, "Print"], Cell[71590, 1957, 570, 12, 24, "Print"], Cell[72163, 1971, 576, 12, 26, "Print"], Cell[72742, 1985, 577, 12, 26, "Print"], Cell[73322, 1999, 586, 12, 26, "Print"], Cell[73911, 2013, 588, 12, 26, "Print"], Cell[74502, 2027, 584, 12, 26, "Print"], Cell[75089, 2041, 579, 12, 26, "Print"] }, Open ]], Cell[75683, 2056, 581, 14, 56, "Output"] }, Open ]] }, Open ]] } ] *) (* End of internal cache information *)