How to implement optimization with inverse matrices of varibales on Gurobi
AnsweredI am trying to minimize the following objective function by choosing matrix B and lambdas (which are diagonal matrices).

Optimization involves taking the inverse of the B matrix and lambdas, which is unfortunately not possible. I tried using analytically derived inverse matrices, but again, I ran into trouble with the division of Gurobi variables( 'GurobiError: Divisor must be a constant'). Is there any better way to implement this in Gurobi without introducing non-convexity to the problem?
-
Official comment
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. -
Hi Danusha,
I am not aware of any better general method to formulate matrix inverse in an optimization model. Most often, there is no way to avoid the additional nonconvexity. Maybe you can use model knowledge to find a different and equivalent definition of the inverse you need for your computation. If not, you can still try to solve the model with Gurobi via a quadratic formulation, see How do I divide by a variable in Gurobi?
Best regards,
Jaromił0
Post is closed for comments.
Comments
2 comments