Updating of Best Bound based on integrality of objective function value (due to integer coefficients and integer decision variables)

Answered

Comments

3 comments

  • Eli Towle

    You could set the absolute MIP gap (MIPGapAbs parameter) to a number slightly less than 1. With this approach, Gurobi will terminate when the ceiling (for minimization) of the best bound is equal to the integer-valued incumbent objective value.

    0
    Comment actions Permalink
  • Hendrik Weber

    Clean and easy solution, thanks for the help, Eli.

    I also did another change: I explicitly declared the decision variables that appear in the objective function as Integer.

    [I previously did not do that because the way the model is written, these decision variables will automatically be integer because their values are based on other (integer-valued) decision variables in corresponding constraints.]

    This also resolved the issue, as the solver seems to be aware of this whole aspect of ceiling of best bound when the relevant decision variables are explicitly declared as integer. 

    Just a general question, now that I think of it:

    Is it generally advisable to not use integer variables whenever possible? I am specifically talking about cases, where both variable-types (integer or continuous) could be chosen without changing the model.
    For instance: Introducing a "helper"-variable that simply represents the absolute value of another integer-valued decision variable.

    This helper-variable will always be integer-valued, however is there a "best practice" regarding the declaration (int or continuous) of the decision variable? Or does this simply not matter?

    Thanks a lot for the help!

    Greetings from Germany

    Hendrik

    0
    Comment actions Permalink
  • Eli Towle

    I'm not sure if it's always better to define such variables as continuous or integer. Ideally, it wouldn't matter much either way. Using a continuous variable seems reasonable, since the solver has one less constraint to deal with. However, if the variable is defined to be integer, Gurobi may exploit this integrality in presolve, during certain heuristic routines, in branching, or (as you observed) to draw conclusions about the integrality of the objective function.

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk