(************** Content-type: application/mathematica ************** CreatedBy='Mathematica 5.0' Mathematica-Compatible Notebook This notebook can be used with any Mathematica-compatible application, such as Mathematica, MathReader or Publicon. The data for the notebook starts with the line containing stars above. To get the notebook into a Mathematica-compatible application, do one of the following: * Save the data starting with the line of stars above into a file with a name ending in .nb, then open the file inside the application; * Copy the data starting with the line of stars above to the clipboard, then use the Paste menu command inside the application. Data for notebooks contains only printable 7-bit ASCII and can be sent directly in email or through ftp in text mode. Newlines can be CR, LF or CRLF (Unix, Macintosh or MS-DOS style). NOTE: If you modify the data for this notebook not in a Mathematica- compatible application, you must delete the line below containing the word CacheID, otherwise Mathematica-compatible applications may try to use invalid cache data. For more information on notebooks and Mathematica-compatible applications, contact Wolfram Research: web: http://www.wolfram.com email: info@wolfram.com phone: +1-217-398-0700 (U.S.) Notebook reader applications are available free of charge from Wolfram Research. *******************************************************************) (*CacheID: 232*) (*NotebookFileLineBreakTest NotebookFileLineBreakTest*) (*NotebookOptionsPosition[ 39513, 1461]*) (*NotebookOutlinePosition[ 40382, 1491]*) (* CellTagsIndexPosition[ 40338, 1487]*) (*WindowFrame->Normal*) Notebook[{ Cell["\<\ (* Name of this file : MutiplierMethod.nb *) (* Examples of MultiplierMethod.m use *) (* The problem solved is Min f s.t. g = 0 and h <= 0 *) (* Note that f can be 0 and g or h can be empty lists {} *)\ \>", "Input", InitializationCell->True, AspectRatioFixed->True], Cell[BoxData[ \(<< MultiplierMethod.m\)], "Input"], Cell["Needs[\"Optimization`MultiplierMethod`\"];", "Input", InitializationCell->True, AspectRatioFixed->True], Cell[CellGroupData[{ Cell[BoxData[ \(Version /. Options[MultiplierMethod]\)], "Input"], Cell[BoxData[ \(1.93`\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \($Version\)], "Input"], Cell[BoxData[ \("5.0 for Linux (November 18, 2003)"\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(Date[Round[TimeZone[]]]\)], "Input"], Cell[BoxData[ \({2004, 6, 13, 21, 2, 49.678623`8.448744525286656}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell["\<\ f = x1^2 + (x2-4)^2 ; g ={x1-x2} ; h = {5 x2}; x = {x1,x2}; xk = {1,2}; MultiplierMethod[f,g,h,{x1,x2},{1.,2.}]\ \>", "Input",\ InitializationCell->True, AspectRatioFixed->True], Cell[BoxData[ \({16.000000029237036`, {x1 \[Rule] \(-8.708091484931877`*^-8\), x2 \[Rule] \(-3.654628787082011`*^-9\)}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell["\<\ (* Check for inappropriate convergence goal, and DualParameter processing. *) MultiplierMethod[f,g,h,{x1,x2},{1.,2.}, ConvergenceGoal -> -5, DualParameter -> True]\ \>", "Input", AspectRatioFixed->True], Cell[BoxData[ \(MultiplierMethod::"parchange" \(\(:\)\(\ \)\) "Inappropriate parameter value: \!\(ConvergenceGoal\) -> \!\(-5\); \!\(\ \"not a number, less than 0, or exceeds machine precision\"\); changed to \ \!\(6\)."\)], "Message"], Cell[BoxData[ \({16.000000029237036`, {x1 \[Rule] \(-8.708091484931877`*^-8\), x2 \[Rule] \(-3.654628787082011`*^-9\)}, \ {\(-8.342628606223677`*^-8\)}, {NLP`p1 \[Rule] 1.72889295793694`*^-7}, {\(-1.8273143935410052`*^-8\)}, {NLP`q1 \ \[Rule] 1.6000000352434367`}, {8.342628606223677`*^-8, 4.179790523851608`*^-9, 2.9237030940664474`*^-8}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell["\<\ u = {u1,u2,u3}; g = {{1, 1,1},{0,1,-2}}. u + {5,-1}; h = {}; j = (u1-u2)^2 + u3; MultiplierMethod[ \tj,g,h,u,{1.,2.,0.},DualParameter -> True]\ \>", "Input", AspectRatioFixed->True], Cell[BoxData[ \({\(-1.4099999849112352`\), {u1 \[Rule] \(-1.7400000309232426`\), u2 \[Rule] \(-1.8400000313543794`\), u3 \[Rule] \(-1.4199999849974625`\)}, {\(-4.727508473578723`*^-8\), \ \(-6.135945440632895`*^-8\)}, {NLP`p1 \[Rule] \(-0.19999999784505285`\), NLP`p2 \[Rule] 0.3999999956925038`}, {}, {}, {6.135945440632895`*^-8, 1.1583797963196355`*^-8, 0}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell["\<\ f = -x2; g = { x1^2 + x2^2 - 1 }; h = {-x1, -1 - x1 + 2 x2}; MultiplierMethod[ \tf,g,h,{x1,x2},{10.,10.},Augmentation -> 5]\ \>", "Input", AspectRatioFixed->True], Cell[BoxData[ \({\(-0.8000000001326751`\), {x1 \[Rule] 0.5999999942365307`, x2 \[Rule] 0.8000000001326751`}}\)], "Output"] }, Open ]], Cell["\<\ (* The last attempt found an inadmissible solution in pre Mma 5.0 versions; try it again with a better starting point. *)\ \>", "Input"], Cell[CellGroupData[{ Cell["\<\ f = -x2; g = { x1^2 + x2^2 - 1 }; h = {-x1, -1 - x1 + 2 x2}; MultiplierMethod[ \tf,g,h,{x1,x2},{1.,1.},Augmentation -> 5]\ \>", "Input", AspectRatioFixed->True], Cell[BoxData[ \({\(-0.8000000013055066`\), {x1 \[Rule] 0.5999999977034214`, x2 \[Rule] 0.8000000013055066`}}\)], "Output"] }, Open ]], Cell["(* Or ramp the penalty to reduce infeasibility *)", "Input"], Cell[CellGroupData[{ Cell["\<\ f = -x2; g = { x1^2 + x2^2 - 1 }; h = {-x1, -1 - x1 + 2 x2}; MultiplierMethod[ \tf,g,h,{x1,x2},{10.,10.}, \tAugmentation->2, \tAugmentationGrowth -> 2]\ \>", "Input", AspectRatioFixed->True], Cell[BoxData[ \({\(-0.7999999999999039`\), {x1 \[Rule] 0.59999999999953`, x2 \[Rule] 0.7999999999999039`}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell["\<\ (* Unconstrained optimization...*) MultiplierMethod[ \t50 (x1^2-x2)^2 + (x1-1)^2, \t{},{},{x1,x2},{-2.,3.}]\ \>", "Input", InitializationCell->True, AspectRatioFixed->True], Cell[BoxData[ \({0.`, {x1 \[Rule] 1.`, x2 \[Rule] 1.`}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell["FindMinimum[50 (x1^2-x2)^2 + (x1-1)^2,{x1,-2},{x2,3}]", "Input", InitializationCell->True, AspectRatioFixed->True], Cell[BoxData[ \({0.`, {x1 \[Rule] 1.`, x2 \[Rule] 1.`}}\)], "Output"] }, Open ]], Cell["Other Tests", "Subsection", Evaluatable->False, AspectRatioFixed->True], Cell[CellGroupData[{ Cell["Options[MultiplierMethod]", "Input", AspectRatioFixed->True], Cell[BoxData[ \({Version \[Rule] 1.93`, Augmentation \[Rule] 10.`, AugmentationGrowth \[Rule] 1, CheckConvergence \[Rule] True, DualParameter \[Rule] False, InnerIterations \[Rule] 5, OuterIterations \[Rule] 30, ConvergenceGoal \[Rule] 6}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell["Trivial 1", "Subsubsection", Evaluatable->False, AspectRatioFixed->False], Cell[CellGroupData[{ Cell["\<\ f = x1^2; g ={}; h = {-x1+1}; MultiplierMethod[f,g,h,{x1},{5.}] // Timing\ \>", "Input", AspectRatioFixed->True], Cell[BoxData[ \({0.04000000000000005`\ Second, {0.9999998024369763`, {x1 \[Rule] 0.9999999012184833`}}}\)], "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Trivial 2", "Subsubsection", Evaluatable->False, AspectRatioFixed->False], Cell[CellGroupData[{ Cell["\<\ f = (x1-2)^2; g ={x1 -1} ; h = { }; MultiplierMethod[f,g,h,{x1},{5.}] // Timing\ \>", "Input", AspectRatioFixed->True], Cell[BoxData[ \({0.020000000000000014`\ Second, {0.9999998024380146`, {x1 \[Rule] 1.0000000987809976`}}}\)], "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Trivial 3", "Subsubsection", Evaluatable->False, AspectRatioFixed->False], Cell[CellGroupData[{ Cell["\<\ f = x1^2 + (x2-2)^2; g ={x1 + x2 -5/2} ; h = {-x1 + .25 , -x2 + 2}; MultiplierMethod[f,g,h,{x1,x2},{5.,10.}] // Timing\ \>", "Input", AspectRatioFixed->True], Cell[BoxData[ \({0.09999999999999999`\ Second, {0.12499997245189642`, {x1 \[Rule] 0.2500000863078415`, x2 \[Rule] 2.2499998585958965`}}}\)], "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Quadratic programming", "Subsubsection", Evaluatable->False, AspectRatioFixed->False], Cell[CellGroupData[{ Cell["\<\ f = x1^2 + (x2-4)^2 ; g ={x1-x2} ; h = {5 x2}; MultiplierMethod[f,g,h,{x1,x2},{1.,2.}] // Timing\ \>", "Input", AspectRatioFixed->True], Cell[BoxData[ \({0.04000000000000001`\ Second, {16.000000029237036`, {x1 \[Rule] \ \(-8.708091484931877`*^-8\), x2 \[Rule] \(-3.654628787082011`*^-9\)}}}\)], "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Quadratic programming / inequality only", "Subsubsection", Evaluatable->False, AspectRatioFixed->False], Cell[CellGroupData[{ Cell["\<\ f = 2 x1^2 + x1 x2 + x2^2 - 12 x1 - 10 x2; g = {}; h = {x1 + x2 - 4, -x1, -x2}; MultiplierMethod[f,g,h,{x1,x2},{0,0}, \tDualParameter -> True] // Timing\ \>", "Input", AspectRatioFixed->True], Cell[BoxData[ \({0.07999999999999997`\ Second, {\(-28.50000009021832`\), {x1 \[Rule] 1.4999999742388301`, x2 \[Rule] 2.500000051537833`}, {}, {}, {2.5776663026277902`*^-8, \ \(-1.4999999742388301`\), \(-2.500000051537833`\)}, {NLP`q1 \[Rule] 3.4999999872195175`, NLP`q2 \[Rule] 0.`, NLP`q3 \[Rule] 0.`}, {2.5776663026277902`*^-8, 9.109061247354972`*^-8, 9.021832026253446`*^-8}}}\)], "Output"] }, Open ]] }, Open ]], Cell["\<\ (* increase penalty to try and reduce optimality violations present in pre Mma 5.0 versions; notice that we get the same answer *)\ \>", "Input"], Cell[CellGroupData[{ Cell["\<\ f = 2 x1^2 + x1 x2 + x2^2 - 12 x1 - 10 x2; g = {}; h = {x1 + x2 - 4, -x1, -x2}; MultiplierMethod[f,g,h,{x1,x2},{0,0}, \tAugmentationGrowth->2, \tDualParameter -> True] // Timing\ \>", "Input", AspectRatioFixed->True], Cell[BoxData[ \({0.05`\ Second, {\(-28.500000005145047`\), {x1 \[Rule] 1.4999999424985861`, x2 \[Rule] 2.5000000589714313`}, {}, {}, {1.4700174411075295`*^-9, \ \(-1.4999999424985861`\), \(-2.5000000589714313`\)}, {NLP`q1 \[Rule] 3.50000006275061`, NLP`q2 \[Rule] 0.`, NLP`q3 \[Rule] 0.`}, {1.4700174411075295`*^-9, 1.6401714706754996`*^-7, 5.1450611361208444`*^-9}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell["\<\ Quadratic programming with 2 equalities and one inequality...\ \>", \ "Subsubsection", Evaluatable->False, AspectRatioFixed->False], Cell[CellGroupData[{ Cell["\<\ u = {u1,u2,u3}; j = (u1-u2)^2 + 5 u3; g = {{1, 1,1},{0,1,-3}}. u + {5,-1}; h = {-u1}; MultiplierMethod[j,g,h,u,{1.,2.,0.}, \tDualParameter -> True] // Timing\ \>", "Input", AspectRatioFixed->False], Cell[BoxData[ \(MultiplierMethod::"nonslackness" \(\(:\)\(\ \)\) "complementary slackness not satisfied; slack violation is \ \!\(1.0041059277603322`*^-6\)."\)], "Message"], Cell[BoxData[ \({0.10999999999999996`\ Second, {4.749998825010914`, {u1 \[Rule] \ \(-9.128236254508946`*^-8\), u2 \[Rule] \(-3.499999903074664`\), u3 \[Rule] \(-1.4999999715070458`\)}, {3.413592830625589`*^-8, 1.1446473102694199`*^-8}, {NLP`p1 \[Rule] 3.9999997169029733`, NLP`p2 \[Rule] 2.9999999071113415`}, {9.128236254508946`*^-8}, {NLP`q1 \[Rule] 10.9999993401173`}, {9.128236254508946`*^-8, 4.467210631204433`*^-9, 1.0041059277603322`*^-6}}}\)], "Output"] }, Open ]] }, Open ]], Cell["\<\ Tests from the books by W. Hock & K. Schittkowski (1980) and K. \ Schittkowski (1987)...\ \>", "Subsubsection", Evaluatable->False, AspectRatioFixed->True], Cell[CellGroupData[{ Cell["TP1 p. 24", "Subsubsection", Evaluatable->False, AspectRatioFixed->True], Cell[CellGroupData[{ Cell["\<\ f = 100 (x2 - x1^2)^2 + (1-x1)^2; g = {}; h = {-x2 -1.5}; MultiplierMethod[f,g,h,{x1,x2},{-2.,1.}] // Timing\ \>", "Input", AspectRatioFixed->True], Cell[BoxData[ \({0.050000000000000086`\ Second, {3.494558994700956`*^-18, {x1 \[Rule] 0.9999999981321397`, x2 \[Rule] 0.9999999962567582`}}}\)], "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["TP2 p. 25", "Subsubsection", Evaluatable->False, AspectRatioFixed->True], Cell[CellGroupData[{ Cell["\<\ f = 100 (x2 - x1^2)^2 + (1-x1)^2; g = {}; h = {-x2 +1.5}; MultiplierMethod[f,g,h,{x1,x2},{-2.,1.}] // Timing\ \>", "Input", AspectRatioFixed->True], Cell[BoxData[ \({0.04000000000000004`\ Second, {4.941229313665283`, {x1 \[Rule] \ \(-1.2210262411323611`\), x2 \[Rule] 1.4999999976229008`}}}\)], "Output"] }, Open ]] }, Open ]], Cell["\<\ (* use a better starting point to find a better solution *)\ \>", "Input"], Cell[CellGroupData[{ Cell["\<\ f = 100 (x2 - x1^2)^2 + (1-x1)^2; g = {}; h = {-x2 +1.5}; MultiplierMethod[f,g,h,{x1,x2},{2.,1.}] // Timing\ \>", "Input", AspectRatioFixed->True], Cell[BoxData[ \({0.08`\ Second, {0.05042618835502824`, {x1 \[Rule] 1.2243707497632104`, x2 \[Rule] 1.5000000025179332`}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell["TP216 p. 40", "Subsubsection", Evaluatable->False, AspectRatioFixed->True], Cell[CellGroupData[{ Cell["\<\ f = 100 (x1^2 - x2)^2 + (x1 - 1)^2; g = { x1 (x1-4) - 2 x2 + 12 }; h = {}; MultiplierMethod[f,g,h,{x1,x2},{-1.2,1.}, \tDualParameter -> True] // Timing\ \>", "Input", AspectRatioFixed->True], Cell[BoxData[ \({0.03999999999999994`\ Second, {0.9993752928633413`, {x1 \[Rule] 1.999375244103262`, x2 \[Rule] 4.000000195132222`}, {5.5484505878666823`*^-11}, {NLP`p1 \[Rule] 0.24988283993851113`}, {}, {}, {5.5484505878666823`*^-11, 3.6787989848030357`*^-10, 0}}}\)], "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["TP217 p. 41", "Subsubsection", Evaluatable->False, AspectRatioFixed->True], Cell[CellGroupData[{ Cell["\<\ f = -x2; g = { x1^2 + x2^2 - 1 }; h = {-x1, -1 - x1 + 2 x2}; MultiplierMethod[f,g,h,{x1,x2},{10.,10.}] // Timing\ \>", "Input", AspectRatioFixed->True], Cell[BoxData[ \({0.0999999999999999`\ Second, {\(-0.7999999998604541`\), {x1 \[Rule] 0.6000000011069396`, x2 \[Rule] 0.7999999998604541`}}}\)], "Output"] }, Open ]], Cell["\<\ (* Try again with a better starting point; better result and faster in pre Mma 5.0 versions. *)\ \>", "Input"], Cell[CellGroupData[{ Cell["\<\ f = -x2; g = { x1^2 + x2^2 - 1 }; h = {-x1, -1 - x1 + 2 x2}; MultiplierMethod[f,g,h,{x1,x2},{1.,1.}] // Timing\ \>", "Input", AspectRatioFixed->True], Cell[BoxData[ \({0.05000000000000003`\ Second, {\(-0.7999999990544987`\), {x1 \[Rule] 0.6000000019510913`, x2 \[Rule] 0.7999999990544987`}}}\)], "Output"] }, Open ]], Cell["\<\ (* ramping augmentation takes about same time in pre Mma 5.0 versions *)\ \>", "Input"], Cell[CellGroupData[{ Cell["\<\ f = -x2; g = { x1^2 + x2^2 - 1 }; h = {-x1, -1 - x1 + 2 x2}; MultiplierMethod[f,g,h,{x1,x2},{1.,1.}, \tAugmentationGrowth->5] // Timing\ \>", "Input", AspectRatioFixed->True], Cell[BoxData[ \(MultiplierMethod::"nonKKT" \(\(:\)\(\ \)\) "Karush-Kuhn-Tucker conditions not satisfied better than \ \!\(516987.8828960479`\)."\)], "Message"], Cell[BoxData[ \({0.22`\ Second, {\(-0.7999999999999999`\), {x1 \[Rule] 0.6`, x2 \[Rule] 0.7999999999999999`}}}\)], "Output"] }, Open ]], Cell["(* Try again with reduced convergence goals *)", "Input"], Cell[CellGroupData[{ Cell["\<\ f = -x2; g = { x1^2 + x2^2 - 1 }; h = {-x1, -1 - x1 + 2 x2}; MultiplierMethod[f,g,h,{x1,x2},{10.,10.}, \tConvergenceGoal -> 3, Augmentation -> 1] // Timing\ \>", "Input", AspectRatioFixed->True], Cell[BoxData[ \({0.10000000000000002`\ Second, {\(-0.7999961921108362`\), {x1 \[Rule] 0.599811159103491`, x2 \[Rule] 0.7999961921108362`}}}\)], "Output"] }, Open ]] }, Open ]], Cell["\<\ (* Try again with a better starting point; gives better results in pre Mma 5.0 versions. *)\ \>", "Input"], Cell[CellGroupData[{ Cell["\<\ f = -x2; g = { x1^2 + x2^2 - 1 }; h = {-x1, -1 - x1 + 2 x2}; MultiplierMethod[f,g,h,{x1,x2},{1.,1.}, \tConvergenceGoal -> 3, Augmentation -> 1] // Timing\ \>", "Input", AspectRatioFixed->True], Cell[BoxData[ \({0.029999999999999926`\ Second, {\(-0.8000524294777782`\), {x1 \[Rule] 0.6000248089285934`, x2 \[Rule] 0.8000524294777782`}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell["TP230 p. 54 Chamberlain Problem", "Subsubsection", Evaluatable->False, AspectRatioFixed->True], Cell[CellGroupData[{ Cell["\<\ f = x2; g = {}; h = - { \t-2 x1^2 + x1^3 + x2 , \t-2(1-x1)^2 + (1-x1)^3 + x2 }; MultiplierMethod[f,g,h,{x1,x2},{0.,0.}] // Timing\ \>", "Input", AspectRatioFixed->True], Cell[BoxData[ \({0.0499999999999999`\ Second, {0.37499999996612343`, {x1 \[Rule] 0.5000000241952889`, x2 \[Rule] 0.37499999996612343`}}}\)], "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["TP234 p. 58", "Subsubsection", Evaluatable->False, AspectRatioFixed->True], Cell[CellGroupData[{ Cell["\<\ f = (x2-x1)^4 -(1-x1); g = {}; h = { \tx1 - 2, \tx2 - 2, \t-x1 + .2, \t-x2 + .2, \tx1^2 + x2^2 -1 }; MultiplierMethod[f,g,h,{x1,x2},{0.,0.}] // Timing\ \>", "Input", AspectRatioFixed->True], Cell[BoxData[ \({0.10000000000000007`\ Second, {\(-0.7999999994585993`\), {x1 \[Rule] 0.20000000048196395`, x2 \[Rule] 0.20277660244728135`}}}\)], "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["TP321 p. 142 ...difficult...", "Subsubsection", Evaluatable->False, AspectRatioFixed->True], Cell[CellGroupData[{ Cell["\<\ f = (x1-20)^2 + (x2 + 20)^2; g = {x1^2 /100. + x2^2 -1}; h = {}; MultiplierMethod[f,g,h,{x1,x2},{0.,0.}] // Timing\ \>", "Input", AspectRatioFixed->True], Cell[BoxData[ \(MultiplierMethod::"nonadmissible" \(\(:\)\(\ \)\) "current point \!\(0.02937807226107502`\) from admissible."\)], \ "Message"], Cell[BoxData[ \({0.1200000000000002`\ Second, {493.106305546584`, {x1 \[Rule] 9.954247248200955`, x2 \[Rule] \(-0.19623376232929962`\)}}}\)], "Output"] }, Open ]] }, Open ]], Cell["(* increase iterations to reduce infeasibility *)", "Input"], Cell[CellGroupData[{ Cell["\<\ f = (x1-20)^2 + (x2 + 20)^2; g = {x1^2 /100. + x2^2 -1}; h = {}; MultiplierMethod[f,g,h,{x1,x2},{0.,0.}, \tOuterIterations->100] // Timing\ \>", "Input", AspectRatioFixed->True], Cell[BoxData[ \(MultiplierMethod::"nonadmissible" \(\(:\)\(\ \)\) "current point \!\(0.00003232265592080508`\) from admissible."\)], \ "Message"], Cell[BoxData[ \({0.33999999999999986`\ Second, {496.109012485169`, {x1 \[Rule] 9.81618261046046`, x2 \[Rule] \(-0.19093955126389442`\)}}}\)], "Output"] }, Open ]], Cell["\<\ (* ramp penalty to reduce infeasibility in pre Mma 5.0 versions, and run faster *)\ \>", "Input"], Cell[CellGroupData[{ Cell["\<\ f = (x1-20)^2 + (x2 + 20)^2; g = {x1^2 /100. + x2^2 -1}; h = {}; ans = MultiplierMethod[f,g,h,{x1,x2},{0.,0.}, \tAugmentation->10, AugmentationGrowth->2] // Timing\ \>", "Input", AspectRatioFixed->True], Cell[BoxData[ \(MultiplierMethod::"nonKKT" \(\(:\)\(\ \)\) "Karush-Kuhn-Tucker conditions not satisfied better than \ \!\(9.990789794483268`*^-6\)."\)], "Message"], Cell[BoxData[ \({0.05999999999999978`\ Second, {496.1123658571532`, {x1 \[Rule] 9.816029072640605`, x2 \[Rule] \(-0.19093384311486872`\)}}}\)], "Output"] }, Open ]], Cell["\<\ (* ramp penalty to reduce infeasibility in pre Mma 5.0 versions, iterate former answer to speed convergence, limit augmentation growth to help satisfy KKT *)\ \>", "Input"], Cell[CellGroupData[{ Cell["\<\ f = (x1-20)^2 + (x2 + 20)^2; g = {x1^2 /100. + x2^2 -1}; h = {}; MultiplierMethod[f,g,h,{x1,x2},{x1,x2}/.ans[[2,2]], \tAugmentation->10, AugmentationGrowth->1.2 ] // Timing\ \>", "Input", AspectRatioFixed->True], Cell[BoxData[ \(MultiplierMethod::"nonKKT" \(\(:\)\(\ \)\) "Karush-Kuhn-Tucker conditions not satisfied better than \ \!\(2.733453830555236`*^-6\)."\)], "Message"], Cell[BoxData[ \({0.08999999999999994`\ Second, {496.11236585930544`, {x1 \[Rule] 9.816029278448411`, x2 \[Rule] \(-0.19093373725340163`\)}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell["TP322 p. 143 ...difficult...", "Subsubsection", Evaluatable->False, AspectRatioFixed->True], Cell[CellGroupData[{ Cell["\<\ f = (x1-20)^2 + (x2 + 20)^2; g = {x1^2 /100. + 100. x2^2 -1}; h = {}; MultiplierMethod[f,g,h,{x1,x2},{0.,0.}] // Timing\ \>", "Input", AspectRatioFixed->True], Cell[BoxData[ \(MultiplierMethod::"nonadmissible" \(\(:\)\(\ \)\) "current point \!\(0.017258015699066976`\) from admissible."\)], \ "Message"], Cell[BoxData[ \(MultiplierMethod::"nonKKT" \(\(:\)\(\ \)\) "Karush-Kuhn-Tucker conditions not satisfied better than \ \!\(0.2278779170268012`\)."\)], "Message"], Cell[BoxData[ \({0.11000000000000008`\ Second, {498.2482830265648`, {x1 \[Rule] 10.083854561328614`, x2 \[Rule] \(-0.0020415375548541365`\)}}}\)], "Output"] }, Open ]], Cell["(* increase iterations to reduce infeasibility *)", "Input"], Cell[CellGroupData[{ Cell["\<\ f = (x1-20)^2 + (x2 + 20)^2; g = {x1^2 /100. + 100. x2^2 -1}; h = {}; MultiplierMethod[f,g,h,{x1,x2},{0.,0.}, \tOuterIterations->150] // Timing\ \>", "Input", AspectRatioFixed->True], Cell[BoxData[ \(MultiplierMethod::"nonKKT" \(\(:\)\(\ \)\) "Karush-Kuhn-Tucker conditions not satisfied better than \ \!\(0.00001965778873463091`\)."\)], "Message"], Cell[BoxData[ \({0.5200000000000002`\ Second, {499.9599846616608`, {x1 \[Rule] 9.998003163139554`, x2 \[Rule] \(-0.001999001472812299`\)}}}\)], "Output"] }, Open ]] }, Open ]], Cell["\<\ (* ramp penalty to reduce infeasibility in pre 5.0 versions, and run faster *)\ \>", "Input"], Cell[CellGroupData[{ Cell["\<\ f = (x1-20)^2 + (x2 + 20)^2; g = {x1^2 /100. + 100. x2^2 -1}; h = {}; MultiplierMethod[f,g,h,{x1,x2},{0.,0.}, \tAugmentationGrowth->1.7] // Timing\ \>", "Input", AspectRatioFixed->True], Cell[BoxData[ \(MultiplierMethod::"nonKKT" \(\(:\)\(\ \)\) "Karush-Kuhn-Tucker conditions not satisfied better than \ \!\(0.0008604057062112333`\)."\)], "Message"], Cell[BoxData[ \({0.1100000000000002`\ Second, {499.96001199396056`, {x1 \[Rule] 9.998001796633183`, x2 \[Rule] \(-0.00199900155499239`\)}}}\)], "Output"] }, Open ]], Cell["\<\ (* notice bigger penalty is not always better solution (in pre Mma 5.0 versions) *)\ \>", "Input"], Cell[CellGroupData[{ Cell["\<\ f = (x1-20)^2 + (x2 + 20)^2; g = {x1^2 /100. + 100. x2^2 -1}; h = {}; MultiplierMethod[f,g,h,{x1,x2},{0.,0.}, \tAugmentationGrowth->2] // Timing\ \>", "Input", AspectRatioFixed->True], Cell[BoxData[ \(MultiplierMethod::"nonKKT" \(\(:\)\(\ \)\) "Karush-Kuhn-Tucker conditions not satisfied better than \ \!\(0.008201215299518295`\)."\)], "Message"], Cell[BoxData[ \({0.10999999999999988`\ Second, {499.96001199124703`, {x1 \[Rule] 9.99800179956037`, x2 \[Rule] \(-0.0019990001588034477`\)}}}\)], "Output"] }, Open ]], Cell["\<\ (* notice bigger penalty yet may yield better solution (in pre Mma 5.0 versions) *)\ \>", "Input"], Cell[CellGroupData[{ Cell["\<\ f = (x1-20)^2 + (x2 + 20)^2; g = {x1^2 /100. + 100. x2^2 -1}; h = {}; ans = MultiplierMethod[f,g,h,{x1,x2},{0.,0.}, \tAugmentationGrowth->4] // Timing\ \>", "Input", AspectRatioFixed->True], Cell[BoxData[ \(MultiplierMethod::"nonKKT" \(\(:\)\(\ \)\) "Karush-Kuhn-Tucker conditions not satisfied better than \ \!\(0.3023028712791297`\)."\)], "Message"], Cell[BoxData[ \({0.09999999999999999`\ Second, {499.96001199160867`, {x1 \[Rule] 9.998001792961672`, x2 \[Rule] \(-0.0019990034501018725`\)}}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell["\<\ TP339 p. 160 Container Problem (difficult...) solution : {3.36168, {x1 -> 2.380, x2 -> 0.3162, x3 -> 1.943}}\ \>", \ "Subsubsection", Evaluatable->False, AspectRatioFixed->True], Cell[CellGroupData[{ Cell["\<\ f = 1/(5. x1 x2 x3) + 4./x1 + 3./x3; h = { \t2. x1 x3 + x1 x2 -10., \t-x1, \t-x2, \t-x3, \tx1-5, \tx2-5, \tx3-5}; g = {}; MultiplierMethod[f,g,h,{x1,x2,x3},{1.,1.,1.}] // Timing\ \>", "Input", AspectRatioFixed->True], Cell[BoxData[ \({0.29000000000000015`\ Second, {3.3616796911203197`, {x1 \[Rule] 2.3797630794654507`, x2 \[Rule] 0.3162277509983611`, x3 \[Rule] 1.9429356104761246`}}}\)], "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["TP340 p. 161 Pascal Problem", "Subsubsection", Evaluatable->False, AspectRatioFixed->True], Cell[CellGroupData[{ Cell["\<\ f = -x1 x2 x3; h = {-1.8 + x1 + 2 x2 + 2 x3, x1-1}; g = {}; MultiplierMethod[f,g,h,{x1,x2,x3},{1.,1.,1.}, \tDualParameter -> True]\ \>", "Input", AspectRatioFixed->True], Cell[BoxData[ \({\(-0.054000000703709174`\), {x1 \[Rule] 0.5999998509409187`, x2 \[Rule] 0.3000000392195252`, x3 \[Rule] 0.3000000392195252`}, {}, {}, {7.819019653965142`*^-9, \ \(-0.4000001490590813`\)}, {NLP`q1 \[Rule] 0.09000000738427882`, NLP`q2 \[Rule] 0.`}, {7.819019653965142`*^-9, 5.3349811191572556`*^-8, 7.037118265946841`*^-10}}\)], "Output"] }, Open ]] }, Open ]], Cell["\<\ (* as stated, problem is not really well formed; with x1 << 0, x2 << 0, and x3 == -x2, the minimum is unbounded, with no violations. Here, only KKT is violated, indicating we're not yet at the optimum. *)\ \>", "Input"], Cell[CellGroupData[{ Cell["\<\ f = -x1 x2 x3; h = {-1.8 + x1 + 2 x2 + 2 x3, x1-1}; g = {}; MultiplierMethod[f,g,h,{x1,x2,x3},{-1.,-1.,1.}, \tDualParameter -> True]\ \>", "Input", AspectRatioFixed->True], Cell[BoxData[ \(MultiplierMethod::"nonKKT" \(\(:\)\(\ \)\) "Karush-Kuhn-Tucker conditions not satisfied better than \ \!\(1.127775000486319886388492452639439`15.65355977452704*^313\)."\)], \ "Message"], Cell[BoxData[ \({\(-1.6614709563562361114198136`15.477468515471344*^469\), {x1 \[Rule] \ \(-2.5517076637344395`*^156\), x2 \[Rule] \(-2.5517076637344395`*^156\), x3 \[Rule] 2.5517076637344395`*^156}, {}, {}, {\(-2.551707663734439`*^156\), \ \(-2.5517076637344395`*^156\)}, {NLP`q1 \[Rule] 0.`, NLP`q2 \[Rule] 0.`}, {0.`, 1.127775000486319886388492452639439`15.65355977452704*^313, 0.`}}\)], "Output"] }, Open ]], Cell["\<\ (* make problem well formed by requiring non negative x *)\ \>", "Input"], Cell[CellGroupData[{ Cell["\<\ f = -x1 x2 x3; h = { \t-1.8 + x1 + 2 x2 + 2 x3, \tx1-1, \t-x1, \t-x2, \t-x3 }; g = {}; MultiplierMethod[f,g,h,{x1,x2,x3},{-1.,-1.,1.}, \tDualParameter -> True]\ \>", "Input", AspectRatioFixed->True], Cell[BoxData[ \({\(-0.054000000079441876`\), {x1 \[Rule] 0.5999999779777638`, x2 \[Rule] 0.3000000057262312`, x3 \[Rule] 0.3000000057262309`}, {}, {}, {8.826880337764464`*^-10, \ \(-0.40000002202223617`\), \(-0.5999999779777638`\), \ \(-0.3000000057262312`\), \(-0.3000000057262309`\)}, {NLP`q1 \[Rule] 0.08999999887273846`, NLP`q2 \[Rule] 0.`, NLP`q3 \[Rule] 0.`, NLP`q4 \[Rule] 0.`, NLP`q5 \[Rule] 0.`}, {8.826880337764464`*^-10, 4.743477921608182`*^-9, 7.944192204485991`*^-11}}\)], "Output"] }, Open ]], Cell["\<\ (* still can get into trouble with poor starting point in pre Mma 5.0 versions; notice how KKT almost satisfied; complementary slack violation indicates non-optimal solution *)\ \>", "Input"], Cell[CellGroupData[{ Cell["\<\ f = -x1 x2 x3; h = {-1.8 + x1 + 2 x2 + 2 x3, x1-1,-x1,-x2,-x3}; g = {}; MultiplierMethod[f,g,h,{x1,x2,x3},{-20.,-20.,20.}, \tDualParameter -> True]\ \>", "Input", AspectRatioFixed->True], Cell[BoxData[ \(MultiplierMethod::"nonadmissible" \(\(:\)\(\ \)\) "current point \!\(3.154030975253506`*^157\) from admissible."\)], \ "Message"], Cell[BoxData[ \(MultiplierMethod::"nonKKT" \(\(:\)\(\ \)\) "Karush-Kuhn-Tucker conditions not satisfied better than \ \!\(1.72302879616234755591666573`15.653559774527015*^315\)."\)], "Message"], Cell[BoxData[ \(MultiplierMethod::"nonslackness" \(\(:\)\(\ \)\) "complementary slackness not satisfied; slack violation is \ \!\(1.989594632389026238797764579`15.65355977452704*^316\)."\)], "Message"], Cell[BoxData[ \({\(-3.1376020672150849984635592952`15.477468515471342*^472\), {x1 \ \[Rule] \(-3.154030975253498`*^157\), x2 \[Rule] \(-3.154030975253506`*^157\), x3 \[Rule] 3.154030975253276`*^157}, {}, {}, {\(-3.154030975253957`*^157\), \ \(-3.154030975253498`*^157\), 3.154030975253498`*^157, 3.154030975253506`*^157, \(-3.154030975253276`*^157\)}, {NLP`q1 \ \[Rule] 0.`, NLP`q2 \[Rule] 0.`, NLP`q3 \[Rule] 3.1540505594259613`*^158, NLP`q4 \[Rule] 3.1540505594259696`*^158, NLP`q5 \[Rule] 0.`}, {3.154030975253506`*^157, 1.72302879616234755591666573`15.653559774527015*^315, 1.989594632389026238797764579`15.65355977452704*^316}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell["Another quadratic problem", "Subsubsection", Evaluatable->False, PageBreakBelow->Automatic, GroupPageBreakWithin->False, AspectRatioFixed->True], Cell[CellGroupData[{ Cell["\<\ f = 1/2 u0^2 + 1/6 (u1^2+u2^2+u3^2) ; u = {u0,u1,u2,u3}; g = {}; h = { \t- u0 + 2, \t- u0 - u1 + 5, \t- u0 - u2 + 2, \t- u0 - u3 + 1 }; MultiplierMethod[f,g,h,u,Table[2,{4}]] // Timing\ \>", "Input", AspectRatioFixed->True], Cell[BoxData[ \({0.1400000000000001`\ Second, {3.500000026155888`, {u0 \[Rule] 2.0000000332045724`, u1 \[Rule] 2.9999999597467424`, u2 \[Rule] \(-1.6797519340491301`*^-15\), u3 \[Rule] \(-1.679408579589263`*^-15\)}}}\)], "Output"] }, Open ]] }, Open ]], Cell["Problem WRIGHT9", "Subsubsection"], Cell["\<\ Taken from Yinyu Ye's SOLNP Users' Guide, page 12. SOLNP is an \ easy-to-use, fast, powerful, self-contained nonlinear (bound, equality, \ and/or inequality) constrained optimizer which runs in MATLAB and Octave; see \ http://dollar.biz.uiowa.edu/col/ye/matlab.html and \ ftp://dollar.biz.uiowa.edu/pub/yyye/matlab/manual.ps.\ \>", "SmallText"], Cell["\<\ x = {x1,x2,x3,x4,x5}; f =\t10*x1*x4 - 6*x3*x2^2 + x2*x1^3 + \t9*Sin[x5-x3] + x5^4*x4^2*x2^3 ; h = { x.x - 20, -( x1^2*x3 + x4*x5 +2 ), -( x2^2*x4 + 10*x1*x5 -5 ) } ;\ \>", "Input"], Cell["\<\ Use the default settings and the first starting point, and get a \ reasonable solution.\ \>", "SmallText"], Cell[CellGroupData[{ Cell["\<\ MultiplierMethod[f, {}, h, x, {1,1,1,1,1}, \tDualParameter->True]\ \>", "Input"], Cell[BoxData[ \(MultiplierMethod::"nonKKT" \(\(:\)\(\ \)\) "Karush-Kuhn-Tucker conditions not satisfied better than \ \!\(8.161253460358626`*^-6\)."\)], "Message"], Cell[BoxData[ \({\(-210.40781764129306`\), {x1 \[Rule] \(-0.08145184604664703`\), x2 \[Rule] 3.6923772790853593`, x3 \[Rule] 2.4874114147604587`, x4 \[Rule] 0.37713395935507554`, x5 \[Rule] 0.17398298762503855`}, {}, {}, {2.3892603420033742`*^-8, \ \(-2.0821173832939683`\), \(-3.883663876602661`*^-8\)}, {NLP`q1 \[Rule] 15.219805901494912`, NLP`q2 \[Rule] 0.`, NLP`q3 \[Rule] 0.7848285278450213`}, {2.3892603420033742`*^-8, 8.161253460358626`*^-6, 3.331606845051175`*^-7}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell["\<\ (* tweaked to clean up most of the violations in pre Mma 4.0 versions *) MultiplierMethod[f, {}, h, x, {1,1,1,1,1}, \tAugmentation -> 10, \tAugmentationGrowth -> 1.1, \tDualParameter->True]\ \>", "Input"], Cell[BoxData[ \(MultiplierMethod::"nonKKT" \(\(:\)\(\ \)\) "Karush-Kuhn-Tucker conditions not satisfied better than \ \!\(0.000012812117542202217`\)."\)], "Message"], Cell[BoxData[ \({\(-210.40781740897316`\), {x1 \[Rule] \(-0.08145215642290408`\), x2 \[Rule] 3.6923772917552036`, x3 \[Rule] 2.4874113927392743`, x4 \[Rule] 0.3771339815851522`, x5 \[Rule] 0.1739827901648036`}, {}, {}, {6.524370110144728`*^-9, \ \(-2.0821174383138987`\), 1.9664954387099698`*^-9}, {NLP`q1 \[Rule] 15.219806252314788`, NLP`q2 \[Rule] 0.`, NLP`q3 \[Rule] 0.7848289440451308`}, {6.524370110144728`*^-9, 0.000012812117542202217`, 1.0084301153342876`*^-7}}\)], "Output"] }, Open ]], Cell["\<\ Use other starting point, NB: must boost penalty to avoid \ infeasible solution.\ \>", "SmallText"], Cell["\<\ x0 ={ 1.091, -3.174, 1.214, -1.614, 2.134 } ;\ \>", "Input"], Cell[CellGroupData[{ Cell["\<\ (* tweaked to find a good value *) y = MultiplierMethod[f, {}, h, x, x0, \tAugmentation->10*10^3, \tDualParameter->True \t]\ \>", "Input"], Cell[BoxData[ \(MultiplierMethod::"nonKKT" \(\(:\)\(\ \)\) "Karush-Kuhn-Tucker conditions not satisfied better than \ \!\(0.0005596505456264665`\)."\)], "Message"], Cell[BoxData[ \({\(-2500.5844885324054`\), {x1 \[Rule] 1.4796332548851856`, x2 \[Rule] \(-2.636612496463156`\), x3 \[Rule] 1.054668323094635`, x4 \[Rule] \(-1.6115132458034414`\), x5 \[Rule] 2.6738847697159827`}, {}, {}, {3.260884895439631`*^-10, \ \(-1.0245511106177219`*^-9\), \(-23.360890595679976`\)}, {NLP`q1 \[Rule] 531.9625497622657`, NLP`q2 \[Rule] 493.6765968744885`, NLP`q3 \[Rule] 0.`}, {3.260884895439631`*^-10, 0.0005596505456264665`, 3.3233004126780207`*^-7}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell["\<\ (* alternate tweaked recipe to get good results *) z = MultiplierMethod[f, {}, h, x, x0, \tAugmentation->10^3, \tAugmentationGrowth->1.25, \tDualParameter->True, \tCheckConvergence->True \t]\ \>", "Input"], Cell[BoxData[ \(MultiplierMethod::"nonKKT" \(\(:\)\(\ \)\) "Karush-Kuhn-Tucker conditions not satisfied better than \ \!\(0.5057695083867347`\)."\)], "Message"], Cell[BoxData[ \(MultiplierMethod::"nonslackness" \(\(:\)\(\ \)\) "complementary slackness not satisfied; slack violation is \ \!\(0.00009680378245122815`\)."\)], "Message"], Cell[BoxData[ \({\(-2500.584576894952`\), {x1 \[Rule] 1.4796915657225704`, x2 \[Rule] \(-2.636563180276117`\), x3 \[Rule] 1.0546227875116767`, x4 \[Rule] \(-1.6115292830646064`\), x5 \[Rule] 2.6739094082937322`}, {}, {}, {\(-8.886641733596434`*^-8\), 2.918132491203096`*^-7, \(-23.36312193149253`\)}, {NLP`q1 \[Rule] 531.9194484406056`, NLP`q2 \[Rule] 493.7183578188663`, NLP`q3 \[Rule] 0.`}, {2.918132491203096`*^-7, 0.5057695083867347`, 0.00009680378245122815`}}\)], "Output"] }, Open ]], Cell["\<\ Notice that we can't make the penalty too big: if the penalty is \ too big, then there is miniscule advancement in pre Mma 5.0, and suboptimal \ solutions in all cases. Note how KKT condition violation indicates that \ there is a problem.\ \>", "SmallText"], Cell[CellGroupData[{ Cell[BoxData[ \(f\ /. \ \((Thread[x\ \[Rule] \ x0])\)\)], "Input"], Cell[BoxData[ \(\(-1815.4011074489613`\)\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell["\<\ y = MultiplierMethod[f, {}, h, x, x0, \tAugmentation->10^8, \tAugmentationGrowth->10, \tDualParameter->True ]\ \>", "Input"], Cell[BoxData[ \(MultiplierMethod::"nonKKT" \(\(:\)\(\ \)\) "Karush-Kuhn-Tucker conditions not satisfied better than \ \!\(324.7164916228839`\)."\)], "Message"], Cell[BoxData[ \({\(-213.21877354422818`\), {x1 \[Rule] 2.4478361988272934`, x2 \[Rule] \(-2.6883349577674616`\), x3 \[Rule] 1.8252583719787898`, x4 \[Rule] \(-0.7887422238514581`\), x5 \[Rule] 1.5678808210282895`}, {}, {}, {\(-0.36902040944301984`\), \ \(-11.700115586806982`\), \(-27.678799994337215`\)}, {NLP`q1 \[Rule] 0.`, NLP`q2 \[Rule] 0.`, NLP`q3 \[Rule] 0.`}, {0.`, 324.7164916228839`, 0.`}}\)], "Output"] }, Open ]], Cell["\<\ In pre Mma 5.0, we were able to locate another solution we happened \ upon when starting from an optimal solution.\ \>", "SmallText"], Cell["z2 = { 1.4796 , -2.6366, 1.0547, -1.6115, 2.6739 } ;", "Input"], Cell[CellGroupData[{ Cell[BoxData[ \({f, h}\ /. \ Thread[x\ -> z2]\)], "Input"], Cell[BoxData[ \({\(-2500.564878104287`\), {\(-0.0000587299999983415`\), 0.000023566048000134288`, \(-23.360425019060003`\)}}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell["\<\ (* tweaked to locate other root in pre Mma 5.0*) zz = MultiplierMethod[f, {}, h, x, z2, \tAugmentation->100, \tAugmentationGrowth->1.1, \tOuterIterations->60, \tDualParameter->True \t]\ \>", "Input"], Cell[BoxData[ \(MultiplierMethod::"nonadmissible" \(\(:\)\(\ \)\) "current point \ \!\(4.46518613790141287738950860485867`15.47746851547135*^938\) from \ admissible."\)], "Message"], Cell[BoxData[ \(MultiplierMethod::"nonKKT" \(\(:\)\(\ \)\) "Karush-Kuhn-Tucker conditions not satisfied better than \ \!\(1.2316726255301844507383797216`15.051499783198622*^2504\)."\)], "Message"], Cell[BoxData[ \(MultiplierMethod::"nonslackness" \(\(:\)\(\ \)\) "complementary slackness not satisfied; slack violation is \ \!\(5.5188369069878190052937758407181`15.109491730176787*^1881\)."\)], \ "Message"], Cell[BoxData[ \({\(-1.9383928812146002668485293316122`15.000347260751813*^2816\), {x1 \ \[Rule] 1.8778881868823285`, x2 \[Rule] \ \(-8.17764774267421338046398396464779`15.954589770191005*^312\), x3 \[Rule] 1.4648125687300584`, x4 \[Rule] \ \(-6.67702142192483111297085238019949`15.954589770191005*^312\), x5 \[Rule] 9.44273425114178385983888888012557`15.954589770191005*^312}, {}, \ {}, {2.0062176780979393678739157302`15.653559774526975*^626, 6.304933887641701896726776692`15.653559774526995*^625, 4.46518613790141287738950860485867`15.47746851547135*^938}, {NLP`q1 \ \[Rule] 5.55324043568773418986763219231055`15.477468515471344*^630, NLP`q2 \[Rule] 1.74521509761517073671509826470651`15.477468515471365*^630, NLP`q3 \[Rule] 1.235970178296219943340775503`15.352529778863024*^943}, \ {4.46518613790141287738950860485867`15.47746851547135*^938, 1.2316726255301844507383797216`15.051499783198622*^2504, 5.5188369069878190052937758407181`15.109491730176787*^1881}}\)], \ "Output"] }, Open ]], Cell["\<\ Demonstrate that we can get silly results; true solution is \ unbounded.\ \>", "Section"], Cell[CellGroupData[{ Cell["\<\ Clear[x]; MultiplierMethod[x, {}, {}, {x}, {0}]\ \>", "Input"], Cell[BoxData[ \(MultiplierMethod::"nonKKT" \(\(:\)\(\ \)\) "Karush-Kuhn-Tucker conditions not satisfied better than \!\(1\)."\)], \ "Message"], Cell[BoxData[ \({\(-5.476369923749287`*^43\), {x \[Rule] \ \(-5.476369923749287`*^43\)}}\)], "Output"] }, Open ]], Cell["The End", "Subsection"] }, FrontEndVersion->"5.0 for X", ScreenRectangle->{{0, 1024}, {0, 768}}, AutoGeneratedPackage->None, WindowToolbars->{}, CellGrouping->Manual, WindowSize->{494, 741}, WindowMargins->{{Automatic, 47}, {Automatic, 0}}, PrivateNotebookOptions->{"ColorPalette"->{RGBColor, -1}}, ShowCellLabel->True, ShowCellTags->False, RenderingOptions->{"ObjectDithering"->True, "RasterDithering"->False} ] (******************************************************************* Cached data follows. If you edit this Notebook file directly, not using Mathematica, you must remove the line containing CacheID at the top of the file. The cache data will then be recreated when you save this file from within Mathematica. *******************************************************************) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[1754, 51, 289, 9, 102, "Input", InitializationCell->True], Cell[2046, 62, 54, 1, 27, "Input"], Cell[2103, 65, 113, 2, 27, "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[2241, 71, 69, 1, 27, "Input"], Cell[2313, 74, 39, 1, 27, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[2389, 80, 41, 1, 27, "Input"], Cell[2433, 83, 69, 1, 27, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[2539, 89, 56, 1, 27, "Input"], Cell[2598, 92, 83, 1, 27, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[2718, 98, 192, 6, 57, "Input", InitializationCell->True], Cell[2913, 106, 146, 2, 29, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[3096, 113, 217, 6, 72, "Input"], Cell[3316, 121, 246, 4, 59, "Message"], Cell[3565, 127, 386, 6, 83, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[3988, 138, 195, 8, 102, "Input"], Cell[4186, 148, 413, 6, 79, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[4636, 159, 177, 7, 87, "Input"], Cell[4816, 168, 135, 2, 27, "Output"] }, Open ]], Cell[4966, 173, 152, 4, 57, "Input"], Cell[CellGroupData[{ Cell[5143, 181, 175, 7, 87, "Input"], Cell[5321, 190, 135, 2, 27, "Output"] }, Open ]], Cell[5471, 195, 66, 0, 27, "Input"], Cell[CellGroupData[{ Cell[5562, 199, 205, 9, 117, "Input"], Cell[5770, 210, 133, 2, 27, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[5940, 217, 186, 7, 72, "Input", InitializationCell->True], Cell[6129, 226, 73, 1, 27, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[6239, 232, 124, 2, 27, "Input", InitializationCell->True], Cell[6366, 236, 73, 1, 27, "Output"] }, Open ]], Cell[6454, 240, 81, 2, 38, "Subsection", Evaluatable->False], Cell[CellGroupData[{ Cell[6560, 246, 68, 1, 27, "Input"], Cell[6631, 249, 277, 4, 75, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[6945, 258, 83, 2, 28, "Subsubsection", Evaluatable->False], Cell[CellGroupData[{ Cell[7053, 264, 126, 6, 72, "Input"], Cell[7182, 272, 134, 2, 27, "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[7365, 280, 83, 2, 28, "Subsubsection", Evaluatable->False], Cell[CellGroupData[{ Cell[7473, 286, 132, 6, 72, "Input"], Cell[7608, 294, 135, 2, 27, "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[7792, 302, 83, 2, 28, "Subsubsection", Evaluatable->False], Cell[CellGroupData[{ Cell[7900, 308, 170, 6, 72, "Input"], Cell[8073, 316, 178, 3, 27, "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[8300, 325, 95, 2, 28, "Subsubsection", Evaluatable->False], Cell[CellGroupData[{ Cell[8420, 331, 149, 6, 72, "Input"], Cell[8572, 339, 182, 3, 45, "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[8803, 348, 114, 2, 28, "Subsubsection", Evaluatable->False], Cell[CellGroupData[{ Cell[8942, 354, 206, 7, 87, "Input"], Cell[9151, 363, 469, 8, 79, "Output"] }, Open ]] }, Open ]], Cell[9647, 375, 167, 5, 72, "Input"], Cell[CellGroupData[{ Cell[9839, 384, 231, 8, 102, "Input"], Cell[10073, 394, 457, 8, 79, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[10567, 407, 145, 5, 28, "Subsubsection", Evaluatable->False], Cell[CellGroupData[{ Cell[10737, 416, 213, 8, 102, "Input"], Cell[10953, 426, 183, 3, 46, "Message"], Cell[11139, 431, 535, 8, 115, "Output"] }, Open ]] }, Open ]], Cell[11701, 443, 171, 5, 44, "Subsubsection", Evaluatable->False], Cell[CellGroupData[{ Cell[11897, 452, 82, 2, 28, "Subsubsection", Evaluatable->False], Cell[CellGroupData[{ Cell[12004, 458, 161, 6, 72, "Input"], Cell[12168, 466, 182, 3, 29, "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[12399, 475, 82, 2, 28, "Subsubsection", Evaluatable->False], Cell[CellGroupData[{ Cell[12506, 481, 162, 6, 72, "Input"], Cell[12671, 489, 159, 2, 27, "Output"] }, Open ]] }, Open ]], Cell[12857, 495, 88, 3, 42, "Input"], Cell[CellGroupData[{ Cell[12970, 502, 161, 6, 72, "Input"], Cell[13134, 510, 150, 2, 27, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[13321, 517, 84, 2, 28, "Subsubsection", Evaluatable->False], Cell[CellGroupData[{ Cell[13430, 523, 204, 7, 87, "Input"], Cell[13637, 532, 344, 6, 63, "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[14030, 544, 84, 2, 28, "Subsubsection", Evaluatable->False], Cell[CellGroupData[{ Cell[14139, 550, 164, 6, 72, "Input"], Cell[14306, 558, 181, 3, 27, "Output"] }, Open ]], Cell[14502, 564, 124, 3, 57, "Input"], Cell[CellGroupData[{ Cell[14651, 571, 162, 6, 72, "Input"], Cell[14816, 579, 182, 3, 27, "Output"] }, Open ]], Cell[15013, 585, 97, 3, 42, "Input"], Cell[CellGroupData[{ Cell[15135, 592, 187, 7, 87, "Input"], Cell[15325, 601, 170, 3, 46, "Message"], Cell[15498, 606, 139, 2, 27, "Output"] }, Open ]], Cell[15652, 611, 63, 0, 27, "Input"], Cell[CellGroupData[{ Cell[15740, 615, 207, 7, 102, "Input"], Cell[15950, 624, 170, 2, 43, "Output"] }, Open ]] }, Open ]], Cell[16147, 630, 120, 3, 42, "Input"], Cell[CellGroupData[{ Cell[16292, 637, 205, 7, 102, "Input"], Cell[16500, 646, 183, 3, 43, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[16720, 654, 105, 2, 28, "Subsubsection", Evaluatable->False], Cell[CellGroupData[{ Cell[16850, 660, 185, 9, 117, "Input"], Cell[17038, 671, 178, 3, 27, "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[17265, 680, 84, 2, 28, "Subsubsection", Evaluatable->False], Cell[CellGroupData[{ Cell[17374, 686, 207, 12, 162, "Input"], Cell[17584, 700, 184, 3, 27, "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[17817, 709, 106, 2, 28, "Subsubsection", Evaluatable->False], Cell[CellGroupData[{ Cell[17948, 715, 167, 6, 72, "Input"], Cell[18118, 723, 153, 3, 33, "Message"], Cell[18274, 728, 179, 3, 43, "Output"] }, Open ]] }, Open ]], Cell[18480, 735, 66, 0, 27, "Input"], Cell[CellGroupData[{ Cell[18571, 739, 191, 7, 87, "Input"], Cell[18765, 748, 156, 3, 33, "Message"], Cell[18924, 753, 179, 3, 27, "Output"] }, Open ]], Cell[19118, 759, 113, 4, 57, "Input"], Cell[CellGroupData[{ Cell[19256, 767, 216, 7, 102, "Input"], Cell[19475, 776, 174, 3, 46, "Message"], Cell[19652, 781, 181, 3, 27, "Output"] }, Open ]], Cell[19848, 787, 192, 5, 72, "Input"], Cell[CellGroupData[{ Cell[20065, 796, 225, 8, 102, "Input"], Cell[20293, 806, 174, 3, 46, "Message"], Cell[20470, 811, 182, 3, 27, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[20689, 819, 104, 2, 28, "Subsubsection", Evaluatable->False], Cell[CellGroupData[{ Cell[20818, 825, 172, 6, 72, "Input"], Cell[20993, 833, 154, 3, 33, "Message"], Cell[21150, 838, 171, 3, 46, "Message"], Cell[21324, 843, 184, 3, 43, "Output"] }, Open ]], Cell[21523, 849, 66, 0, 27, "Input"], Cell[CellGroupData[{ Cell[21614, 853, 196, 7, 87, "Input"], Cell[21813, 862, 175, 3, 46, "Message"], Cell[21991, 867, 181, 3, 27, "Output"] }, Open ]] }, Open ]], Cell[22199, 874, 107, 3, 42, "Input"], Cell[CellGroupData[{ Cell[22331, 881, 199, 7, 87, "Input"], Cell[22533, 890, 174, 3, 46, "Message"], Cell[22710, 895, 181, 3, 27, "Output"] }, Open ]], Cell[22906, 901, 116, 4, 57, "Input"], Cell[CellGroupData[{ Cell[23047, 909, 197, 7, 87, "Input"], Cell[23247, 918, 173, 3, 46, "Message"], Cell[23423, 923, 183, 3, 27, "Output"] }, Open ]], Cell[23621, 929, 116, 4, 57, "Input"], Cell[CellGroupData[{ Cell[23762, 937, 203, 7, 87, "Input"], Cell[23968, 946, 171, 3, 46, "Message"], Cell[24142, 951, 184, 3, 27, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[24363, 959, 193, 6, 44, "Subsubsection", Evaluatable->False], Cell[CellGroupData[{ Cell[24581, 969, 231, 13, 192, "Input"], Cell[24815, 984, 209, 3, 43, "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[25073, 993, 103, 2, 28, "Subsubsection", Evaluatable->False], Cell[CellGroupData[{ Cell[25201, 999, 183, 7, 87, "Input"], Cell[25387, 1008, 404, 7, 63, "Output"] }, Open ]] }, Open ]], Cell[25818, 1019, 242, 6, 87, "Input"], Cell[CellGroupData[{ Cell[26085, 1029, 185, 7, 87, "Input"], Cell[26273, 1038, 212, 4, 46, "Message"], Cell[26488, 1044, 451, 8, 99, "Output"] }, Open ]], Cell[26954, 1055, 86, 3, 42, "Input"], Cell[CellGroupData[{ Cell[27065, 1062, 213, 13, 177, "Input"], Cell[27281, 1077, 557, 9, 95, "Output"] }, Open ]], Cell[27853, 1089, 211, 5, 72, "Input"], Cell[CellGroupData[{ Cell[28089, 1098, 200, 7, 87, "Input"], Cell[28292, 1107, 156, 3, 33, "Message"], Cell[28451, 1112, 204, 3, 46, "Message"], Cell[28658, 1117, 212, 3, 46, "Message"], Cell[28873, 1122, 724, 12, 155, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[29634, 1139, 158, 4, 28, "Subsubsection", Evaluatable->False, PageBreakBelow->Automatic], Cell[CellGroupData[{ Cell[29817, 1147, 242, 12, 162, "Input"], Cell[30062, 1161, 269, 4, 45, "Output"] }, Open ]] }, Open ]], Cell[30358, 1169, 40, 0, 28, "Subsubsection"], Cell[30401, 1171, 355, 6, 72, "SmallText"], Cell[30759, 1179, 212, 9, 132, "Input"], Cell[30974, 1190, 116, 3, 27, "SmallText"], Cell[CellGroupData[{ Cell[31115, 1197, 90, 3, 42, "Input"], Cell[31208, 1202, 174, 3, 46, "Message"], Cell[31385, 1207, 558, 9, 95, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[31980, 1221, 217, 7, 102, "Input"], Cell[32200, 1230, 176, 3, 46, "Message"], Cell[32379, 1235, 560, 10, 95, "Output"] }, Open ]], Cell[32954, 1248, 109, 3, 27, "SmallText"], Cell[33066, 1253, 118, 8, 117, "Input"], Cell[CellGroupData[{ Cell[33209, 1265, 149, 6, 87, "Input"], Cell[33361, 1273, 174, 3, 46, "Message"], Cell[33538, 1278, 558, 9, 95, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[34133, 1292, 217, 9, 132, "Input"], Cell[34353, 1303, 171, 3, 46, "Message"], Cell[34527, 1308, 183, 3, 46, "Message"], Cell[34713, 1313, 558, 9, 95, "Output"] }, Open ]], Cell[35286, 1325, 268, 5, 57, "SmallText"], Cell[CellGroupData[{ Cell[35579, 1334, 72, 1, 27, "Input"], Cell[35654, 1337, 58, 1, 27, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[35749, 1343, 135, 6, 87, "Input"], Cell[35887, 1351, 170, 3, 46, "Message"], Cell[36060, 1356, 473, 8, 91, "Output"] }, Open ]], Cell[36548, 1367, 143, 3, 42, "SmallText"], Cell[36694, 1372, 69, 0, 27, "Input"], Cell[CellGroupData[{ Cell[36788, 1376, 64, 1, 27, "Input"], Cell[36855, 1379, 151, 2, 27, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[37043, 1386, 210, 8, 117, "Input"], Cell[37256, 1396, 192, 4, 46, "Message"], Cell[37451, 1402, 207, 3, 46, "Message"], Cell[37661, 1407, 220, 4, 46, "Message"], Cell[37884, 1413, 1105, 21, 209, "Output"] }, Open ]], Cell[39004, 1437, 99, 3, 103, "Section"], Cell[CellGroupData[{ Cell[39128, 1444, 72, 3, 42, "Input"], Cell[39203, 1449, 153, 3, 33, "Message"], Cell[39359, 1454, 106, 2, 29, "Output"] }, Open ]], Cell[39480, 1459, 29, 0, 38, "Subsection"] } ] *) (******************************************************************* End of Mathematica Notebook file. *******************************************************************)