linprog: can you manipulate the solver to give you an output you desire?

조회 수: 1 (최근 30일)
Austin Brehm
Austin Brehm 2020년 4월 17일
I have a linear programming problem. After running linprog, I get a solution (attached .png).
I have 7 groups. For each group, there are three solutions per row (three different numbers). I want the solver to output only one solution, in other words, one number is greater than zero and the other two numbers are zero.
Is it possible to implement such restrictions before linprog runs? It would go something like this:
GROUP 1
if column1solution > 0
column2solution = 0
column3solution = 0
elseif column2solution > 0
column1solution = 0
column3solution = 0
elseif column3solution > 0
column1solution = 0
column2solution = 0
end
It would search if the first solution is greater than zero. If so, it would accept that as the solution and set the other solutions to zero. If not, it would search if the second solution is greater than zero. If not, it would search if the third solution is greater than zero.
Is this possible to implement as the solver is compiling the solution?

답변 (0개)

카테고리

Help CenterFile Exchange에서 Solver Outputs and Iterative Display에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by