LINGO练习题-1及答案

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

LINGO练习题-1及答案LINGO测试-1

1、用LINGO软件解方程组(1)221212222359 x x x x?+=??-=-??。

model:

x^2+2*y^2=22;

3*x-5*y=-9;

end

Solution is locally infeasible Infeasibilities:0.5417411E-04

Extended solver steps:5

Total solver iterations:20

Variable Value

X 2.000005

Y 3.000003

Row Slack or Surplus

1-0.5417411E-04

20.000000

2、用LINGO软件解线性规划问题

model:

max=2*x+3*y;

4*x+3*y<=10;

3*x+5*y<=12;

x>0;y>0;

end

Global optimal solution found.

Objective value:7.454545

Infeasibilities:0.000000

Total solver iterations:2

Variable Value Reduced Cost

X 1.2727270.000000

Y 1.6363640.000000

Row Slack or Surplus Dual Price

max23,..4310,3512,,0.z x y s t x y x y x y=++≤+≤≥17.454545 1.000000

20.0000000.9090909E-01

30.0000000.5454545

4 1.2727270.000000

5 1.6363640.000000

3、用LINGO软件二次规划问题

(1)min2212z=x-3-2x+()()

22121212..-50,

24,

,0s t

x x x x x x+≤+≤≥。

model:

min=(x1-3)^2+(x2-2)^2;

x1^2+x2^2-5<=0;

x1+2*x2<=4;

x1>=0;

x2>=0;

end

Local optimal solution found. Objective value: 2.000000 Infeasibilities:0.5384996E-06 Extended solver steps:5

Total solver iterations:64 Variable Value Reduced Cost

X1 2.0000000.000000

X20.99999990.000000

Row Slack or Surplus Dual Price 1 2.000000-1.000000

2-0.5384996E-060.3333331

30.0000000.6666670

4 2.0000000.000000

50.99999990.000000

(2)

model:22221212334412132344

max23x x x2x x5x,..25,

12,

,{0,1},2,0.z x x s t x x x x x x x x=-+-++-≤≤≤∈Z∈≥>

max=x1^2-2*x2^2+3*x1*x2-x3^2+2*x3*x4+5*x4^2;

x1-2*x2<=5;

1<=x1;

x1<=2;

x3/x4>=2;

x4>0;

@gin(x2);

@bin(x3);

end

Linearization components added:

Constraints:4

Variables:1

Local optimal solution found.

Objective value:9.250000

Objective bound:9.250000

Infeasibilities:0.000000

Extended solver steps:2

Total solver iterations:39

Variable Value Reduced Cost X1 2.0000000.000000X2 1.000000-1.999996X3 1.000000199997.5X40.5000000 0.000000

Row Slack or Surplus Dual Price

19.250000 1.000000

2 5.0000000.000000

3 1.0000000.000000

40.0000007.000003

50.000000-1.749997

60.50000000.000000

4、用LINGO软件分别产生序列

(1){1,3,5,7,9,11};

model:

sets:

set1/1..6/:x;

endsets

@for(set1(i):x(i)=2*i-1);

end

Feasible solution found.

Total solver iterations:0

相关文档
最新文档