Are the contraints correctly used?
조회 수: 1 (최근 30일)
이전 댓글 표시
Dear all, Since I am a total beginner using Matlab, I have some troubles with this linear optimization problem. I implemented all decision variables and all known constraints - unfortunately, after running this model I get the message that the Root LP Problem is unbounded. Has anyone of you the solution for this issue or can help me solving that problem? Maybe someone can check if the constraints (Matrix) are also correctly used? Thank you very much!
Problem_MAX.Objective = sum( x_8(:) );
for i = 1:NA
C1(i) = x_8(i) == sum( x_6(i,:) + x_3(i,:) - x_9(i,:) );
for ii = 1:NB
C2(i,ii) = y_1(i,ii) == x_5(i,ii) + x_4(i,ii) + x_6(i,ii) + x_7(i,ii);
C3(i,ii) = y_2(i,ii) == x_5(i,ii) + x_2(i,ii) + x_9(i,ii);
end
end
opts = optimoptions('intlinprog','Display','off');
[sol,fval,exitflag,output] = solve(Problem_MAX,opts)
댓글 수: 0
채택된 답변
John D'Errico
2017년 11월 10일
편집: John D'Errico
2017년 11월 10일
I don't even need to look carefully at this problem, and I can predict that it is unbounded.
Exactly where did you tell solve (and therefore intlinprog) that any constraints were defined?
You never passed in C1, C2, C3, C4, or C5.
You created them. But you never used them. MATLAB cannot know that you wanted to use them as constraints. After all, you might have done that for some other reason. Or maybe you created them, but you decided they were not necessary. So MATLAB throws its hands up, telling you that the problem you posed has no solution, because it is unbounded.
댓글 수: 0
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!