Skip to main content

Using a tuple as first part of a double indeces

Answered

Comments

3 comments

  • Official comment
    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?.
  • Silke Horn
    • 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

Post is closed for comments.