Root LP problem is unbounded.

11 visualizaciones (últimos 30 días)
KRISHNA TEJA DUDE
KRISHNA TEJA DUDE el 1 de Mzo. de 2022
Respondida: Janardhan Rao Moparthi el 28 de Dic. de 2023
p = optimproblem;
x = optimvar('x', 2,'Type','integer','LowerBound',0,'UpperBound',Inf);
p.ObjectiveSense = 'maximize';
p.Objective = 10*x(1) + 20*x(2);
cons1 = 6*x(1) + 8*x(2) >= 48;
cons2 = x(1) + 3*x(2) >=12;
p.Constraints.cons1 = cons1;
p.Constraints.cons2 = cons2;
sol = solve(p);
sol.x
Output ----
Solving problem using intlinprog.
Root LP problem is unbounded.
Intlinprog stopped because the root LP problem is unbounded.
ans =
[]

Respuesta aceptada

Torsten
Torsten el 1 de Mzo. de 2022
Yes, I can see it with my naked eye that you can make the objective function as big as you like.
Take x(1) = 1e100, x(2) = 1e100, then x is feasible and the objective gives 30*1e100.

Más respuestas (1)

Janardhan Rao Moparthi
Janardhan Rao Moparthi el 28 de Dic. de 2023
Since you do not specify the boundaries for the variable x(1) and x(2), it is giving error. instead try
  1. if the variables are not binary
lb = zeros(2,1);
ub = [inf;inf];
2.If the variables are binary
lb = zeros(2,1);
ub = [1;1];

Categorías

Más información sobre Linear Programming and Mixed-Integer Linear Programming en Help Center y File Exchange.

Productos


Versión

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by