Skip to main content

Data structure for sparse coefficient matrices

Answered

Comments

1 comment

  • 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

Please sign in to leave a comment.

Powered by Zendesk