Skip to main content

Invalid argument to QuadExpr multiplication for product of more than 2 variables

Awaiting user input

Comments

2 comments

  • Official comment
    Simranjit Kaur
    • Gurobi Staff
    This post is more than two 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.
  • Gurobot (AI-generated response)
    • Gurobi Staff

    To optimize an objective function involving the 1-norm (sum of absolute values) of a matrix in Gurobi, you can linearize the absolute values. For each element aij of your matrix, introduce two non-negative variables uij and vij, and set aij=uij−vij and ∣aij∣=uij+vij. Add constraints to ensure uij≥0 and vij≥0. This approach converts the absolute values into a linear form, which Gurobi can handle.

    0

Post is closed for comments.