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

Creating constraints that reference other decision variables

回答済み

コメント

3件のコメント

  • 正式なコメント
    Simranjit Kaur
    • Gurobi Staff 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?.
  • Michael Forbes
    • Gurobi-versary
    • First Comment

    Because you have three colours you will need three constraints.  For the specific violated constraint you have it looks like:

    sum(squares with yellow on top)+sum(rectangles with yellow on bottom) <= 1

    0
  • tjs
    • Gurobi-versary
    • First Comment
    • First Question

    Thank you.  This works now.

    0

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