📄 project.nb
字号:
TagBox[GridBox[{
{"0.1480302006448057`"},
{"0.9204499503293164`"},
{"0.6671062014556247`"},
{"1.0613640878149637`"}
},
RowSpacings->1,
ColumnAlignments->{Left}],
Column], "\[NoBreak]", ")"}],
Function[ BoxForm`e$,
MatrixForm[ BoxForm`e$]]]], "Output"]
}, Open ]],
Cell[CellGroupData[{
Cell[BoxData[
\(\(\( (*\
lam\^\((k + 1)\) =
lam\^\((k)\) +
2 p\^\((k)\)*\[CurlyPhi] \((x\^\((k)\))\), \[CurlyPhi] \((x)\) =
max[g \((x)\), \(-\(lam\/\(2*
p\)\)\)], \:8fdb\:884c\:7b2c\:4e8c\:6b21\:8ba1\:7b97*) \)\(\
\[IndentingNewLine]\)\(\(L1 =
L1 + 2\ *\
P\ *\ \ Max[g1[x0], \(-\(L1\/\(2*\ P\)\)\)];\)\[IndentingNewLine]
\(L2 =
L2 + 2\ *\
P\ *\ \ Max[g2[x0], \(-\(L2\/\(2*\ P\)\)\)];\)\[IndentingNewLine]
\(L3 =
L3 + 2\ *\
P\ *\ \ Max[g3[x0], \(-\(L3\/\(2*\ P\)\)\)];\)\[IndentingNewLine]
\(L4 =
L4 + 2\ *\
P\ *\ \ Max[g4[x0], \(-\(L4\/\(2*\ P\)\)\)];\)\[IndentingNewLine]
\(L5 =
L5 + 2\ *\
P\ *\ \ Max[g5[x0], \(-\(L5\/\(2*\ P\)\)\)];\)\[IndentingNewLine]
\(L6 =
L6 + 2\ *\
P\ *\ \ Max[g6[x0], \(-\(L6\/\(2*\ P\)\)\)];\)\[IndentingNewLine]
\(L7 =
L7 + 2\ *\
P\ *\ \ Max[g7[x0], \(-\(L7\/\(2*\ P\)\)\)];\)\[IndentingNewLine]
\(L8 =
L8 + 2\ *\
P\ *\ \ Max[g8[x0], \(-\(L8\/\(2*\ P\)\)\)];\)\[IndentingNewLine]
\(L9 =
L9 + 2\ *\
P\ *\ \ Max[g9[x0], \(-\(L9\/\(2*\ P\)\)\)];\)\[IndentingNewLine]
\(P = \ 1.1\ *\ P;\)\[IndentingNewLine]
\(augmented =
AugmentedLagrangian\ /. \ {lam1 -> \ L1, \ lam2 -> L2, \
lam3 -> L3, \ lam4 -> L4, \ lam5 -> L5, \ lam6 -> L6, \
lam7 -> L7, \ lam8 -> L8, \ lam9 -> L9,
penalty -> P};\)\[IndentingNewLine]
\(lastPt =
SequentialSimplex[augmented, dvX, x0, size, PlotHistory \[Rule] True,
MaxIterations \[Rule] 10,
Epsilon \[Rule] 1\/10\^2];\)\[IndentingNewLine]
x0 = \(Last[
lastPt]\)\[LeftDoubleBracket]3\[RightDoubleBracket]\)\)\)], "Input"],
Cell[BoxData[
TagBox[
RowBox[{"(", "\[NoBreak]",
TagBox[GridBox[{
{"0.10472328219934224`"},
{"0.9668692890913018`"},
{"0.42453707544556707`"},
{"1.1845708035964253`"}
},
RowSpacings->1,
ColumnAlignments->{Left}],
Column], "\[NoBreak]", ")"}],
Function[ BoxForm`e$,
MatrixForm[ BoxForm`e$]]]], "Output"]
}, Open ]],
Cell[CellGroupData[{
Cell[BoxData[
\(\(\( (*\:8fdb\:884c\:7b2c\:4e09\:6b21\:8ba1\:7b97*) \)\(\
\[IndentingNewLine]\)\(\(L1 =
L1 + 2\ *\
P\ *\ \ Max[g1[x0], \(-\(L1\/\(2*\ P\)\)\)];\)\[IndentingNewLine]
\(L2 =
L2 + 2\ *\
P\ *\ \ Max[g2[x0], \(-\(L2\/\(2*\ P\)\)\)];\)\[IndentingNewLine]
\(L3 =
L3 + 2\ *\
P\ *\ \ Max[g3[x0], \(-\(L3\/\(2*\ P\)\)\)];\)\[IndentingNewLine]
\(L4 =
L4 + 2\ *\
P\ *\ \ Max[g4[x0], \(-\(L4\/\(2*\ P\)\)\)];\)\[IndentingNewLine]
\(L5 =
L5 + 2\ *\
P\ *\ \ Max[g5[x0], \(-\(L5\/\(2*\ P\)\)\)];\)\[IndentingNewLine]
\(L6 =
L6 + 2\ *\
P\ *\ \ Max[g6[x0], \(-\(L6\/\(2*\ P\)\)\)];\)\[IndentingNewLine]
\(L7 =
L7 + 2\ *\
P\ *\ \ Max[g7[x0], \(-\(L7\/\(2*\ P\)\)\)];\)\[IndentingNewLine]
\(L8 =
L8 + 2\ *\
P\ *\ \ Max[g8[x0], \(-\(L8\/\(2*\ P\)\)\)];\)\[IndentingNewLine]
\(L9 =
L9 + 2\ *\
P\ *\ \ Max[g9[x0], \(-\(L9\/\(2*\ P\)\)\)];\)\[IndentingNewLine]
\(P = \ 1.1\ *\ P;\)\[IndentingNewLine]
\(augmented =
AugmentedLagrangian\ /. \ {lam1 -> \ L1, \ lam2 -> L2, \
lam3 -> L3, \ lam4 -> L4, \ lam5 -> L5, \ lam6 -> L6, \
lam7 -> L7, \ lam8 -> L8, \ lam9 -> L9,
penalty -> P};\)\[IndentingNewLine]
\(lastPt =
SequentialSimplex[augmented, dvX, x0, size, PlotHistory \[Rule] True,
MaxIterations \[Rule] 10,
Epsilon \[Rule] 1\/10\^2];\)\[IndentingNewLine]
x0 = \(Last[
lastPt]\)\[LeftDoubleBracket]3\[RightDoubleBracket]\)\)\)], "Input"],
Cell[BoxData[
TagBox[
RowBox[{"(", "\[NoBreak]",
TagBox[GridBox[{
{"0.09299057950198752`"},
{"0.9293796694620544`"},
{"0.33511930157293246`"},
{"1.244308366380328`"}
},
RowSpacings->1,
ColumnAlignments->{Left}],
Column], "\[NoBreak]", ")"}],
Function[ BoxForm`e$,
MatrixForm[ BoxForm`e$]]]], "Output"]
}, Open ]],
Cell[BoxData[
\(\(\( (*\:6309\:7167\:4e0a\:9762\:7684\:683c\:5f0f\:91cd\:590d\:8ba1\
\:7b97100\:6b21*) \)\(\[IndentingNewLine]\)\(Do[\((x0 = \(Last[
lastPt]\)\[LeftDoubleBracket]3\[RightDoubleBracket]; \
\[IndentingNewLine]L1 =
L1 + 2\ *\
P\ *\ \ Max[
g1[x0], \(-\(L1\/\(2*\ P\)\)\)]; \[IndentingNewLine]L2 =
L2 + 2\ *\
P\ *\ \ Max[
g2[x0], \(-\(L2\/\(2*\ P\)\)\)]; \[IndentingNewLine]L3 =
L3 + 2\ *\
P\ *\ \ Max[
g3[x0], \(-\(L3\/\(2*\ P\)\)\)]; \[IndentingNewLine]L4 =
L4 + 2\ *\
P\ *\ \ Max[
g4[x0], \(-\(L4\/\(2*\ P\)\)\)]; \[IndentingNewLine]L5 =
L5 + 2\ *\
P\ *\ \ Max[
g5[x0], \(-\(L5\/\(2*\ P\)\)\)]; \[IndentingNewLine]L6 =
L6 + 2\ *\
P\ *\ \ Max[
g6[x0], \(-\(L6\/\(2*\ P\)\)\)]; \[IndentingNewLine]L7 =
L7 + 2\ *\
P\ *\ \ Max[
g7[x0], \(-\(L7\/\(2*\ P\)\)\)]; \[IndentingNewLine]L8 =
L8 + 2\ *\
P\ *\ \ Max[
g8[x0], \(-\(L8\/\(2*\ P\)\)\)]; \[IndentingNewLine]L9 =
L9 + 2\ *\
P\ *\ \ Max[
g9[x0], \(-\(L9\/\(2*\ P\)\)\)]; \[IndentingNewLine]P = \
1.1\ *\ P; \[IndentingNewLine]augmented =
AugmentedLagrangian\ /. \ {lam1 -> \ L1, \ lam2 -> L2, \
lam3 -> L3, \ lam4 -> L4, \ lam5 -> L5, \ lam6 -> L6, \
lam7 -> L7, \ lam8 -> L8, \ lam9 -> L9, \
penalty -> P}; \[IndentingNewLine]lastPt =
SequentialSimplex[augmented, dvX, x0, size,
PlotHistory \[Rule] True, MaxIterations \[Rule] 10,
Epsilon \[Rule] 1\/10\^2])\), {100}];\)\)\)], "Input"],
Cell[CellGroupData[{
Cell[BoxData[
\(\(\( (*\:663e\:793a\:6b64\:65f6\:672a\:77e5\:91cf\:7684\:503c*) \)\(\
\[IndentingNewLine]\)\(x0\)\)\)], "Input"],
Cell[BoxData[
TagBox[
RowBox[{"(", "\[NoBreak]",
TagBox[GridBox[{
{"0.18780790007881445`"},
{"1.0520177369899173`"},
{"0.33385547998257836`"},
{"1.9026013189214872`"}
},
RowSpacings->1,
ColumnAlignments->{Left}],
Column], "\[NoBreak]", ")"}],
Function[ BoxForm`e$,
MatrixForm[ BoxForm`e$]]]], "Output"]
}, Open ]],
Cell[CellGroupData[{
Cell[BoxData[
\(\(\( (*\:8ba1\:7b97\:6b64\:65f6\:518d\:73b0\:51fd\:6570\:548c\:76ee\
\:6807\:51fd\:6570\:4e4b\:95f4\:7684\:504f\:5dee*) \)\(\[IndentingNewLine]\)\(\
fobj[x0]\)\)\)], "Input"],
Cell[BoxData[
\(0.0024049928916121204`\)], "Output"]
}, Open ]],
Cell[BoxData[
\(\:6211\:4eec\:53ef\:4ee5\:770b\:51fa, \:5f53l1 = 0.187808,
l2 = 1.05202, l3 = 0.333855,
l4 = 1, \[Alpha] =
1.9026 \:65f6, \:603b\:504f\:5dee\:4e3a0 \( \(.00240499\)\(.\)\)\)], \
"Input"]
},
FrontEndVersion->"5.2 for Microsoft Windows",
ScreenRectangle->{{0, 1280}, {0, 714}},
WindowSize->{1039, 602},
WindowMargins->{{30, Automatic}, {Automatic, 17}}
]
(*******************************************************************
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, 3172, 58, 415, "Input"],
Cell[4929, 111, 1837, 37, 230, "Input"],
Cell[6769, 150, 352, 6, 50, "Input"],
Cell[7124, 158, 1924, 41, 250, "Input"],
Cell[9051, 201, 390, 6, 70, "Input"],
Cell[9444, 209, 280, 5, 70, "Input"],
Cell[CellGroupData[{
Cell[9749, 218, 244, 5, 70, "Input"],
Cell[9996, 225, 606, 16, 121, "Output"]
}, Open ]],
Cell[CellGroupData[{
Cell[10639, 246, 268, 6, 90, "Input"],
Cell[10910, 254, 377, 13, 73, "Output"],
Cell[11290, 269, 375, 13, 73, "Output"]
}, Open ]],
Cell[CellGroupData[{
Cell[11702, 287, 309, 6, 63, "Input"],
Cell[12014, 295, 438, 13, 73, "Output"]
}, Open ]],
Cell[CellGroupData[{
Cell[12489, 313, 1868, 45, 465, "Input"],
Cell[14360, 360, 440, 13, 73, "Output"]
}, Open ]],
Cell[CellGroupData[{
Cell[14837, 378, 1672, 40, 459, "Input"],
Cell[16512, 420, 439, 13, 73, "Output"]
}, Open ]],
Cell[16966, 436, 1921, 39, 465, "Input"],
Cell[CellGroupData[{
Cell[18912, 479, 132, 2, 50, "Input"],
Cell[19047, 483, 440, 13, 73, "Output"]
}, Open ]],
Cell[CellGroupData[{
Cell[19524, 501, 194, 3, 50, "Input"],
Cell[19721, 506, 56, 1, 29, "Output"]
}, Open ]],
Cell[19792, 510, 224, 5, 30, "Input"]
}
]
*)
(*******************************************************************
End of Mathematica Notebook file.
*******************************************************************)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -