Hello everyone!
Here is a code I have tried to solve an LMI
But it failed.
How can I fix it? Will this code give the solution?
using Convex
using SCS
using LinearAlgebra
n = 2
P = Semidefinite(n)
Z12=zeros(Int8, 2, 2)
Z13=zeros(Int8, 2, 2)
Z14=zeros(Int8, 2, 2)
Z15=zeros(Int8, 2, 2)
Z16=zeros(Int8, 2, 2)
Z21=zeros(Int8, 2, 2)
Z23=zeros(Int8, 2, 2)
Z24=zeros(Int8, 2, 2)
Z25=zeros(Int8, 2, 2)
Z26=zeros(Int8, 2, 2)
Z31=zeros(Int8, 2, 2)
Z32=zeros(Int8, 2, 2)
Z34=zeros(Int8, 2, 2)
Z35=zeros(Int8, 2, 2)
Z36=zeros(Int8, 2, 2)
Z41=zeros(Int8, 2, 2)
Z42=zeros(Int8, 2, 2)
Z43=zeros(Int8, 2, 2)
Z45=zeros(Int8, 2, 2)
Z46=zeros(Int8, 2, 2)
Z51=zeros(Int8, 2, 2)
Z52=zeros(Int8, 2, 2)
Z53=zeros(Int8, 2, 2)
Z54=zeros(Int8, 2, 2)
Z56=zeros(Int8, 2, 2)
Z61=zeros(Int8, 2, 2)
Z62=zeros(Int8, 2, 2)
Z63=zeros(Int8, 2, 2)
Z64=zeros(Int8, 2, 2)
Z65=zeros(Int8, 2, 2)
P1=[1.1 0; 0 1.1]
P2=[2.1 0; 0 2.1]
P3=[3.1 0; 0 3.1]
P4=[4.1 0; 0 4.1]
P5=[5.1 0; 0 5.1]
P6=[6.1 0; 0 6.1]
Id=1*Matrix{Float64}(I, 12, 12)
C=1*Matrix{Float64}(I, 2, 2)
R=1*Matrix{Float64}(I, 2, 2)
S=0.3*Matrix{Float64}(I, 2, 2)
Q2=3*Matrix{Float64}(I, 2, 2)
Q1=2*Matrix{Float64}(I, 2, 2)
B=0.0001*Matrix{Float64}(I, 2, 2)
Q =[-2 1; 1 -3]
A = [0 1; 0 -0.5]
P1VARON=inv(P1)
P2VARON=inv(P2)
P3VARON=inv(P3)
P4VARON=inv(P4)
P5VARON=inv(P5)
P6VARON=inv(P6)
rho = Variable()
elementmatone=A'*P+P'A-C'*Q*C-rho*P+(P1+P2+P3+P4+P5)*1/2
R1=[elementmatone Z12 Z13 Z14 Z15 Z16]
R2=[Z21 2*P*P1VARON*P' Z13 Z14 Z15 Z16]
R3=[Z31 Z32 B'*P*P2VARON*P'*B Z34 Z35 Z36]
R4=[Z41 Z42 Z43 2*P*P3VARON*P' Z45 Z46]
R5=[Z51 Z52 Z53 Z54 B'*P4VARON*B Z56]
R6=[Z61 Z62 Z63 Z64 Z65 (2*P-C'*S)*P5VARON]
LMI1=[-R1;-R2;-R3;-R4;-R5;-R6]
p.objective = rho
p.constraints = [(LMI1>Id),(P>0)]
p = minimize(rho, constraints)
solve!(p)
Here is the error I got
julia> using Convex
julia> using SCS
julia> using LinearAlgebra
julia> n = 2
2
julia> P = Semidefinite(n)
Variable
size: (2, 2)
sign: real
vexity: affine
id: 106β¦234
julia> Z12=zeros(Int8, 2, 2)
2Γ2 Matrix{Int8}:
0 0
0 0
julia> Z13=zeros(Int8, 2, 2)
2Γ2 Matrix{Int8}:
0 0
0 0
julia> Z14=zeros(Int8, 2, 2)
2Γ2 Matrix{Int8}:
0 0
0 0
julia> Z15=zeros(Int8, 2, 2)
2Γ2 Matrix{Int8}:
0 0
0 0
julia> Z16=zeros(Int8, 2, 2)
2Γ2 Matrix{Int8}:
0 0
0 0
julia> Z21=zeros(Int8, 2, 2)
2Γ2 Matrix{Int8}:
0 0
0 0
julia> Z23=zeros(Int8, 2, 2)
2Γ2 Matrix{Int8}:
0 0
0 0
julia> Z24=zeros(Int8, 2, 2)
2Γ2 Matrix{Int8}:
0 0
0 0
julia> Z25=zeros(Int8, 2, 2)
2Γ2 Matrix{Int8}:
0 0
0 0
julia> Z26=zeros(Int8, 2, 2)
2Γ2 Matrix{Int8}:
0 0
0 0
julia> Z31=zeros(Int8, 2, 2)
2Γ2 Matrix{Int8}:
0 0
0 0
julia> Z32=zeros(Int8, 2, 2)
2Γ2 Matrix{Int8}:
0 0
0 0
julia> Z34=zeros(Int8, 2, 2)
2Γ2 Matrix{Int8}:
0 0
0 0
julia> Z35=zeros(Int8, 2, 2)
2Γ2 Matrix{Int8}:
0 0
0 0
julia> Z36=zeros(Int8, 2, 2)
2Γ2 Matrix{Int8}:
0 0
0 0
julia> Z41=zeros(Int8, 2, 2)
2Γ2 Matrix{Int8}:
0 0
0 0
julia> Z42=zeros(Int8, 2, 2)
2Γ2 Matrix{Int8}:
0 0
0 0
julia> Z43=zeros(Int8, 2, 2)
2Γ2 Matrix{Int8}:
0 0
0 0
julia> Z45=zeros(Int8, 2, 2)
2Γ2 Matrix{Int8}:
0 0
0 0
julia> Z46=zeros(Int8, 2, 2)
2Γ2 Matrix{Int8}:
0 0
0 0
julia> Z51=zeros(Int8, 2, 2)
2Γ2 Matrix{Int8}:
0 0
0 0
julia> Z52=zeros(Int8, 2, 2)
2Γ2 Matrix{Int8}:
0 0
0 0
julia> Z53=zeros(Int8, 2, 2)
2Γ2 Matrix{Int8}:
0 0
0 0
julia> Z54=zeros(Int8, 2, 2)
2Γ2 Matrix{Int8}:
0 0
0 0
julia> Z56=zeros(Int8, 2, 2)
2Γ2 Matrix{Int8}:
0 0
0 0
julia> Z61=zeros(Int8, 2, 2)
2Γ2 Matrix{Int8}:
0 0
0 0
julia> Z62=zeros(Int8, 2, 2)
2Γ2 Matrix{Int8}:
0 0
0 0
julia> Z63=zeros(Int8, 2, 2)
2Γ2 Matrix{Int8}:
0 0
0 0
julia> Z64=zeros(Int8, 2, 2)
2Γ2 Matrix{Int8}:
0 0
0 0
julia> Z65=zeros(Int8, 2, 2)
2Γ2 Matrix{Int8}:
0 0
0 0
julia> P1=[1.1 0; 0 1.1]
2Γ2 Matrix{Float64}:
1.1 0.0
0.0 1.1
julia> P2=[2.1 0; 0 2.1]
2Γ2 Matrix{Float64}:
2.1 0.0
0.0 2.1
julia> P3=[3.1 0; 0 3.1]
2Γ2 Matrix{Float64}:
3.1 0.0
0.0 3.1
julia> P4=[4.1 0; 0 4.1]
2Γ2 Matrix{Float64}:
4.1 0.0
0.0 4.1
julia> P5=[5.1 0; 0 5.1]
2Γ2 Matrix{Float64}:
5.1 0.0
0.0 5.1
julia> P6=[6.1 0; 0 6.1]
2Γ2 Matrix{Float64}:
6.1 0.0
0.0 6.1
julia> Id=1*Matrix{Float64}(I, 12, 12)
12Γ12 Matrix{Float64}:
1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0
julia> C=1*Matrix{Float64}(I, 2, 2)
2Γ2 Matrix{Float64}:
1.0 0.0
0.0 1.0
julia> R=1*Matrix{Float64}(I, 2, 2)
2Γ2 Matrix{Float64}:
1.0 0.0
0.0 1.0
julia> S=0.3*Matrix{Float64}(I, 2, 2)
2Γ2 Matrix{Float64}:
0.3 0.0
0.0 0.3
julia> Q2=3*Matrix{Float64}(I, 2, 2)
2Γ2 Matrix{Float64}:
3.0 0.0
0.0 3.0
julia> Q1=2*Matrix{Float64}(I, 2, 2)
2Γ2 Matrix{Float64}:
2.0 0.0
0.0 2.0
julia> B=0.0001*Matrix{Float64}(I, 2, 2)
2Γ2 Matrix{Float64}:
0.0001 0.0
0.0 0.0001
julia> Q =[-2 1; 1 -3]
2Γ2 Matrix{Int64}:
-2 1
1 -3
julia> A = [0 1; 0 -0.5]
2Γ2 Matrix{Float64}:
0.0 1.0
0.0 -0.5
julia> P1VARON=inv(P1)
2Γ2 Matrix{Float64}:
0.909091 0.0
0.0 0.909091
julia> P2VARON=inv(P2)
2Γ2 Matrix{Float64}:
0.47619 0.0
0.0 0.47619
julia> P3VARON=inv(P3)
2Γ2 Matrix{Float64}:
0.322581 0.0
0.0 0.322581
julia> P4VARON=inv(P4)
2Γ2 Matrix{Float64}:
0.243902 0.0
0.0 0.243902
julia> P5VARON=inv(P5)
2Γ2 Matrix{Float64}:
0.196078 0.0
0.0 0.196078
julia> P6VARON=inv(P6)
2Γ2 Matrix{Float64}:
0.163934 0.0
0.0 0.163934
julia> rho = Variable()
Variable
size: (1, 1)
sign: real
vexity: affine
id: 243β¦140
julia> elementmatone=A'*P+P'A-C'*Q*C-rho*P+(P1+P2+P3+P4+P5)*1/2
β Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
β @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
β Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
β @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
β Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
β @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
+ (Convex.NotDcp; real)
ββ * (affine; real)
β ββ 2Γ2 adjoint(::Matrix{Float64}) with eltype Float64
β ββ 2Γ2 real variable (id: 106β¦234)
ββ * (affine; real)
β ββ adjoint (affine; real)
β β ββ 2Γ2 real variable (id: 106β¦234)
β ββ 2Γ2 Matrix{Float64}
ββ 2Γ2 Matrix{Float64}
ββ - (Convex.NotDcp; real)
β ββ * (Convex.NotDcp; real)
β ββ real variable (id: 243β¦140)
β ββ 2Γ2 real variable (id: 106β¦234)
ββ 2Γ2 Matrix{Float64}
julia> R1=[elementmatone Z12 Z13 Z14 Z15 Z16]
β Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
β @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
β Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
β @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
β Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
β @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
β Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
β @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
hcat (Convex.NotDcp; real)
ββ + (Convex.NotDcp; real)
β ββ * (affine; real)
β β ββ 2Γ2 adjoint(::Matrix{Float64}) with eltype Float64
β β ββ 2Γ2 real variable (id: 106β¦234)
β ββ * (affine; real)
β β ββ adjoint (affine; real)
β β β ββ β¦
β β ββ 2Γ2 Matrix{Float64}
β ββ 2Γ2 Matrix{Float64}
β ββ - (Convex.NotDcp; real)
β β ββ * (Convex.NotDcp; real)
β β ββ β¦
β β ββ β¦
β ββ 2Γ2 Matrix{Float64}
ββ 2Γ2 Matrix{Int8}
ββ 2Γ2 Matrix{Int8}
ββ 2Γ2 Matrix{Int8}
ββ 2Γ2 Matrix{Int8}
ββ 2Γ2 Matrix{Int8}
julia> R2=[Z21 2*P*P1VARON*P' Z13 Z14 Z15 Z16]
β Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
β @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
β Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
β @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
hcat (Convex.NotDcp; real)
ββ 2Γ2 Matrix{Int8}
ββ * (Convex.NotDcp; real)
β ββ * (affine; real)
β β ββ * (affine; real)
β β β ββ β¦
β β β ββ β¦
β β ββ 2Γ2 Matrix{Float64}
β ββ adjoint (affine; real)
β ββ 2Γ2 real variable (id: 106β¦234)
ββ 2Γ2 Matrix{Int8}
ββ 2Γ2 Matrix{Int8}
ββ 2Γ2 Matrix{Int8}
ββ 2Γ2 Matrix{Int8}
julia> R3=[Z31 Z32 B'*P*P2VARON*P'*B Z34 Z35 Z36]
β Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
β @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
β Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
β @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
β Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
β @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
β Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
β @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
β Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
β @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
hcat (Convex.NotDcp; real)
ββ 2Γ2 Matrix{Int8}
ββ 2Γ2 Matrix{Int8}
ββ * (Convex.NotDcp; real)
β ββ * (Convex.NotDcp; real)
β β ββ * (affine; real)
β β β ββ β¦
β β β ββ β¦
β β ββ adjoint (affine; real)
β β ββ β¦
β ββ 2Γ2 Matrix{Float64}
ββ 2Γ2 Matrix{Int8}
ββ 2Γ2 Matrix{Int8}
ββ 2Γ2 Matrix{Int8}
julia> R4=[Z41 Z42 Z43 2*P*P3VARON*P' Z45 Z46]
β Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
β @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
β Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
β @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
hcat (Convex.NotDcp; real)
ββ 2Γ2 Matrix{Int8}
ββ 2Γ2 Matrix{Int8}
ββ 2Γ2 Matrix{Int8}
ββ * (Convex.NotDcp; real)
β ββ * (affine; real)
β β ββ * (affine; real)
β β β ββ β¦
β β β ββ β¦
β β ββ 2Γ2 Matrix{Float64}
β ββ adjoint (affine; real)
β ββ 2Γ2 real variable (id: 106β¦234)
ββ 2Γ2 Matrix{Int8}
ββ 2Γ2 Matrix{Int8}
julia> R5=[Z51 Z52 Z53 Z54 B'*P4VARON*B Z56]
2Γ12 Matrix{Float64}:
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.43902e-9 0.0 0.0 0.0
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.43902e-9 0.0 0.0
julia> R6=[Z61 Z62 Z63 Z64 Z65 (2*P-C'*S)*P5VARON]
hcat (affine; real)
ββ 2Γ2 Matrix{Int8}
ββ 2Γ2 Matrix{Int8}
ββ 2Γ2 Matrix{Int8}
ββ 2Γ2 Matrix{Int8}
ββ 2Γ2 Matrix{Int8}
ββ * (affine; real)
ββ + (affine; real)
β ββ * (affine; real)
β β ββ β¦
β β ββ β¦
β ββ 2Γ2 Matrix{Float64}
ββ 2Γ2 Matrix{Float64}
julia> LMI1=[-R1;-R2;-R3;-R4;-R5;-R6]
β Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
β @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
β Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
β @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
β Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
β @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
β Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
β @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
β Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
β @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
β Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
β @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
β Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
β @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
β Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
β @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
β Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
β @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
β Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
β @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
β Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
β @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
β Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
β @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
β Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
β @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
β Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
β @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
β Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
β @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
β Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
β @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
β Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
β @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
β Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
β @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
β Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
β @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
β Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
β @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
transpose (Convex.NotDcp; real)
ββ hcat (Convex.NotDcp; real)
ββ transpose (Convex.NotDcp; real)
β ββ - (Convex.NotDcp; real)
β ββ β¦
ββ transpose (Convex.NotDcp; real)
β ββ - (Convex.NotDcp; real)
β ββ β¦
ββ transpose (Convex.NotDcp; real)
β ββ - (Convex.NotDcp; real)
β ββ β¦
ββ transpose (Convex.NotDcp; real)
β ββ - (Convex.NotDcp; real)
β ββ β¦
ββ transpose (constant; negative)
β ββ 2Γ12 Matrix{Float64}
ββ transpose (affine; real)
ββ - (affine; real)
ββ β¦
julia> p.objective = rho
ERROR: UndefVarError: p not defined
Stacktrace:
[1] top-level scope
@ REPL[66]:1
julia> p.constraints = [(LMI1>Id),(P>0)]
ERROR: UndefVarError: p not defined
Stacktrace:
[1] top-level scope
@ REPL[67]:1
julia> p = minimize(rho, constraints)
ERROR: MethodError: no method matching minimize(::Variable, ::typeof(constraints))
Closest candidates are:
minimize(::Convex.AbstractExpr) at C:\Users\user\.julia\packages\Convex\UNspE\src\problems.jl:74
minimize(::Convex.AbstractExpr, ::Constraint...; numeric_type) at C:\Users\user\.julia\packages\Convex\UNspE\src\problems.jl:72
minimize(::Convex.AbstractExpr, ::Array{var"#s39", N} where {var"#s39"<:Constraint, N}; numeric_type) at C:\Users\user\.julia\packages\Convex\UNspE\src\problems.jl:74
Stacktrace:
[1] top-level scope
@ REPL[68]:1
julia> solve!(p)
ERROR: UndefVarError: p not defined
Stacktrace:
[1] top-level scope
@ REPL[69]:1
Any assistance you can provide would be greatly appreciated.