Skip to main content

Gurobi Python: Summation Constraint not being satisfied

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

    Maybe, this is due to numerical trouble. Can you tell us how large M is?

    0
  • Ragia Shaaban
    Gurobi-versary
    First Comment
    First Question

    M is equal to 1525 (I don't know why exactly the author assumed this value)

    0
  • Thomas Opfer
    Gurobi-versary
    Thought Leader

    Can you post an .lp or .mps file of your model?

    One thing seems strange: In your first constraint, you interate t over range(1-w_max, H) and in the second constraint, you iterate t over trans_per(i,j). Is this the same?

    0
  • Ragia Shaaban
    Gurobi-versary
    First Comment
    First Question

    Hi Thomas,

    trans_per(i,j) is a subset of (1-w_max, H)
    trans_per(i,j) is a list that contains the periods where transshipment will occur between i and j,
    while (1-w_max, H) is a list that contains the whole planning horizon

    I've tried your suggestion to  unify them but nothing had changed.

     

    0

Post is closed for comments.