方法一
(一)求R1
max 4.8x11+4.8x21+5.6x12+5.6x22-10x
st
x11+x12-x<500
x21+x22<1000
0.5x11-0.5x21>0
0.4x12-0.6x22>0
x<500
end
LP OPTIMUM FOUND AT STEP 4
OBJECTIVE FUNCTION VALUE
1) 4800.000
VARIABLE VALUE REDUCED COST
X11 500.000000 0.000000
X21 500.000000 0.000000
X12 0.000000 0.266667
X22 0.000000 0.000000
X 0.000000 0.400000
ROW SLACK OR SURPLUS DUAL PRICES
2) 0.000000 9.600000
3) 500.000000 0.000000
4) 0.000000 -9.600000
5) 0.000000 -9.333333
6) 500.000000 0.000000
NO,ITERATIONS= 4
(二)求R2
max 4.8x11+4.8x21+5.6x12+5.6x22-8x
st
x11+x12-x<500
x21+x22<1000
0.5x11-0.5x21>0
0.4x12-0.6x22>0
x>500
x<1000
4.8x11+4.8x21+5.6x12+5.6x22-8x-r2=1000
end
LP OPTIMUM FOUND AT STEP 7
OBJECTIVE FUNCTION VALUE
1) 6000.000
VARIABLE VALUE REDUCED COST
X11 0.000000 0.000000
X21 0.000000 0.400000
X12 1500.000000 0.000000
X22 1000.000000 0.000000
X 1000.000000 0.000000
R2 5000.000000 0.000000
ROW SLACK OR SURPLUS DUAL PRICES
2) 0.000000 8.000000
3) 0.000000 2.000000
4) 0.000000 -6.400000
5) 0.000000 -6.000000
6) 500.000000 0.000000
7) 0.000000 0.000000
8) 0.000000 0.000000
NO,ITERATIONS= 7
(三)求R3
max 4.8x11+4.8x21+5.6x12+5.6x22-6x
st
x11+x12-x<500
x21+x22<1000
0.5x11-0.5x21>0
0.4x12-0.6x22>0
x>1000
x<1500
4.8x11+4.8x21+5.6x12+5.6x22-6x-r3=3000
End
LP OPTIMUM FOUND AT STEP 0
OBJECTIVE FUNCTION VALUE
1) 8000.000
VARIABLE VALUE REDUCED COST
X11 0.000000 0.000000
X21 0.000000 1.400000
X12 1500.000000 0.000000
X22 1000.000000 0.000000
X 1000.000000 0.000000
R3 5000.000000 0.000000
ROW SLACK OR SURPLUS DUAL PRICES
2) 0.000000 6.000000
3) 0.000000 5.000000
4) 0.000000 -2.400000
5) 0.000000 -1.000000
6) 0.000000 0.000000
7) 500.000000 0.000000
8) 0.000000 0.000000
NO,ITERATIONS= 0
方法二
model:
max=4.8*x11+4.8*x21+5.6*x12+5.6*x22-10*x1-8*x2-6*x3;
x1<500;
x2<500;
x3<500;
x11+x12<x+500;
x21+x22<1000;
0.5*x11-0.5*x21>0;
0.4*x12-0.6*x22>0;
x1+x2+x3-x=0;
(x1-500)*x2=0;
(x2-500)*x3=0;
End
Local optimal solution found at iteration,9
Objective value,4800.000
Variable Value Reduced Cost
X11 500.0000 0.000000
X21 500.0000 0.000000
X12 0.000000 0.000000
X22 0.000000 0.4000000
X1 0.000000 0.4000000
X2 0.000000 0.000000
X3 0.000000 0.000000
X 0.000000 0.000000
Row Slack or Surplus Dual Price
1 4800.000 1.000000
2 500.0000 0.000000
3 500.0000 0.000000
4 500.0000 0.000000
5 0.000000 9.600000
6 500.0000 0.000000
7 0.000000 -9.600000
8 0.000000 -10.00000
9 0.000000 -9.600000
10 0.000000 -0.3200000E-02
11 0.000000 -0.7200000E-02
我们加上x>10后
model:
max=4.8*x11+4.8*x21+5.6*x12+5.6*x22-10*x1-8*x2-6*x3;
x1<500;
x2<500;
x3<500;
x11+x12<x+500;
x21+x22<1000;
0.5*x11-0.5*x21>0;
0.4*x12-0.6*x22>0;
x1+x2+x3-x=0;
(x1-500)*x2=0;
(x2-500)*x3=0;
x>10;
end
Local optimal solution found at iteration,21
Objective value,5000.000
Variable Value Reduced Cost
X11 0.000000 0.000000
X21 0.000000 0.8997907
X12 1500.000 0.000000
X22 1000.000 0.000000
X1 500.0000 0.000000
X2 500.0000 0.000000
X3 0.000000 0.000000
X 1000.000 0.000000
Row Slack or Surplus Dual Price
1 5000.000 1.000000
2 0.000000 0.000000
3 0.000000 0.000000
4 500.0000 0.000000
5 0.000000 7.000419
6 0.000000 3.499372
7 0.000000 -4.400837
8 0.000000 -3.501046
9 0.000000 -7.000419
10 0.000000 -0.5999163E-02
11 0.000000 -0.7363828E+10
12 990.0000 0.000000
方法三
max 4.8x11+4.8x21+5.6x12+5.6x22-10x1-8x2-6x3
st
x11+x12-x<500
x21+x22<1000
0.5x11-0.5x21>0
0.4x12-0.6x22>0
x1+x2+x3-x=0
500y2-x1<0
x1-500y1<0
500y3-x2<0
x2-500y2<0
x3-500y3<0
end
int y1
int y2
int y3
ENUMERATION COMPLETE,BRANCHES= 2 PIVOTS= 35
LAST INTEGER SOLUTION IS THE BEST FOUND
RE-INSTALLING BEST SOLUTION...
OBJECTIVE FUNCTION VALUE
1) 5000.000
VARIABLE VALUE REDUCED COST
Y1 1.000000 0.000000
Y2 1.000000 2200.000000
Y3 1.000000 1200.000000
X11 0.000000 0.800000
X21 0.000000 0.800000
X12 1500.000000 0.000000
X22 1000.000000 0.000000
X1 500.000000 0.000000
X2 500.000000 0.000000
X3 0.000000 0.400000
X 1000.000000 0.000000
ROW SLACK OR SURPLUS DUAL PRICES
2) 0.000000 5.600000
3) 0.000000 5.600000
4) 0.000000 0.000000
5) 0.000000 0.000000
6) 0.000000 -5.600000
7) 0.000000 4.400000
8) 0.000000 0.000000
9) 0.000000 2.400000
10) 0.000000 0.000000
11) 500.000000 0.000000
NO,ITERATIONS= 39
BRANCHES= 2 DETERM.= 1.000E 0