数学建模——线性规划模型的问题!

max Z=20x1+15x2 { 5x1 + 2x2 <= 180s.t. { 3x1 + 4x2 <= 135 { x1>=0 , x2>=0且 x1, x2为整数
2024-11-06 07:58:34
推荐回答(2个)
回答(1):

!用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

回答(2):

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