필터 지우기
필터 지우기

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 CenterFile Exchange에서 Linear Least Squares에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by