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?
-
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
Please sign in to leave a comment.
Comments
1 comment