Skip to main content

Sum equals sum constraint

Answered

Comments

2 comments

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

Please sign in to leave a comment.