Maximize Linear Programming using linprog - returns absurd results

8 ビュー (過去 30 日間)
Hardik Mahipal Surana
Hardik Mahipal Surana 2020 年 4 月 8 日
コメント済み: Torsten 2020 年 4 月 8 日
I have to maximize the function given below: f(x,y, z) = 10x + 8y + 5z; subject to
x + 2y + 2z <=1600;
3x + 2y + z <= 600;
x>=0;
y>=0;
z>=0;
I tried to find out the value using linprog() function:
f = [-10 -8 -5]
A = [1 2 2; 3 2 1]
b = [1600 600]
linprog(f, A, b)
But i am getting some absurd values:
X =
1.0e+03 *
-0.5000
1.0500
0
val =
-3.4000e+03
Where did i go wrong? Any help would be really appreciated.
  1 件のコメント
Torsten
Torsten 2020 年 4 月 8 日
You forgot to include 0 as lower bound for x,y and z.

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeCalculus についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by