I was inspired by this post to switch from MATLAB's LMI toolbox to a Julia implementation and I tried to adapt the suggested script in the post to a problem I am trying to solve. However, I have failed to do this, consistently causing Julia to crash or give me a StackOverflowError
while trying to solve the following LMI problem with JuMP,
Lyapunov stability of hybrid systems
For the unknown symmetric matrices Ui, Wi, M (and Pi) where Ui, Wi are greater than or equal to zero.
I have run the model set-up line by line and found that it occurs when I define the last constraint:
@SDconstraint(model, Ai'*Pi + Pi*Ai + Ei'*Ui*Ei ⪯ 0)
I saw other posts about this with JuMP and they usually were a result of improper variable definition but that knowledge has not allowed me to figure out the issue. Here is a minimal form of the code that produces the error,
using JuMP
using MosekTools
using LinearAlgebra
E1p = [1 0; 0 1];
A1 = [-1 10; -100 -1];
Ei = E1p
Ai = A1
n=2
model = Model(Mosek.Optimizer)
@variable(model, Pi[i=1:n, j=1:n], Symmetric)
@variable(model, Ui[i=1:n, j=1:n], Symmetric)
@variable(model, Wi[i=1:n, j=1:n], Symmetric)
@variable(model, M[i=1:n, j=1:n], Symmetric)
@SDconstraint(model, Ui ⪰ 0)
@SDconstraint(model, Wi ⪰ 0)
@SDconstraint(model, Ei'*M*Ei ⪰ 0)
@SDconstraint(model, Pi - Ei'*Wi*Ei ⪰ 0)
@SDconstraint(model, Ai'*Pi + Pi*Ai + Ei'*Ui*Ei ⪯ 0)
optimize!(model)
Pi = value.(Pi)
The first line of the error which repeats to great length is:
in mutable_operate! at MutableArithmetics/bPWR4/src/linear_algebra.jl:132