Description
I am trying to solve an LP problem multiple times, where both the objective coefficients and the bounds of the variables may get modified between iterations. Something of the form:
for iteration i in {1,2,3... }:
solve:
max c(i) * x
where
A * x = b
lb(i) < x < ub(i)
I start with enableReoptimization()
before populating the model with variables and constraints. After solving the problem in each iteration, I free the problem with freeReoptSolve()
, and then modify the objective coefficients and the variable bounds.
Changing the objective coefficients is successful, however something strange happens with the variable bounds. I am able to change them (if I retrieve the bounds from the variables, i see they have been updated), but the model is still solved with the original values (and if I write the problem to a file, I see that the old values are still there).
-
Is this an issue or is it expected behavior?
-
How can I (properly) modify variable bounds using re-optimization?