Skip to content

Changing variable bounds during reoptimization #95

Closed
@cdanielmachado

Description

@cdanielmachado

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).

  1. Is this an issue or is it expected behavior?

  2. How can I (properly) modify variable bounds using re-optimization?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions