Skip to main content

Data structure for sparse coefficient matrices

Answered

Comments

2 comments

  • Official comment
    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

    Welcome to Gurobi!

    Which API are you going to use? (From your mention of tuplelist and tupledict, I am going to assume Python.)

    As of version 8.1.1, Gurobi does not support matrix-based modeling in Python. So right now the recommendation is to model your constraints using the addConstr method (or in bulk using addConstrs). You can have a look at the code examples here.

    With Gurobi 9 (scheduled for later this fall), you will be able to do matrix-oriented modeling, using NumPy or SciPy matrices.

    1

Post is closed for comments.