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

KeyError 0 for summing variables in objective function (Using Python)

回答済み

コメント

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?.
  • Jaromił Najman
    • Gurobi Staff

    Hi Quentin,

    \(\texttt{P1}\) is a tupledict so it has to be accessed via \(\texttt{P1[a,b]}\).

    Best regards,
    Jaromił

    1
  • Quentin De Boever
    • Gurobi-versary
    • First Question
    • First Comment

    Jaromil,

    Thank you! Simple mistake, but I'm still new to Gurobi & Python, so hopefully I'll get better!

    Cheers

    0

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