求数学建模高手,会用lindo的上!!!

2024-12-29 00:06:21
推荐回答(1个)
回答1:

(你的题目生产A2的时间没有给,下面是我自己给定的)
假设每天用x1桶牛奶生产A1,用x2桶牛奶生产A2,每天获利为z;
目标函数为:
max z=24*3*x1+16*4*x2;
s.t x1+x2<=50;
12*x1+8*x2<=480;
3*x1<=100;
x1,x2>=0;
用lingo求解
代码:
model:
max=72*x1+64*x2;
x1+x2<=50;
12*x1+8*x2<=480;
3*x1<=100;
end
运行结果:
Global optimal solution found.
Objective value: 3360.000
Infeasibilities: 0.000000
Total solver iterations: 2

Model Class: LP

Total variables: 2
Nonlinear variables: 0
Integer variables: 0

Total constraints: 4
Nonlinear constraints: 0

Total nonzeros: 7
Nonlinear nonzeros: 0

Variable Value Reduced Cost
X1 20.00000 0.000000
X2 30.00000 0.000000

Row Slack or Surplus Dual Price
1 3360.000 1.000000
2 0.000000 48.00000
3 0.000000 2.000000
4 40.00000 0.000000

剩下的就是你自己的结果分析了