How can i minimize

1 次查看(过去 30 天)
Jeffrey Eiyike
Jeffrey Eiyike 2016-6-23
min h
45<= x1 + u1 -u3 -u4 <= 45 + h100
40<= x2 + u2 -u3 +u4 <= 40 + h100
80<= x3 + u3 <= 80 + h100
u1,u2,u3,u4 >= 0
u1<= 170 ,u2<= 50 , u3<= 100, u4<= 70
  1 个评论
Torsten
Torsten 2016-6-24
What does h100 mean ? How is it related to h ?
Best wishes
Torsten.

请先登录,再进行评论。

回答(4 个)

Titus Edelhofer
Titus Edelhofer 2016-6-23
Hi Jeffrey,
there is probably some missing information. I guess it's clear that h>=0. Since there are no restrictions on x1, x2, x3, you might choose
u1 = 0; u2 = 0; u3 = 0; u4 = 0;
x1 = 45; x2 = 40; x3 = 80;
=>
h = 0;
is the optimal solution... ? Or am I missing something?
Titus

Jeffrey Eiyike
Jeffrey Eiyike 2016-6-23
That's the question on the jpg

Titus Edelhofer
Titus Edelhofer 2016-6-24
Hi Jeffrey,
I'm not sure I fully understand. If u1, u2, u3, u4 and x (=x1,x2,x3) are given, the computing lambda is trivial. There is still some information missing.
Titus
  1 个评论
Jeffrey Eiyike
Jeffrey Eiyike 2016-6-24
u1<= 170 ,u2<= 50 , u3<= 100, u4<= 70 and x1= 130 x2= 120 x3= 150

请先登录,再进行评论。


Titus Edelhofer
Titus Edelhofer 2016-6-24
Hi Jeffrey,
if I'm not mistaken, this should work:
% let the vector of unknowns be [u1 u2 u3 u4 lambda], then we
% have the following inequalities:
% u1 -u3 -u4 -lambda*100 <= 45-x1
% -u1 +u3 +u4 <= -45+x1
% and likewise for the other two
% in matrix form A*x<=b we have:
A = [ ...
1 0 -1 -1 -100;
0 1 -1 1 -100;
0 0 1 0 -100;
-1 0 1 1 0;
0 -1 1 -1 0;
0 0 -1 0 0];
% where b is:
b = [45-130; 40-120; 80-150; -45+130; -40+120; -80+150];
% now solve for the unknowns: we don't care about u1, u2, u3, u4 but lambda should be small:
uLambda = linprog([0;0;0;0;1], A, b, [], [], [0;0;0;0;0], [170;50;100;70;inf])
% extract lambda
lambda = uLambda(5);
Titus

类别

Help CenterFile Exchange 中查找有关 Solver Outputs and Iterative Display 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by