Skip to main content

Bug with "presolve"

Answered

Comments

3 comments

  • Jaromił Najman
    Gurobi Staff Gurobi Staff

    Hi,

    The model you construct hold redundant constraints only, they all state

    \[\sum_{i=1}^5 b_i \leq 10\\
    b_i \in \{0,1\}\]

    When these constraints are removed, the objective function is trivial as well.

    Thus, Gurobi can provide the optimal solution without actually solving it. Therefore, the presolved model is a trivial one. Please also note that as described in How does presolve work?, it is not always possible to reproduce the original model from the presolved model. In this extreme example, the only information you get from the presolved model is that your model is indeed a trivial one.

    Best regards,
    Jaromił

    0
  • Haochen Sun
    Gurobi-versary
    First Comment
    First Question

    Thanks, following my post, I have been working on the same projects for months, and I have come to understand the mechanisms of presolving. However, in the examples where everything is removed, do you think that it is more rational to set the objective to a constant of the optimal objective, rather than 0?

    0
  • Jaromił Najman
    Gurobi Staff Gurobi Staff

    However, in the examples where everything is removed, do you think that it is more rational to set the objective to a constant of the optimal objective, rather than 0?

    It makes sense to set the objective of a trivially presolved model to 0, because this represents that even the optimal solution and the optimal objective value have been deduced fully from presolve by, e.g., setting all variables to their lower bounds. If one would set the objective of the presolved model to the optimal solution value of the original model, it would no longer be the presolved model, because the objective function has not been handled properly in this case.

    Best regards,
    Jaromił

    0

Please sign in to leave a comment.