文档视界 最新最全的文档下载
当前位置:文档视界 › 运筹学实验报告

运筹学实验报告

运筹学实验报告
运筹学实验报告

. ... ..

运筹学实验报告

专业:

班级:

姓名:

学号:

指导教师:

数学与应用数学专业

2015-12-18

实验目录

一、实验目的 (3)

二、实验要求 (3)

三、实验容 (3)

1、线性规划 (3)

2、整数规划 (6)

3、非线性规划 (13)

4、动态规划 (114)

5、排队论 (19)

四、需用仪器设备 (26)

五、MATLAB优化工具箱使用方法简介 (26)

六、LINGO优化软件简介 (26)

七、实验总结 (27)

一、实验目的

1、会利用适当的方法建立相关实际问题的数学模型;

2、会用数学规划思想及方法解决实际问题;

3、会用排队论思想及方法解决实际问题;

4、会用决策论思想及方法解决实际问题;

5、掌握MATLAB、LINGO等数学软件的应用;

二、实验要求

1、七人一组每人至少完成一项实验容;

2、每组上交一份实验报告;

3、每人进行1~2分钟实验演示;

4、实验成绩比例:

出勤:40%

课堂提问:20%

实验报告:30%

实验演示:10%。

三、实验容

1、线性规划

例运筹学74页14题

Min z=-2x

-x2

s.t. 2x1+5x2≤60

x1+x2≤18

3x1+x2≤44

X2≤10

X1,x2≥0

用matlab运行后得到以下结果:

the program is with the linear programming

Please input the constraints number of the linear programming m=6

m =

6

Please input the variant number of the linear programming n=2

n =

2

Please input cost array of the objective function c(n)_T=[-2,-1]'

c =

-2

-1

Please input the coefficient matrix of the constraints A(m,n)=[2,5;1,1;3,1;0,1;-1,0;0,-1]

A =

2 5

1 1

3 1

0 1

-1 0

0 -1

Please input the resource array of the program b(m)_T=[60,18,44,10,0,0]'

b =

60

18

44

10

Optimization terminated.

The optimization solution of the programming is:

x =

13.0000

5.0000

The optimization value of the programming is:

opt_value =

-31.0000

LINDO程序

在命令窗口键入以下容:

max -2x-y

subject to

2x+5y<=60

x+y<=18

3x+y<=44

y<=10

end

按solve键在reports window出现:

Global optimal solution found.

Objective value: 0.000000

Total solver iterations: 0

Variable Value Reduced Cost X 0.000000 2.000000

Y 0.000000 1.000000

Row Slack or Surplus Dual Price

1 0.000000 1.000000

2 60.00000 0.000000

3 18.00000 0.000000

4 44.00000 0.000000

5 10.00000 0.000000 2、整数规划

课本第二章79页1题

Max z=100x1+180x2+70x3

s.t. 40x1+50x2+60x3≤10000

3 x1+6x2+ 2x3≤600

x1≤130

X2≤80

x3≤200

x1 x2 x3≥0

程序运行及结果:

biprogram

the program is with the binary linear programming

Please input the constraints number of the programming m=5

m =

5

Please input the variant number of the programming n=5

n =

5

Please input cost array of the objective function c(n)_T=[100,180 ,70]'

c =

100

180

70

Please input the coefficient matrix of the constraints A(m,n)=[40 ,50,60;3,6,2;1,0,0;0,1,0;0,0,1]

A =

40 50 60

3 6 2

1 0 0

0 1 0

0 0 1

Please input the resource array of the program b(m)_T=[10000;600; 130;80;200]

b =

10000

600

130

80

200

Optimization terminated.

The optimization solution of the programming is:

x =

The optimization value of the programming is:

opt_value =

程序名:intprogram b程序说明:

% the programm is with the integer linear programming use branc h and bound method!

%这个程序是用分支定界法解决整数规划问题

% please input the parameters in the main function in the comm and winows

%请在命令窗口输入这个主要定义函数的参数

function [x,f]=ILp(c,A,b,vlb,vub,x0,neqcstr,pre)

% min f=c'*x,s.t. A*x<=b,vlb<=x<=vub

% f的最小值等于c的转置乘以x,A乘以x小于等于b,x大于等于vlb小于等于vub % the vectors of x is required as integers as whole

% x是整个的整数需要

% x0 is the initialization,'[]' is also ok

% x0是初始值,"[]"也可以是。

% neqcstr is the number of equational constraints,when 0 can be delete

% neqcstr是平均约束条件的数目,当0能删除时

% pre is the concise rate

% pre是简明率

% x is the integer optimization and f is the optimal value

% x是整数规划,f 是最优值

%%%%%%%%%%%%%%%%

相关文档