Skip to main content

How to fix variables of the presolved model and get the solution of original model ?

Answered

Comments

1 comment

  • Eli Towle
    Gurobi Staff Gurobi Staff

    The mapping between the original model and the presolved model is not exposed. We don't recommend working on the presolved model, because in general there's no way to recover a solution to the original model. Additionally, the variables you're interested in fixing may not even be present in the presolved model.

    Some alternative ideas:

    • Convert your model to a multi-scenario model, where you define a new scenario for each set of variable fixings. When solving a multi-scenario model, Gurobi performs a single presolve step, then attempts to find optimal solutions for all scenarios.
    • Limit the amount of time Gurobi spends in presolve by modifying the PrePasses/Presolve parameters.
    0

Please sign in to leave a comment.