Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Optimization of a series of linear equations to maximize profit

조회 수: 1 (최근 30일)
Cassondra Cavegn
Cassondra Cavegn 2021년 10월 4일
마감: Walter Roberson 2021년 10월 13일
이 질문에 2명의 기여자가 플래그를 지정함
M.
  댓글 수: 1
Image Analyst
Image Analyst 2021년 10월 5일
Why do equations 2 and 6 not have == or <= in them. I'm not sure what they are saying or requiring.

답변 (1개)

John D'Errico
John D'Errico 2021년 10월 4일
편집: John D'Errico 2021년 10월 4일
이 답변에 Cassondra Cavegn 님이 플래그를 지정함
They are not differential equations. So I'm not sure what you were possibly thinking.
They are LINEAR equations. But you do not have any single goal. Instead, you have multiple criteria. So you need to use a tool like fgoalattain. This is a multi-criteria optimization, exactly what a tool like that is designed to solve. Also, you cannot use solve.
And finally, you cannot use solve. Solve is not an optimizer. It is not used to maximize variables, etc.
But if I look at your code, I see P. It appears in only ONE place, as a function of A and B.
The variable N NEVER appears, so you can make N as large as infinity.
I see equations like this:
eqn6 = 0.75 + 0.001*y;
Sorry, but that is meaningless. Do you want eqn6 to be set to zero?
eqn7 and eqn8 are just upper bound constraints on x and y.
I see the variable Y as well as y.
I give up. Sorry, but anything you were trying to do with that is never going to work. I have not a clue what you intend with that code, but clearly, you are totally confused too.

태그

Community Treasure Hunt

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

Start Hunting!

Translated by