How can i minimize

1 回表示 (過去 30 日間)
Jeffrey Eiyike
Jeffrey Eiyike 2016 年 6 月 23 日
回答済み: Titus Edelhofer 2016 年 6 月 24 日
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
  1 件のコメント
Jeffrey Eiyike
Jeffrey Eiyike 2016 年 6 月 23 日
I am suppose to minimise h .

サインインしてコメントする。


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 Center および File ExchangeSolver 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