Regarding implies usage and model creation failure

81 views
Skip to first unread message

Francis

unread,
Jan 2, 2017, 11:50:26 AM1/2/17
to YALMIP
Hi Johan,

I'm using Yalmip to solve an optimization problem, and I kept getting the warning "Warning: You have unbounded variables in an implication leading to a lousy big-M relaxation." and the error "Failed exporting the model: Model creation failed (See users.isy.liu.se/johanl/yalmip/pmwiki.php?n=Extra.SQRT)".

Regarding the first error, as far as I know, I defined all variables used in the implication, so I'm not sure where this warning comes from.

Also, I have no clue about the second error. The code is as follows:

Thank you!

Johan Löfberg

unread,
Jan 2, 2017, 12:43:15 PM1/2/17
to YALMIP
https://yalmip.github.io/squareroots/

Lopt will be a complex expression, and YALMIP will not be able to extract bounds on this expression, despite having bounds on all involved variables (the fact that you have an inequality on this expression does not help, YALMIP only does bound propagation from the involved variables, it does not search through the model to see if the expression is used in any other constraints. That ould be to expensive). Only way round that is to have Lopt as a variable, with bounds, , and add equalities instead to define it

Your DTInput is a nasty nonlinear thingy, and then you use that expression in the implications. YALMIP will probleably not be able to derive bounds on those objects, so you have to explicitly bound the expressions used in the implications.

If you actually manage to solve these problems in the end, you're very lucky. It looks like a very nasty nonlinear nonconvex integer program.

Francis

unread,
Jan 2, 2017, 2:08:30 PM1/2/17
to YALMIP
Hi Johan,

Thank you for your help.

I tried using sqrtm instead, the problem is still there, maybe this is because of the error casued by implies.

The reason of using L_opt (lambda) that way is trying to calculate f(lambda) which depends on lambda. Then  f(lambda) could be used to calculate Fx. As the model I used here is maybe the simplest one I can find, also it is not likely to use L_opt as an equality constraint here. So is there any other suggestions to improve the code?

DTInput is mainly used to calculate L_opt (lambda) here and in theory, it should look like this.

Enclosed is the model regarding L_opt (lambda), Flambda, and Fx.

Any comment would be helpful.

Thank you!
lambda.png
f(lambda).jpg
Fx.jpg

Johan Löfberg

unread,
Jan 2, 2017, 2:28:25 PM1/2/17
to YALMIP
Don't see what stops you from incorporating DTInput through an equality on Lopt instead of an assigment. You will not get YALMIP to propagate bounds unless you do that

Francis

unread,
Jan 2, 2017, 2:45:16 PM1/2/17
to YALMIP
I tried to replace the assignment with the equality constraint, it still does not work.

Francis

unread,
Jan 2, 2017, 2:50:57 PM1/2/17
to YALMIP
I also tried to use another model, which is a simpler in form but contains two more complicated atan operators.

Enclosed is another model.
MF.jpg

Johan Löfberg

unread,
Jan 2, 2017, 2:54:38 PM1/2/17
to YALMIP
doesn't seem to propagate nonlinears at all, so you'll have to add redundant constraint 0<=Lopt.^2<=16

Francis

unread,
Jan 2, 2017, 3:15:54 PM1/2/17
to YALMIP
also tried this and used different solvers, and I got this error when: "Error using optimizer/subsref (line 204)
After fixing parameters, there are still nonlinear operators in the model, but the solver does not support this. Note that YALMIP is not guaranteed to
remove all operators, even though they only contain parametric expressions. As an example, exp(1+parameter) will not be reduced, while exp(parameter) will.
You will have to use another solver, or reparameterize your model (look at exp(1+parameter) as a new parameter instead)".

Johan Löfberg

unread,
Jan 2, 2017, 3:17:42 PM1/2/17
to YALMIP
as it says, optimizer does not support parameters inside nonlinear operators

Francis

unread,
Jan 2, 2017, 4:05:09 PM1/2/17
to YALMIP
If I replace exp(x + 1) with a new variable y as it says, then I will also need to add a new constraint y == exp(x + 1). If I do this, will it give the same error?

Johan Löfberg

unread,
Jan 2, 2017, 4:06:33 PM1/2/17
to YALMIP
you change exp(x+1) to exp(y),y==x+1

Francis

unread,
Jan 2, 2017, 4:13:30 PM1/2/17
to YALMIP
Okay, I'll try.

Thank you!
Reply all
Reply to author
Forward
0 new messages