How to write matlab code for simplex equation.

7 ビュー (過去 30 日間)
Ma Dely Esberto
Ma Dely Esberto 2017 年 9 月 27 日
コメント済み: Ma Dely Esberto 2017 年 12 月 1 日
How to write matlab code for the simplex equation to maximize P=7x1+8x2+10x3, where x1,x2,x3>=0, and the constraints are assembly and fabrication time labor where equations for Assembly is x1+x2+2x3<=800, and for Fabrication is 2x1+3x2+2x3<=1000.

採用された回答

Matt J
Matt J 2017 年 9 月 27 日
編集済み: Matt J 2017 年 9 月 27 日
You would use LINPROG.
  1 件のコメント
Ma Dely Esberto
Ma Dely Esberto 2017 年 10 月 5 日
編集済み: Matt J 2017 年 10 月 5 日
On Matt J. Clarification, if you have any idea on the script for the problem. Needs symbolic programming in writing the script. I was doing something like this:
function tab = texas1_simplex(f1,f2,f3,debug)
% f1 is (a1*X1+a2*X2+a3*X3-b1)
% vars are X1, X2, X3
% coeffs are a1,a2,a3,a4,a5,a6,a7,a8,a9,b1,b2,b3
% f1= ('a1*X1+a2*X2+a3*X3-b1')
f1 = input('please enter the equation f1:');
X1= sym ('X1'); X2= sym('X2'); X3= sym('X3');
a1=('_'); a2=('_'); a3=('_'); b1=('_');
c=sym2poly(f1);
but it doesn't run.

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

その他の回答 (1 件)

Aurele Turnes
Aurele Turnes 2017 年 11 月 30 日
編集済み: Aurele Turnes 2017 年 11 月 30 日
You can use the new problem-based approach in R2017b if you want a more symbolic representation for your problem:
  1 件のコメント
Ma Dely Esberto
Ma Dely Esberto 2017 年 12 月 1 日
thank you for this helpful info

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

カテゴリ

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