Skip to main content

Matrix assembly as equality constraint

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 try Gurobot, our chatbot interface offering instant, expert-level support.
  • Nicolo Pollini
    • Gurobi-versary
    • First Comment
    • First Question

    the error that i get is: Variable is not a 1D MVar object

    0
  • Jaromił Najman
    • Gurobi Staff

    Hi Nicolo,

    Currently, the Python Matrix API is not compatible with advanced matrix equations and operation such as a matrix assembly. I think it is best to model your equality constraints via the normal Var objects, i.e., define matrix \(A\) via the addVars method. You would then have to construct your constraints row by row.

    Best regards, 
    Jaromił

    0

Post is closed for comments.