!用lingo吧;
max = 20 * x1 + 15 * x2;
5 * x1 + 2 * x2 <= 180;
3 * x1 + 4 * x2 <= 135;
@gin(x1);@gin(x2);
计算结果:
x1 = 32; x2 = 9; 最大值775
X1=32
X2=9
Z=775
通过lindo编程求解;具体如下:
max 20x1+15x2
Subject to
5x1 + 2x2 <= 180
3x1 + 4x2 <= 135
x1>=0
x2>=0
end
INT x1
INT x2