'Model creation failed (Model not available in objective at level 1)' #1379
Answered
by
johanlofberg
valuestay
asked this question in
Problems using YALMIP
-
Dear Professor,
errror:
|
Beta Was this translation helpful? Give feedback.
Answered by
johanlofberg
Mar 6, 2024
Replies: 1 comment 2 replies
-
abs on complex expressions means norm, and then using that inside a quadratic will violate convexity propagation rules. Hence you will have to write the quadratic explicitly, something like
or model things using auxilliary variables and epigraphs, something like
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You are setting up a large nonconvex nonlinear program, so you are simply at the mercy of the performance of fmincon
Model looks bad too, you have things like stuff/t >= constant which should be written as stuff >= t*constant to avoid singularity-inducing nonlinearity
You also might want to impose sparsity to make computations inside fmincon, and yalmip faster by not doing e = stuff and then create e'*e but instead define new variable e with constraint e==stuff, thus creating very sparse quadratics (if stuff is a dense operator of the decision variables)
Yes changing f(x)==0 to f(x)<=0 will obviously create a different problem with possible different result if it is optimal to not satisfy…