1+ \section {线性规划 }
2+
13\subsection {单纯形法 }
24
35\subsubsection {单纯形法求解 }
@@ -79,7 +81,7 @@ \subsubsection{单纯形法求解}
7981 \end {maxi* }
8082\end {problem }
8183\begin {solution }
82- 引入松弛变量,化为标准形式:
84+ 引入松弛变量$ x_ 4 ,x_ 5 ,x_ 6 $ ,化为标准形式:
8385 \begin {maxi* }|s|
8486 {}
8587 {-x_1 + 3x_2 + x_3 + 0x_4 + 0x_5 + 0x_6}
@@ -116,17 +118,7 @@ \subsubsection{单纯形法求解}
116118 \end {simplex }
117119 \end {center }
118120 故最优解$ (\frac {78}{25},\frac {114}{25},\frac {11}{10})$ ,最大值为
119- \begin {align* }
120- f_{max}&=-1\times\frac {78}{25}+3\times\frac {114}{25}+1\times\frac {11}{10}\\
121- &=\dfrac {-78+114\times 3}{25}+\dfrac {11}{10}\\
122- &=\dfrac {-78+342}{25}+\frac {11}{10}\\
123- &=\dfrac {264}{25}+\dfrac {11}{10}\\
124- &=\dfrac {264*4+110}{100}\\
125- &=\dfrac {1056+110}{100}\\
126- &=\dfrac {1166}{100}\\
127- &=\dfrac {583}{50}
128- \end {align* }
129-
121+ $$ f_{max}=-1 \times \frac {78}{25}+3 \times \frac {114}{25}+1 \times \frac {11}{10}=\dfrac {583}{50}$$
130122\end {solution }
131123\begin {problem }{1.4}
132124 \begin {mini* }|s|
@@ -142,7 +134,7 @@ \subsubsection{单纯形法求解}
142134\end {problem }
143135\begin {solution }
144136 求$ {3x_1 - 5x_2 - 2x_3 - x_4}$ 的最小解,即求$ {-3x_1 + 5x_2 + 2x_3 + x_4}$ 的最大解.\\
145- 引入松弛变量,化为标准形式:
137+ 引入松弛变量$ x_ 5 ,x_ 6 ,x_ 7 $ ,化为标准形式:
146138 \begin {maxi* }|s|
147139 {}
148140 {-3x_1 + 5x_2 + 2x_3 + x_4 + 0x_5 + 0x_6 + 0x_7}
@@ -190,7 +182,7 @@ \subsubsection{单纯形法求解}
190182\end {problem }
191183\begin {solution }
192184 求$ {-3x_1 - x_2}$ 的最小解,即求$ {3x_1 + x_2}$ 的最大解.\\
193- 引入松弛变量,化为标准形式:
185+ 引入松弛变量$ x_ 5 $ ,化为标准形式:
194186 \begin {maxi* }|s|
195187 {}
196188 {3x_1 + x_2 + 0x_3 + 0x_4 + 0x_5}
@@ -239,22 +231,24 @@ \subsubsection{转化为标准形式并列出单纯形表}
239231 \end {maxi* }
240232\end {problem }
241233\begin {solution }
234+ 标准形式要求$ b\geq 0 $ ,故约束条件二两边同乘-1,\\
235+ 引入松弛变量$ x_4 ,x_5 $ ,化为标准形式:
242236 \begin {maxi* }|s|
243237 {}
244238 {2x_1 - 2x_2 - 3x_3 + 0x_4 + 0x_5}
245239 {}
246240 {}
247- \addConstraint {2x_1 - x_2 + 2x_3 + x_4}{= 2}
248- \addConstraint {x_1 - 2x_2 + 3x_3 - x_5}{= 2}
241+ \addConstraint {2x_1 - x_2 + 2x_3 + x_4\ph }{= 2}
242+ \addConstraint {x_1 - 2x_2 + 3x_3 \ph - x_5}{= 2}
249243 \addConstraint {x_1, x_2, x_3,x_4,x_5}{\geq 0}{.}
250244 \end {maxi* }
251245 \begin {center }
252246 \begin {simplex }{}
253- c_j \rightarrow &&& 2 & -2 & -3 & 0 & 0 \\
254- C_B & X_B &b & x_1 & x_2 & x_3 & x_4 & x_5\\
255- 0 & x_4 &2 & 2 & -1 & 2 & 1 & 0 \\
256- 0 & x_5 &2 & 1 & -2 & 3 & 0 & -1 \\
257- c_j - z_j &&& 2 & -2 & -3 & 0 & 0 \\
247+ c_j \rightarrow &&& 2 & -2 & -3 & 0 & 0 \\
248+ C_B & X_B &b & x_1 & x_2 & x_3 & x_4 & x_5 \\
249+ 0 & x_4 &2 & 2 & -1 & 2 & 1 & 0 \\
250+ 0 & x_5 &2 & 1 & -2 & 3 & 0 & -1 \\
251+ c_j - z_j &&& 2 & -2 & -3 & 0 & 0 \\
258252 \end {simplex }
259253 \end {center }
260254\end {solution }
@@ -272,24 +266,30 @@ \subsubsection{转化为标准形式并列出单纯形表}
272266 \end {mini* }
273267\end {problem }
274268\begin {solution }
275- \begin {mini* }|s|
269+ 求原问题的最小解,即求$ 3 x_1 - 4 x_2 + 2 x_3 - 5 x_4 $ 最大解,\\
270+ 标准形式要求$ b\geq 0 $ ,故约束条件一两边同乘-1,\\
271+ 用非负变量之差$ x_5 -x_6 $ 代替$ x_4 $ ,引入松弛变量$ x_7 ,x_8 $ ,化为标准形式:
272+ \begin {maxi* }|s|
276273 {}
277- {- 3x_1 + 4x_2 - 2x_3 + 5x_5 - 5x_6 + 0x_7 + 0x_8}
274+ {3x_1 - 4x_2 + 2x_3 - 5x_5 + 5x_6 + 0x_7 + 0x_8}
278275 {}
279276 {}
280277 \addConstraint {-4x_1 + x_2 - 2x_3 + x_5 - x_6 \ph \ph }{=2}
281278 \addConstraint {x_1 + x_2 - x_3 + 2x_5 - 2x_6 + x_7 \ph }{= 14}
282279 \addConstraint {-2x_1 + 3x_2 + x_3 - x_5 + x_6 \ph - x_8}{= 2}
283280 \addConstraint {x_1, x_2, x_3,x_5,x_6,x_7,x_8}{\geq 0}{.}
284- \end {mini* }
281+ \end {maxi* }
282+ 为了列出单纯形表,需要化出一个基,引入人工变量$ x_9 $ ,以大M法求解
285283 \begin {center }
286- \begin {simplex }{}
287- c_j \rightarrow &&& -3 & 4 & -2 & 5 & -5 & 0 & 0 \\
288- C_B & X_B &b & x_1 & x_2 & x_3 & x_5 & x_6 & x_7 & x_8\\
289- 0 & x_3 &2 & -4 & 1 & -2 & 1 & -1 & 0 & 0 \\
290- 2 & x_4 &14 & 1 & 1 & -1 & 2 & -2 & 1 & 0 \\
291- 1 & x_5 &2 & -2 & 3 & 1 & -1 & 1 & 0 & -1 \\
292- c_j - z_j &&& 8 & 9 & 0 & 0 & 0 & 0 & 0 \\
284+ \begin {simplex }{
285+ columns={10mm}
286+ }
287+ c_j \rightarrow &&& 3 & -4 & 2 & -5 & 5 & 0 & 0 & -M \\
288+ C_B & X_B &b & x_1 & x_2 & x_3 & x_5 & x_6 & x_7 & x_8& x_9\\
289+ -M & x_9 &2 & -4 & 1 & -2 & 1 & -1 & 0 & 0 & 1 \\
290+ 0 & x_7 &14 & 1 & 1 & -1 & 2 & -2 & 1 & 0 & 0 \\
291+ 0 & x_8 &2 & -2 & 3 & 1 & -1 & 1 & 0 & -1 & 0 \\
292+ c_j - z_j &&& 3-4M& M-4 & 2-2M& M-5 & 5-M & 0 & 0 & 0 \\
293293 \end {simplex }
294294 \end {center }
295295\end {solution }
@@ -476,6 +476,7 @@ \subsubsection{分别用大M法与两阶段法求解并对比}
476476 (1)利用大M法求解:
477477 \begin {center }
478478 \begin {simplex }{
479+ columns={10mm},
479480 hline{6,7,10,11,14,15} = {0.08em},
480481 cell{6,10,14}{1} = {c=3,r=1}{c},
481482 }
@@ -588,11 +589,11 @@ \subsubsection{分别用大M法与两阶段法求解并对比}
588589 0 & x_2 &6/5 & 0 & 1 & -3/5& 0 & -4/5& 3/5 \\
589590 0 & x_4 &1 & 0 & 0 & 1 & 1 & 1 & -1 \\
590591 c_j - z_j &&& 0 & 0 & 0 & 0 & -1 & -1 \\
591- \end {simplex }
592- \begin {simplex }{
593- hline{6,7} = {0.08em},
594- cell{6}{1} = {c=3,r=1}{c},
595- }
592+ \end {simplex }
593+ \begin {simplex }{
594+ hline{6,7} = {0.08em},
595+ cell{6}{1} = {c=3,r=1}{c},
596+ }
596597 c_j \rightarrow &&& -4 & -1 & 0 & 0 \\
597598 C_B & X_B &b & x_1 & x_2 & x_3 & x_4 \\
598599 -4 & x_1 &3/5 & 1 & 0 & 1/5 & 0 \\
@@ -620,6 +621,34 @@ \subsubsection{不限方法求解}
620621 \addConstraint {x_1, x_2, x_3}{\geq 0}{.}
621622 \end {mini* }
622623\end {problem }
624+ \begin {solution }
625+ 引入松弛变量$ x_4 ,x_5 $ ,化为标准形式:
626+ \begin {maxi* }|s|
627+ {}
628+ {-4x_1 - 6x_2 - 18x_3 + 0x_4 + 0x_5}
629+ {}
630+ {}
631+ \addConstraint {x_1 \ph + 3x_3 - x_4\ph }{= 3}
632+ \addConstraint {\ph x_2 + 2x_3\ph - x_5}{= 5}
633+ \addConstraint {x_1, x_2, x_3, x_4, x_5}{\geq 0}{.}
634+ \end {maxi* }
635+ \begin {center }
636+ \begin {simplex }{
637+ hline{5,6} = {0.08em},
638+ cell{5}{1} = {c=3,r=1}{c},
639+ }
640+ c_j \rightarrow &&& -4 & -6 & -18 & 0 & 0 \\
641+ C_B & X_B &b & x_1 & x_2 & x_3 & x_4 & x_5 \\
642+ -4 & x_1 &3 & 1 & 0 & [3] & -1 & 0 \\
643+ -6 & x_2 &5 & 0 & 1 & 2 & 0 & -1 \\
644+ c_j - z_j &&& 0 & 0 & 6 & -4 & -6 \\
645+ -18 & x_3 &1 & 1/3 & 0 & 1 & -1/3& 0 \\
646+ -6 & x_2 &3 & -2/3& 1 & 0 & 2/3 & -1 \\
647+ c_j - z_j &&& -2 & 0 & 0 & -2 & -6 \\
648+ \end {simplex }
649+ \end {center }
650+ 故$ (0 ,3 ,1 )$ 为最优解,最小值为$ f_{min}=4 \times 0 +6 \times 3 +18 \times 1 =36 $ .
651+ \end {solution }
623652\begin {problem }{2.2}
624653 \begin {maxi* }|s|
625654 {}
@@ -766,7 +795,7 @@ \subsubsection{对偶理论基础}
766795 由互补松弛性$ (X_s^T\hat {Y} = 0 )$ 得
767796 $$ y_4 ^*=0 ,y_1 ^*,y_2 ^*,y_3 ^*>0 $$
768797 又因$ x_1 ^*,x_2 ^*,x_3 ^*>0 $ ,由互补松弛性$ (\hat {X^T}Y_s=0 )$ 得对偶问题的1、2、3个约束条件应满足严格等式,有
769- $$ \left \{
798+ $$ \left \{
770799 \begin {aligned}
771800 y_1 + 3 y_2 \ph &=8 \\
772801 2 y_1 + y_2 \ph &=6 \\
@@ -796,22 +825,22 @@ \subsubsection{对偶单纯形法求解}
796825\end {problem }
797826\begin {solution }
798827 \begin {center }
799- \begin {simplex }{
800- hline{5,6,8,9} = {0.08em},
801- cell{5,8}{1} = {c=3,r=1}{c},
802- }
803- c_j \rightarrow &&& -4 & -12 & -18 & 0 & 0 \\
804- C_B & X_B &b & x_1 & x_2 & x_3 & x_4 & x_5 \\
805- 0 & x_4 &-3 & -1 & 0 & -3 & 1 & 0 \\
806- 0 & x_5 &-5 & 0 & [-2]& -2 & 0 & 1 \\
807- c_j - z_j &&& -4 & -12 & -18 & 0 & 0 \\
808- 0 & x_4 &-3 & -1 & 0 & [-3]& 1 & 0 \\
809- -12 & x_2 &2/5 & 0 & 1 & 1 & 0 & -1/2\\
810- c_j - z_j &&& -4 & 0 & -6 & 0 & -6 \\
811- -18 & x_3 &1 & 1/3 & 0 & 1 & -1/3& 0 \\
812- -12 & x_2 &3/2 & -1/3& 1 & 0 & 1/3 & -1/2\\
813- c_j - z_j &&& -2 & 0 & 0 & -2 & -6 \\
814- \end {simplex }
828+ \begin {simplex }{
829+ hline{5,6,8,9} = {0.08em},
830+ cell{5,8}{1} = {c=3,r=1}{c},
831+ }
832+ c_j \rightarrow &&& -4 & -12 & -18 & 0 & 0 \\
833+ C_B & X_B &b & x_1 & x_2 & x_3 & x_4 & x_5 \\
834+ 0 & x_4 &-3 & -1 & 0 & -3 & 1 & 0 \\
835+ 0 & x_5 &-5 & 0 & [-2]& -2 & 0 & 1 \\
836+ c_j - z_j &&& -4 & -12 & -18 & 0 & 0 \\
837+ 0 & x_4 &-3 & -1 & 0 & [-3]& 1 & 0 \\
838+ -12 & x_2 &2/5 & 0 & 1 & 1 & 0 & -1/2\\
839+ c_j - z_j &&& -4 & 0 & -6 & 0 & -6 \\
840+ -18 & x_3 &1 & 1/3 & 0 & 1 & -1/3& 0 \\
841+ -12 & x_2 &3/2 & -1/3& 1 & 0 & 1/3 & -1/2\\
842+ c_j - z_j &&& -2 & 0 & 0 & -2 & -6 \\
843+ \end {simplex }
815844 \end {center }
816845
817846 故$ (0 ,\frac {3}{2},1 )$ 为最优解,最小值为$ f_{min}=4 \times 0 +12 \times \frac {3}{2}+18 \times 1 =36 $ .
@@ -1016,7 +1045,7 @@ \subsubsection{对偶单纯形法求解}
10161045\end {problem }
10171046\begin {solution }
10181047 利用等式约束条件,构造可行基,改造原问题为:
1019- \begin {maxi* }|s|
1048+ \begin {maxi* }|s|
10201049 {}
10211050 {-4x_1 - 3x_2 - 5x_3 - x_4 - 2x_5}
10221051 {}
0 commit comments