用LINGO 编程解一个线性规划问题,不会编,急急急!在线等 15
Min=6000-290X1-470X2-720X3-1060X4-1490X5;X1>=1;X2>=1;X3>=1;X4>=1;X5>=1;X1-X5都必须为整数...
Min=6000-290X1-470X2-720X3-1060X4-1490X5;
X1>=1;
X2>=1;
X3>=1;
X4>=1;
X5>=1;
X1-X5都必须为整数 展开
X1>=1;
X2>=1;
X3>=1;
X4>=1;
X5>=1;
X1-X5都必须为整数 展开
2个回答
展开全部
若求最小值,则有无界解,即目标函数没有最小值。程序如下:
Min=6000-290*X1-470*X2-720*X3-1060*X4-1490*X5;
X1>=1;
X2>=1;
X3>=1;
X4>=1;
X5>=1;
@GIN(x1);@GIN(x2);@GIN(x3);@GIN(x4);@GIN(x5);
运行结果为:
Model is unbounded
Variable Value
X1 0.000000
X2 0.000000
X3 0.000000
X4 0.000000
X5 0.000000
Row Slack or Surplus
1 0.000000
2 -1.000000
3 -1.000000
4 -1.000000
5 -1.000000
6 -1.000000
若改为求最大值,则有有界解。程序如下:
Max=6000-290*X1-470*X2-720*X3-1060*X4-1490*X5;
X1>=1;
X2>=1;
X3>=1;
X4>=1;
X5>=1;
@GIN(x1);@GIN(x2);@GIN(x3);@GIN(x4);@GIN(x5);
运行结果为:
Global optimal solution found.
Objective value: 1970.000
Objective bound: 1970.000
Infeasibilities: 0.000000
Extended solver steps: 0
Total solver iterations: 0
Variable Value Reduced Cost
X1 1.000000 290.0000
X2 1.000000 470.0000
X3 1.000000 720.0000
X4 1.000000 1060.000
X5 1.000000 1490.000
Row Slack or Surplus Dual Price
1 1970.000 1.000000
2 0.000000 0.000000
3 0.000000 0.000000
4 0.000000 0.000000
5 0.000000 0.000000
6 0.000000 0.000000
Min=6000-290*X1-470*X2-720*X3-1060*X4-1490*X5;
X1>=1;
X2>=1;
X3>=1;
X4>=1;
X5>=1;
@GIN(x1);@GIN(x2);@GIN(x3);@GIN(x4);@GIN(x5);
运行结果为:
Model is unbounded
Variable Value
X1 0.000000
X2 0.000000
X3 0.000000
X4 0.000000
X5 0.000000
Row Slack or Surplus
1 0.000000
2 -1.000000
3 -1.000000
4 -1.000000
5 -1.000000
6 -1.000000
若改为求最大值,则有有界解。程序如下:
Max=6000-290*X1-470*X2-720*X3-1060*X4-1490*X5;
X1>=1;
X2>=1;
X3>=1;
X4>=1;
X5>=1;
@GIN(x1);@GIN(x2);@GIN(x3);@GIN(x4);@GIN(x5);
运行结果为:
Global optimal solution found.
Objective value: 1970.000
Objective bound: 1970.000
Infeasibilities: 0.000000
Extended solver steps: 0
Total solver iterations: 0
Variable Value Reduced Cost
X1 1.000000 290.0000
X2 1.000000 470.0000
X3 1.000000 720.0000
X4 1.000000 1060.000
X5 1.000000 1490.000
Row Slack or Surplus Dual Price
1 1970.000 1.000000
2 0.000000 0.000000
3 0.000000 0.000000
4 0.000000 0.000000
5 0.000000 0.000000
6 0.000000 0.000000
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询