Skip to main content

1D Bin Packing Problem, big interval between bins filled

Answered

Comments

1 comment

  • Mario Ruthmair
    • Gurobi Staff

    Hi Julie,

    You could enforce an order for bins to be used in the sense that bin i+1 is only allowed to be used if bin i is already used:

    model.addConstrs( y[i+1] <= y[i] for i in range(UB-1), name="order")

    Best regards,
    Mario

    0

Please sign in to leave a comment.