2005-2-4 08:09
lcarron78
[quote]原帖由[i]天痕[/i]于2005-02-03, 7:21:16发表
[quote]原帖由[i]lcarron78[/i]于2005-02-03, 7:15:14发表
z      =      -30.750
x1    =        4.000
x2    =        3.750
x3    =        0.000 [/quote]
正确
不过请给过程~~ [/quote]
用电脑做的。
其实就是用解带条件的 Lagrangian 的方法做。
min z = max -z
把所有的条件写成<=0的形式。
L = (3x1+5x2+2x3) + a(x1+2x2+2x3-14) + b(2x1+4x2+3x3-23) + c(x1-4)
+ d(x2-5) + e(x3-3) + f(0-x1) + g(2-x2) + h(0-x3)
a to h 是 Lagrangian multipliers, >=0.
令,dL/dx1 to dL/dx3, dL/da to dL/dh 均为零。解方程。
2005-2-7 06:02
lcarron78
是解不等方程组吧?
用 Lagrangian 是因为习惯了, 而且还从未解过不等方程组呢
现在试一试。
minz=-3x1-5x2-2x3 = max 3x1+5x2+2x3 , 尽量取最大值
x1+2x2+2x3=14 (1)
2x1+4x2+3x3=23 (2)
==> x3=5>3, 所以最多只有(2)成立
max 点在顶点, 即所有不等式中至少有两个是等的。
如x1=4,
=> max 12+5x2+2x3,
and 4x2+3x3=15, (2) =>8/3*x2+2x3=10, => max 12+10+7/3*x2,
=> (10 - 2*0)/(8/3)=3.75 => z=30.75
如x2=5,
=> max 3x1+25+2x3,
and 2x1+3x3=3, (2) =>4/3*x2+2x3=2, => max 25+2+5/3*x1,
=> (2 - 2*0)/(4/3)=3/2=> z=29.5<30.75
如x3=3,
=> max 3x1+5x2+6,
and x1+2x2=7, (2) =>2.5*x1+5x2=17.5, => max 17.5+6+0.5*x1,
=> (17.5 - 5*2)/2.5=3 => z=25<30.75