# Solving optimization problems with bilinear matrix inequalities (BMI) in Julia

**URL:** https://discourse.julialang.org/t/solving-optimization-problems-with-bilinear-matrix-inequalities-bmi-in-julia/62407
**Category:** Optimization (Mathematical)
**Tags:** jump, optimization
**Created:** [June 4, 2021, 9:03pm UTC](https://discourse.julialang.org/t/solving-optimization-problems-with-bilinear-matrix-inequalities-bmi-in-julia/62407 "2021-06-04T21:03:32Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Shuvomoy\_Das\_Gupta](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/shuvomoy_das_gupta/32/10069_2.png) [@Shuvomoy\_Das\_Gupta](https://discourse.julialang.org/u/Shuvomoy_Das_Gupta)
#### Post date: [June 4, 2021, 9:03pm UTC](https://discourse.julialang.org/t/solving-optimization-problems-with-bilinear-matrix-inequalities-bmi-in-julia/62407/1 "2021-06-04T21:03:32Z")

</div>

Dear All,

Is there a way one can formulate and solve optimization problems with bilinear matrix inequalities in Julia/JuMP? For example,

\begin{array}{ll} \textrm{minimize} & c^{T}x\\ \textrm{subject to} & A\_{0}+\sum\_{k=1}^{n}x\_{k}A\_{k}+\sum\_{k=1}^{n}\sum\_{\ell=1}^{n}x\_{k}x\_{\ell}K\_{k\ell}\preceq0, \end{array}

where x\in\mathbf{R}^{n} is the decision variable, is such an optimization problem. The problem is nonlinear and nonconvex. For my research, I am trying to solve such a problem.

I found that there is a Matlab solver called [BMISOLVER](https://set.kuleuven.be/optec/Software/bmisolver-a-matlab-package-for-solving-optimization-problems-with-bmi-constraints), but I was wondering if something similar exists for Julia as well?

Any tips or suggestions will be much appreciated!

---

<div class="post-metadata">

### Author: ![Shuvomoy\_Das\_Gupta](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/shuvomoy_das_gupta/32/10069_2.png) [@Shuvomoy\_Das\_Gupta](https://discourse.julialang.org/u/Shuvomoy_Das_Gupta)
#### Post date: [June 4, 2021, 10:49pm UTC](https://discourse.julialang.org/t/solving-optimization-problems-with-bilinear-matrix-inequalities-bmi-in-julia/62407/3 "2021-06-04T22:49:37Z")

</div>

No problem @NiclasMattsson , thanks so much for your input! Yes, I actually tried `Gurobi` early on, and then I noticed that it cannot solve SDPs.

If anyone could provide any suggestions on what to do, it would be very helpful!

---

<div class="post-metadata">

### Author: ![blegat](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/blegat/32/217090_2.png) [@blegat](https://discourse.julialang.org/u/blegat)
#### Post date: [June 6, 2021, 4:19am UTC](https://discourse.julialang.org/t/solving-optimization-problems-with-bilinear-matrix-inequalities-bmi-in-julia/62407/4 "2021-06-06T04:19:55Z")

</div>

You can use [Penbmi](http://www.penopt.com/penbmi.html), there is a [Julia wrapper](https://github.com/jump-dev/Penopt.jl) for using it with JuMP.  
In the future, [Alpine](https://github.com/lanl-ansi/Alpine.jl) might be able to support bilinear matrix inequalities as well so as to provide guaranteed optimal solutions, using an SDP solver and an a local search BMI solver (like Penbmi) as subsolvers.  
You could also create a Julia wrapper for BMISOLVER.  
I have created a few JuMP interfaces for MATLAB solvers ([SeDuMi.jl](https://github.com/jump-dev/SeDuMi.jl), [CDCS.jl](https://github.com/oxfordcontrol/CDCS.jl), [SDPNAL.jl](https://github.com/jump-dev/SDPNAL.jl), [SDPT3.jl](https://github.com/jump-dev/SDPT3.jl)), it’s not too much work, I can guide you through it if you’re interested.

---

<div class="post-metadata">

### Author: ![Shuvomoy\_Das\_Gupta](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/shuvomoy_das_gupta/32/10069_2.png) [@Shuvomoy\_Das\_Gupta](https://discourse.julialang.org/u/Shuvomoy_Das_Gupta)
#### Post date: [June 6, 2021, 1:25pm UTC](https://discourse.julialang.org/t/solving-optimization-problems-with-bilinear-matrix-inequalities-bmi-in-julia/62407/5 "2021-06-06T13:25:24Z")

</div>

Thanks so much, @blegat , I will try to solve the problem with Penbmi first. My problem size is fairly small, so hopefully, it would work. If not, probably I will try to create a JuMP interface for BMISOLVER and will reach out to you for guidance!

Thanks again!
