Are the contraints correctly used?

2 次查看(过去 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)

采纳的回答

John D'Errico
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 个)

类别

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