Borrar filtros
Borrar filtros

Are the contraints correctly used?

2 visualizaciones (últimos 30 días)
Mez
Mez el 10 de Nov. de 2017
Editada: Mez el 13 de Nov. de 2017
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)

Respuesta aceptada

John D'Errico
John D'Errico el 10 de Nov. de 2017
Editada: John D'Errico el 10 de Nov. de 2017
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.

Más respuestas (0)

Categorías

Más información sobre Solver Outputs and Iterative Display en Help Center y File Exchange.

Etiquetas

Aún no se han introducido etiquetas.

Community Treasure Hunt

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

Start Hunting!

Translated by