本文主要是介绍AI理论随笔-最优化(4),希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
单纯形法(1):
以下列规划问题为例:
m a x z = 12 x 4 + 5 x 5 s . t . { x 1 + x 2 + x 3 + x 4 + x 5 = 17 2 x 1 + 3 x 2 + x 3 + 7 x 4 + 4 x 5 = 18 x 2 + x 3 + 3 x 4 + 4 x 5 = 6 5 x 1 + 4 x 2 + x 3 + 5 x 4 − 2 x 5 = 32 x j ≥ 0 ( j = 1 , 2 , . . . , 5 ) max\ z=12x_4+5x_5\\ s.t.\left\{ \begin{array}{l} x_1+x_2+x_3+x_4+x_5=17\\ 2x_1+3x_2+x_3+7x_4+4x_5=18\\ x_2+x_3+3x_4+4x_5=6\\ 5x_1+4x_2+x_3+5x_4-2x_5=32\\ x_j \geq 0 (j=1,2,...,5) \end{array} \right. max z=12x4+5x5s.t.⎩⎪⎪⎪⎪⎨⎪⎪⎪⎪⎧x1+x2+x3+x4+x5=172x1+3x2+x3+7x4+4x5=18x2+x3+3x4+4x5=65x1+4x2+x3+5x4−2x5=32xj≥0(j=1,2,...,5)
( A : b ) = [ 1 1 1 1 1 7 2 3 1 7 4 18 0 1 1 3 4 6 5 4 1 5 − 2 32 ] r 1 × ( − 2 ) + r 2 r 1 × ( − 5 ) + r 4 → [ 1 1 1 1 1 7 0 1 − 1 5 2 4 0 1 1 3 4 6 0 − 1 − 4 0 − 7 − 3 ] (A:b)=\begin{bmatrix} 1 & 1&1&1&1&7\\ 2& 3&1&7&4 &18\\ 0&1&1&3&4&6\\5&4&1&5&-2&32 \end {bmatrix} \overrightarrow{r_1\times (-2)+r2 \quad\quad r_1\times (-5)+r4}\\ \begin{bmatrix} 1 & 1&1&1&1&7\\ 0& 1&-1&5&2&4\\ 0&1&1&3&4&6\\0&-1&-4&0&-7&-3 \end {bmatrix} (A:b)=⎣⎢⎢⎡1205131411111735144−2718632
这篇关于AI理论随笔-最优化(4)的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!