最优化——单纯形法,单纯形表的求取 -凯发k8官方网
一般性线性规划标准型为对象总结其基本步骤
maxzs.t. p1x1 p2x2 ⋯ pnxn=b⃗−−−(1)c1x1 c2x2 ⋯ cnxn=z−−−(2)xj≥0,∀1≤j≤n\begin{array}{ll} \max & z \\ \text { s.t. } & p_{1} x_{1} p_{2} x_{2} \cdots p_{n} x_{n}=\vec{b}---(1) \\ & c_{1} x_{1} c_{2} x_{2} \cdots c_{n} x_{n}=z ---(2)\\ & x_{j} \geq 0, \forall 1 \leq j \leq n \end{array} max s.t. zp1x1p2x2⋯pnxn=b−−−(1)c1x1c2x2⋯cnxn=z−−−(2)xj≥0,∀1≤j≤n
步骤一:求广义基本可行解
已知一个可逆方阵 b=(pj(1),pj(2),⋯,pj(m))b=\left(p_{j(1)}, p_{j(2)}, \cdots, p_{j(m)}\right)b=(pj(1),pj(2),⋯,pj(m)) 满足
b−1b⃗≥0b^{-1} \vec{b} \geq 0 b−1b≥0
其中 1≤j(i)≤n,∀1≤i≤m,1 \leq j(i) \leq n, \forall 1 \leq i \leq m,1≤j(i)≤n,∀1≤i≤m, 即 bbb 是线性规划标准型 的可行基阵
由bbb可以把线性约束(1)p1x1 p2x2 ⋯ pnxn=b⃗p_{1} x_{1} p_{2} x_{2} \cdots p_{n} x_{n}=\vec{b}p1x1p2x2⋯pnxn=b改写为
⇔(pj(1),⋯,pj(m))(xj(1)⋮xj(m)) pj(m 1)xj(m 1) ⋯ pj(n)xj(n)=b⃗⇔(xj(1)⋮xj(m)) (b−1pj(m 1))xj(m 1) ⋯ (b−1pj(n))xj(n)=b−1b⃗\begin{array}{l} \leftrightarrow\left(p_{j(1)}, \cdots, p_{j(m)}\right)\left(\begin{array}{c} x_{j(1)} \\ \vdots \\ x_{j(m)} \end{array}\right) p_{j(m 1)} x_{j(m 1)} \cdots p_{j(n)} x_{j(n)}=\vec{b} \\ \leftrightarrow \quad\left(\begin{array}{c} x_{j(1)} \\ \vdots \\ x_{j(m)} \end{array}\right) \left(b^{-1} p_{j(m 1)}\right) x_{j(m 1)} \cdots \left(b^{-1} p_{j(n)}\right) x_{j(n)}=b^{-1} \vec{b} \end{array} ⇔(pj(1),⋯,pj(m))⎝⎜⎛xj(1)⋮xj(m)⎠⎟⎞pj(m1)xj(m1)⋯pj(n)xj(n)=b⇔⎝⎜⎛xj(1)⋮xj(m)⎠⎟⎞(b−1pj(m1))xj(m1)⋯(b−1pj(n))xj(n)=b−1b
可以得到一个基本可行解x=(x1...xn)tx=(x_1...x_n)^tx=(x1...xn)t的表达式:
xb=(xj(1)⋮xj(m)),(xj(m 1)...xj(n))=0x_{b}=\left(\begin{array}{c}x_{j(1)} \\ \vdots \\ x_{j(m)}\end{array}\right),(x_{j(m 1)}...x_{j(n)})=0xb=⎝⎜⎛xj(1)⋮xj(m)⎠⎟⎞,(xj(m1)...xj(n))=0
对应线性约束的表达式变为如下:
xb p^j(m 1)xj(m 1) ⋯ p^j(n)xj(n)=p^n 1−−−(3)x_{b} \hat{p}_{j(m 1)} x_{j(m 1)} \cdots \hat{p}_{j(n)} x_{j(n)}=\hat{p}_{n 1}---(3) xbp^j(m1)xj(m1)⋯p^j(n)xj(n)=p^n1−−−(3)
其中p^j=b−1pj=(p^1j⋮p^mj),∀1≤j≤n,p^n 1=b−1b⃗\hat p_j=b^{-1}p_j=\left(\begin{array}{c}\hat{p}_{1 j} \\ \vdots \\ \hat{p}_{m j}\end{array}\right), \forall 1 \leq j \leq n,\hat{p}_{n 1}=b^{-1} \vec{b}p^j=b−1pj=⎝⎜⎛p^1j⋮p^mj⎠⎟⎞,∀1≤j≤n,p^n1=b−1b
步骤二:求检验数
记 cb=(cj(1),⋯,cj(m))t,c_{b}=\left(c_{j(1)}, \cdots, c_{j(m)}\right)^{t},cb=(cj(1),⋯,cj(m))t,
用cbc_{b}cb左乘(3) 得 cbtxb cbtp^j(m 1)xj(m 1) ⋯ cbtp^j(n)xj(n)=cbtp^n 1−−−(4)c_{b}^{t} x_{b} c_{b}^{t} \hat{p}_{j(m 1)} x_{j(m 1)} \cdots c_{b}^{t} \hat{p}_{j(n)} x_{j(n)}=c_{b}^{t} \hat{p}_{n 1}---(4)cbtxbcbtp^j(m1)xj(m1)⋯cbtp^j(n)xj(n)=cbtp^n1−−−(4)
目标函数(2)用cbc_{b}cb可以写成: cbtxb cj(m 1)xj(m 1) ⋯ cj(n)xj(n)=z−−−(5)c_{b}^{t} x_{b} c_{j(m 1)} x_{j(m 1)} \cdots c_{j(n)} x_{j(n)}=z---(5)cbtxbcj(m1)xj(m1)⋯cj(n)xj(n)=z−−−(5)
用(5)-(4)得:
z−cbtp^n 1=(cj(m 1)−cbtp^j(m 1))xj(m 1) ⋯ (cj(n)−cbtp^j(n))xj(n)−−−(6)z−z^=σj(m 1)xj(m 1) ⋯ σj(n)xj(n)−−−(7)\begin{array}{c} z-c_{b}^{t} \hat{p}_{n 1}=\left(c_{j(m 1)}-c_{b}^{t} \hat{p}_{j(m 1)}\right) x_{j(m 1)} \cdots \left(c_{j(n)}-c_{b}^{t} \hat{p}_{j(n)}\right) x_{j(n)}---(6) \\ z-\hat{z}=\sigma_{j(m 1)} x_{j(m 1)} \cdots \sigma_{j(n)} x_{j(n)}---(7) \end{array}z−cbtp^n1=(cj(m1)−cbtp^j(m1))xj(m1)⋯(cj(n)−cbtp^j(n))xj(n)−−−(6)z−z^=σj(m1)xj(m1)⋯σj(n)xj(n)−−−(7)
cbtp^n 1c_{b}^{t} \hat{p}_{n 1}cbtp^n1就是第一步中xxx所求得的一个可行基本解的目标函数值z^\hat{z}z^,这个可以把xb=(xj(1)⋮xj(m)),(xj(m 1)...xj(n))=0x_{b}=\left(\begin{array}{c}x_{j(1)} \\ \vdots \\ x_{j(m)}\end{array}\right),(x_{j(m 1)}...x_{j(n)})=0xb=⎝⎜⎛xj(1)⋮xj(m)⎠⎟⎞,(xj(m1)...xj(n))=0带入(4)和(5)就可以看出来。
步骤三:得到单纯形表
其中 (p^j(1),⋯,p^j(m))=im,z^=cbtp^n 1=cbtb−1b⃗\left(\hat{p}_{j(1)}, \cdots, \hat{p}_{j(m)}\right)=i_{m}, \hat{z}=c_{b}^{t} \hat{p}_{n 1}=c_{b}^{t} b^{-1} \vec{b}(p^j(1),⋯,p^j(m))=im,z^=cbtp^n1=cbtb−1b
σj=cj−cbtp^j=cj−cbtb−1pj,∀1≤j≤n\sigma_{j}=c_{j}-c_{b}^{t} \hat{p}_{j}=c_{j}-c_{b}^{t} b^{-1} p_{j}, \quad \forall 1 \leq j \leq nσj=cj−cbtp^j=cj−cbtb−1pj,∀1≤j≤n
称 σ1,⋯,σn\sigma_{1}, \cdots, \sigma_{n}σ1,⋯,σn 为检验数,可看出基变量检验数等于0
总结
以上是凯发k8官方网为你收集整理的最优化——单纯形法,单纯形表的求取的全部内容,希望文章能够帮你解决所遇到的问题。
- 上一篇: 最优化——线性规划中最大规划和最小规划之
- 下一篇: 强化学习4——无模型预测(蒙特卡洛法和t