matlab解一道题求最小值

来源:百度知道 编辑:UC知道 时间:2024/06/19 10:57:13
C=737x1+62.5x2+550x3+14y1+5y2+18y3
求上述C的最小值?
约束:
0<=x1<=170000
0<=x2<=250000
0<=x3<=183333
50000<=y1<=x1
50000<=y2<=x2
50000<=y3<=x3
730x1+60x2+541x3<=100514224
呼唤wacs5高手~~~~~~~~~~~~~

新手上阵 各位多多包含 总共60分 全部送出

C=473x1+27.5x2+50x3+94x4+12y1+5y2+6y3+8y4-31333
求上述C的最小值?
约束:
0<=x1<=1500
0<=x2<=4000
0<=x3<=7000
0<=x4<=2000
400<=y1<=x1
650<=y2<=x2
920<=y3<=x3
842<=y4<=x4
x1+y1>=1276
x2+y2>=3076
x3+y3>=6093
x4+y4>=1427
467x1+20x2+47x3+90x4<=1289500

毕业论文哇 ,菜鸟选手,请众高手算下面这个吧,上面那个模型我屡屡出错~~~~~~~~~~~~~~~~

不好意思 时间紧急 谢谢大家了 ,这题算完了 以后有分 全部白送

---------------------------
第一个问题我自己搞错了,应该是要下面的这个问题,决定毕业与否~~~

程序:
x0 = [1000, 2000, 5000, 1000, 400, 650, 920,842];
A = [467,20,47,90,0,0,0,0;...
-1,0,0,0,0,0,0,-1;...
0,-1,0,0,0,-1,0,0;...
0,0,-1,0,0,0,-1,0;...
0,0,0,-1,0,0,0,-1;...
-1,0,0,0,0,1,0,0;...
0,-1,0,0,0,1,0,0;...
0,0,-1,0,0,0,1,0;...
0,0,0,-1,0,0,0,1];
b = [1289500;-1276;-3076;-6093;-1427;0;0;0;0];
lb = [0,0,0,0,400,650,920,842];
ub = [1500,4000,7000,2000,inf,inf,inf,inf];
[x,C] = fmincon(@(x) 473*x(1)+27.5*x(2)+50*x(3)+94*x(4)+12*x(5)+5*x(6)+6*x(7)+8*x(8)-31333, x0, A, b,[],[],lb,ub);
x,C

结果:
Optimization terminated: first-order optimality measure less
than options.TolFun and maximum constraint violation is less
than options.TolCon.
Active inequalities (to within options.TolCon = 1e-006):
lower upper ineqlin ineqnonlin
5 3
6 4
8