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

Using a tuple as first part of a double indeces

回答済み

コメント

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?.
  • Silke Horn
    • Gurobi Staff Gurobi Staff

    The result of model.addVars is tupledict, whose keys are of type tuplelist and can only store tuples of scalar values.

    One way to do your quicksum would be:

    quicksum(v[a[0],a[1],k] for a in arcs for k in uncer)
    0
  • Markus Gabl
    • Gurobi-versary
    • First Comment
    • First Question

    Thanks a lot for you quick answer! That is a very helpful and simple solution. 

    Have a nice weekend :) 

    0

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