Skip to main content

Gurobi Python: Summation Constraint not being satisfied

Comments

4 comments

  • 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

Please sign in to leave a comment.