Skip to main content

How can this trial LP be infeasible?

Answered

Comments

5 comments

  • Official comment
    Simranjit Kaur
    Gurobi Staff Gurobi Staff
    This post is more than three years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum. Or why not try our AI Gurobot?.
  • Thomas Opfer
    Gurobi-versary
    Thought Leader

    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
    Thought Leader

    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

Post is closed for comments.