Skip to main content

How can this trial LP be infeasible?

Answered

Comments

4 comments

  • Thomas Opfer
    Gurobi-versary
    Collaborator

    I guess the problem is that lower bounds of variables are 0 if not specified otherwise.

    0
  • Peter Shi
    Gurobi-versary
    First Comment
    First Question

    Thank you! You are right about the source of the problem. To fix the problem, I first added

    Bounds

    GOAL <= 0

    But it won't work. So I added

    -1000000000000000 <= GOAL <= 100000000000000

    It works! My suggestion is to always add, by default, a large range for every variable, even if the variable is already given a fixed value.

    0
  • Thomas Opfer
    Gurobi-versary
    Collaborator

    Something like

    -inf <= GOAL <= inf

    should be the correct way to do this.

    0
  • Matthias Miltenberger
    Gurobi Staff Gurobi Staff

    Hi Peter,

    Thomas is absolutely right about the bounds. You should never use huge bounds to express unboundedness. This is almost guaranteed to cause numerical issues sooner or later.

    Please review our Guide on Numerics and this section on recommended ranges in particular.

    Please also note that the use of nonnegative variables is a standard convention in the mathematical programming community.

    Cheers,
    Matthias

    0

Please sign in to leave a comment.