Skip to main content

Removed variables and constraints during presolve

Answered

Comments

3 comments

  • Riley Clement
    • Gurobi Staff

    Hi Ozge,

    This is how I checked which constraints and variables are removed during presolve.

    Unfortunately this approach is not valid, variable and constraint names do not necessarily match between original and presolved model.  More details here: https://support.gurobi.com/hc/en-us/articles/360024738352-How-does-presolve-work

    does presolve actually fix values rather than removing? I assume this is the case and that variable is fixed to 1 during presolve.

    If presolve deduces a variable must obtain a particular value then it will replace this variable by the value.

    - Riley

    0
  • Ozge Aygul
    • Gurobi-versary
    • First Comment
    • First Question

    Thank you for your answer, Riley.

    I've read that article, and decided to inspect my model as it says:

    Usually, you would write out this model to an *.lp file and inspect it manually.

    It is a bit surprising for me you say the approach is not valid. As I was able to catch a pattern on removed variables, and preprocessed myself and it worked well.

    Anyway, I appreciate your answer.

    Özge

    0
  • Riley Clement
    • Gurobi Staff

    Hi Ozge,

    It's good to hear it worked, the preprocessed model can certainly give you inspiration for investigating things you may do yourself (and setting Aggregate=0 and DualReductions=0 may help).  So you could look at the presolved model, see a constraint is missing, and ask yourself “is there some reason this constraint is redundant?”, but you couldn't claim the constraint is redundant based off the presolved model.  Keep in mind a broken clock is correct twice a day.

    - Riley

    0

Please sign in to leave a comment.