1 / 76
文档名称:

数学建模课件。线性规划。.ppt

格式:ppt   大小:1,318KB   页数:76页
下载后只包含 1 个 PPT 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

数学建模课件。线性规划。.ppt

上传人:文库新人 2018/10/1 文件大小:1.29 MB

下载得到文件列表

数学建模课件。线性规划。.ppt

相关文档

文档介绍

文档介绍:单变量优化
再来考虑售猪问题。但现在考虑到猪的生长率不是常数的事实。假设现在猪还小,生长率是增加的。什么时候将猪售出从而获得最大收益?
求解模型—图像法
clear all;
close all;
syms x
y = (-*x)*200*exp(*x)-*x;
ezplot(y,[0,40]);
grid on
ezplot(y,[18,22]); grid on
ezplot(y,[19,20]); grid on
数值方法求解--Matlab
dydx = diff(y,x)
xmax = solve(dydx);
xmax = double(xmax)
xmax =xmax(1)
ymax=subs(y,x,xmax)
Newton 法
求方程F(x)=0的根.
牛顿法:
x(n)=x(n-1)-F(x(n-1))/F’(x(n-1))
F = dydx;
F1 = diff(F,x);
format long
N = 10; % number of iterations
x0 = 19 % initial guess
fprintf(' iteration xvalue\n\n');
for i=1:N
x1=x0-subs(F,x,x0)/subs(F1,x,x0);
fprintf('% %\n', i, x1);
x0 = x1;
end
display('Hence, the critical point (solution of F=0) is (approx)'), x1
灵敏性分析
考虑最优售猪时间关于小猪增长率c=。
xvalues = 0;
for c = ::
y = (-*x)*200*exp(c*x)-*x;
dydx=diff(y,x);
xmaxc=solve(dydx);
xmaxc = double(xmaxc);
xmaxc = xmaxc(1);
xvalues = [xvalues; xmaxc];
end
xvalues = xvalues(2:end);