Skip to main content

Matrix assembly as equality constraint

Answered

Comments

2 comments

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

Please sign in to leave a comment.