word
word
1 / 23
word
实验二 线性规划的求解
学号:1
:何科
班级:2015级10班
实验目的
熟悉并掌握MATLAB的线性规划求解函数linprog()及其用法;
熟悉并掌握LINGO软件求解线lver iterations: 5
Model Title: 储蓄所招聘计划
word
word
7 / 23
word
Variable Value Reduced Cost
Row Slack or Surplus Dual Price
灵敏度分析:
word
word
8 / 23
word
投资的收益与风险的模型I,在MATLAB中进行求解
代码:
a=0;
while(-a)>1
c=[- - - - -];
Aeq=[1 ];
beq=[1];
A=[0 0 0 0;
0 0 0 0;
0 0 0 0;
0 0 0 0 ];
b=[a;a;a;a];
vlb=[0,0,0,0,0];
vub=[];
[x,val]=linprog(c,A,b,Aeq,beq,vlb,vub);
word
word
9 / 23
word
a;
x=x';
Q=-val;
plot(a,Q,'.')
axis([0 0 ])
hold on
a=a+;
end
xlable('a'),ylable('Q')
结果:
word
word
10 / 23
word
习题5:
建立数学模型
解:设该工厂每天分别生产A1,A2产品x1,x2件
目标函数:maxZ=6*x1+4*x2
约束条件为:
零件装配工时限制: 2x1+3x2<=100
零件检验工时限制: 4x1+2x2<=120
X1,x2>0,且为整数
word
word
11 / 23
word
模型为:
求解
程序:
max=6*x1+4*x2;
2*x1+3*x2<=100;
4*x1+2*x2<=120;
x1>=0;
x2>=0;
结果
Global optimal solution found.
Total solver iterations: 2
Variable Value Reduced Cost
word
word
12 / 23
word
Row Slack or Surplus Dual Price
1
(3)灵敏度分析
Ranges in which the basis is unchanged:
Objective Coefficient Ranges
Current Allowable Allowable
Variable Coefficient Increase Decrease
Righthand Side Ranges
word
word
13 / 23
word
Row Cu
数学建模线性规划地求解 来自淘豆网m.daumloan.com转载请标明出处.