Skip to main content

Sum equals sum constraint

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?.
  • Eli Towle
    • Gurobi Staff

    The constraint for \( \texttt{i = 'Boston'} \), \( \texttt{t = 39} \),  \( \texttt{k = 1} \) is:

    x.sum('*', '*', 'Boston', 39, 1) == x.sum('Boston', 39, '*', '*', 1)

    It seems to me that the variable \( \texttt{x['Boston', 39, 'Boston', 39, 1]} \) appears on both sides of this constraint with the same coefficient (\(1\)). Thus, Gurobi simplifies the constraint by removing the variable from both sides.

    1
  • Thorsten Wenzl
    • Gurobi-versary
    • First Comment
    • First Question

    Thanks Eli!

    Sometimes, one doesn't see the wood for the trees...

    0

Post is closed for comments.