intlinprog gives wrong answer/uses double altough all variables are defined as integers
Mostrar comentarios más antiguos
Hi,
intlinprog calculates the LP-Value wrong. It seems like the first variable isn't used as a binary, though it's defined as a binary. Possible values for LP should be 0,20,30 or 50 depending on the values of b (or no answer at all). Could somebody be so kind and help me out with this problem?
f =
20
30
intcon =
1 2
A =
0.0500 0.0200
-0.0500 -0.0200
b =
0.0600
-0.0100
lb =
0 0
ub =
1 1
LP: Optimal objective value is 4.000000.
Optimal solution found.
Intlinprog stopped at the root node because the objective value is within a gap tolerance of the optimal value, options.AbsoluteGapTolerance = 0 (the default value). The intcon variables are integer within tolerance, options.IntegerTolerance = 1e-05 (the default value).
ans =
1
0
2 comentarios
Pawel Ladosz
el 10 de Ag. de 2016
Are both variables binary or only first one? if only first one your UB maybe should be like:
ub=
1 inf
Steffen Kuehl
el 10 de Ag. de 2016
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Linear Programming and Mixed-Integer Linear Programming en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!