没有合适的资源?快使用搜索试试~ 我知道了~
灵敏度分析matlab代码 通过matlab程序的编写,掌握了单纯形法灵敏度分析的编程实现,文档里面有详细的matlab 代码,有需要的可以下载学习。
资源推荐
资源详情
资源评论
实验二、线性规划的灵敏度分析
(一) 实验目的
1. 线性规划求解的单纯形法的灵敏度分析的编程实现
2.掌握使用 matlab、Lingo、Excel 的规划求解功能求解,并利用“敏感性报告”进行
分析。
(二)实验内容
课本例 1 解的灵敏度分析
(1):调用单纯形程序:
function [x,z,flg,sgma]=simplexfun(A,A1,b,c,m,n,n1,cb,xx)
% A,b are the matric in A*x=b
% c is the matrix in max z=c*x
% A1 is the matric in simplex table
% m is the numbers of row in A and n is the con number in A
% n1 is the nubers of artificial variables,and artificial variables are default as the last % n1
variables in x.
% cb is the worth coefficient matrix for basic variables
% xx is the index matrix for basic variables
% B1 is the invers matrix for the basic matrix in simplex table.The initial
% matrix is default as the last m con in the matrix A.
x=zeros(n,1);
z=0;
B1=A1(:,n-m+1:n);
sgma1=c-(cb*B1)*A;
[masg,kk]=max(sgma1);
k=kk(1);
flg=0;
ll=0;
while (masg>0)&&(ll<20)
ll=ll+1;
thita=1000+zeros(m,1);
for i=1:m
if A1(i,k)>0
thita(i)=A1(i,k)(i);
end
end
[r8,c8]=find(thita>999);
if sum(c8)<m
[mith,rr]=min(thita);
r=rr(1);
aa=A1(r,k);
for i=1:m
if i==r
资源评论
Rocky006
- 粉丝: 5751
- 资源: 1332
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功