Linear programming with complex inequalities

1 回表示 (過去 30 日間)
Nik Sam
Nik Sam 2017 年 6 月 14 日
コメント済み: Torsten 2017 年 6 月 14 日
I just wanna solve:
min Z=20X+18Y
with
2X+3Y>=10
4X+7Y>=28
X>=0, Y>=0
Answer is X=0, Y=4 and Z=72 How can i use the linprog command but with >= inequalities?

採用された回答

Torsten
Torsten 2017 年 6 月 14 日
Multiply the >= inequalities by (-1).
Best wishes
Torsten.
  4 件のコメント
Nik Sam
Nik Sam 2017 年 6 月 14 日
f=[-20 -18]
A=[-2 -3;-4 -7]
B=[-10 -28]
Aeq=[];
beq=[];
lb=[0 0];
ub=[];
[x,fval,exitflag,output]=linprog(f,A,B,Aeq,beq,lb,ub)
Torsten
Torsten 2017 年 6 月 14 日
f=[20 18]
Best wishes
Torsten.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLinear Programming and Mixed-Integer Linear Programming についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by