メインコンテンツへスキップ

Sum equals sum constraint

回答済み

コメント

3件のコメント

  • 正式なコメント
    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

投稿コメントは受け付けていません。