Skip to main content

Precedens constraint wrong

Answered

Comments

3 comments

  • Official comment
    Simranjit Kaur
    • 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 Magnus Lloyd
    • Gurobi-versary
    • First Question
    • First Comment

    The constraint mathematic formulated is shown in picture below:

    0
  • Silke Horn
    • Gurobi Staff

    Hi Thomas,

    I only looked at the precedence constraint in your code and -- without knowing the details of the problem you are modelling -- here's what I noticed: In your code, i and j range over the same set and could be swapped without changing the resulting model, correct? From your comment, the constraint should enforce that activity i happen before j, but because of what I just said it would also enforce that j happen before i. If both cannot be true at the same time, the model is infeasible. As I've said in your previous question, you could write the model to an LP file and check whether the resulting constraints look as you want them.

    In general, to debug infeasibility you could also try computing an IIS.

    Silke

    0

Post is closed for comments.