Closed vang1ong7ang closed 3 years ago
another case here:
\Problem name:
Minimize
OBJROW: - var(3) - var(8)
Subject To
constr(0): var(0) = 1
constr(1): - var(0) + var(1) + var(2) = -0
constr(2): -256 var(1) + 256 var(2) - var(3) = -0
constr(3): 256 var(1) -256 var(2) - var(4) = -0
constr(4): var(5) = 1
constr(5): - var(5) + var(6) + var(7) = -0
constr(6): -256 var(6) + 256 var(7) - var(8) = -0
constr(7): 256 var(6) -256 var(7) - var(9) = -0
constr(8): var(10) = 1
constr(9): - var(10) + var(11) + var(12) = -0
constr(10): - var(11) - var(13) = -0
constr(11): 10 var(11) - var(14) = -0
constr(12): var(4) + var(13) >= -0
constr(13): var(9) + var(14) >= -0
constr(14): var(3) + var(8) >= -0
constr(15): var(4) + var(13) >= -10000
constr(16): var(9) + var(14) >= -0
constr(17): var(3) + var(8) >= -0
Bounds
0 <= var(0) <= 1
0 <= var(1) <= 1
0 <= var(2) <= 1
var(3) Free
var(4) Free
0 <= var(5) <= 1
0 <= var(6) <= 1
0 <= var(7) <= 1
var(8) Free
var(9) Free
0 <= var(10) <= 1
0 <= var(11) <= 1
0 <= var(12) <= 1
var(13) Free
var(14) Free
Integers
var(0) var(5) var(10)
End
the output is:
var(0) : 1.0
var(1) : 0.55
var(2) : 0.45000000000000007
var(3) : -25.599999999999994
var(4) : 25.6
var(5) : 1.0
var(6) : 0.0
var(7) : 1.0
var(8) : 256.0
var(9) : -256.0
var(10) : 1.0
var(11) : 25.6
var(12) : -24.6
var(13) : -25.6
var(14) : 256.0
where var(11)
doesn't follows 0 <= var(11) <= 1
hi @vang1ong7ang , I just tested with python mip 1.10 and the result seems correct now, could you check ?
@h-g-s
yep, it is now correct and runs well.
thank you a lot for fix this.
Describe the bug
Querying optimization results shows the wrong answer.
To Reproduce
the lp file:
the python code to reproduce:
the output:
Expected behavior
expected objective value should be
2000
, but when I follow the doc to read the optimized objective value frommodel.vars
, the value is3000
actually, the bounds
0 <= var(5) <= 1
is ignored by python-mip.Desktop (please complete the following information):
Linux bd351c4cdf15 4.19.125-1.*****.*****.x86_64 #1 SMP Sat May 30 16:11:30 UTC 2020 x86_64 GNU/Linux
3.8.1
1.9.3
Additional context Add any other context about the problem here.