Skip to main content

Getting Binding Constraints

Answered

Comments

2 comments

  • Eli Towle
    Gurobi Staff Gurobi Staff

    After optimizing, you can check if each (linear) constraint's Slack attribute is sufficiently close to \(0\). For example, in Python:

    binding = [c for c in model.getConstrs() if abs(c.Slack) < 1e-6]
    1
  • MEHMET RIFAT KAMBER
    First Comment
    Gurobi-versary
    First Question

    Thank you Mr Towle

    0

Please sign in to leave a comment.