Nonlinear Complementarity Problem using yalmip?

203 views
Skip to first unread message

Bardia Hassanzadeh

unread,
Feb 10, 2014, 12:28:57 PM2/10/14
to yal...@googlegroups.com
Hi,

I was wondering if there is a way to implement a Nonlinear Complementarity Problem (NCP) as described here using YALMIP.
Or is there a way to write this as an optimization problem to make it understandable by YALMIP?
If 'Yes' what solver would you recommend?

Thank you very much in advance.

Sincerely,
Bardia

Johan Löfberg

unread,
Feb 10, 2014, 12:41:05 PM2/10/14
to yal...@googlegroups.com
Support for dedicated solvers is on the todo-list. The framework is already there, as it is supported for linear models (using big-M reformulations). For nonlinear models, you just have to attack it using a standard nonlinear solver (fmincon, snopt, ipopt etc, or a global solver such as bmibnb or baron, or model it as a MINLP and solve globally using bmibnb, baron or locally with bonmin or bnb)

This
sdpvar x y
solvesdp
([complements(x>=0,y^2-1>=0)],(x-1)^2+y^2,sdpsettings('solver','fmincon'))
will currently fall back to the obvious nonlinear model
sdpvar x y
solvesdp
([x>=0,y^2-1>=0,x*(y^2-1)==0],(x-1)^2+y^2,sdpsettings('solver','fmincon'))



 

Mark L. Stone

unread,
Feb 10, 2014, 1:15:34 PM2/10/14
to yal...@googlegroups.com
Complementarity constraints can be specified, and treated "specially", under the MATLAB interface (among some others) for KNITRO 9.0 - see http://www.artelys.com/knitro_doc/2_userGuide/complementarity.html .  KNITRO 9.0 is not supported under YALMIP, but perhaps Yohan can provide an update on any plans to do so.  See https://groups.google.com/forum/#!topic/yalmip/LUVeMFII1NY .
Message has been deleted

Johan Löfberg

unread,
Feb 10, 2014, 2:08:15 PM2/10/14
to yal...@googlegroups.com
I don't see what the QPs have to do with everything. If you want to solve a complementarity problem without any objective, there is nothing special to it

solvesdp([x>=0, f(x)>=0,x'*f(x)==0])


Bardia Hassanzadeh

unread,
Feb 10, 2014, 2:17:58 PM2/10/14
to yal...@googlegroups.com
Thank you Johan I really appreciate your reply.
The NCP is there to handle consistency constraints between the QPs. Actually I wanted it to be a bilevel optimization problem but I only had a NCP and I couldn't figure out how to configure it as an outer problem.
So with this following code, including the KKT conditions of QPs, can I set the outer problem like this?

solvesdp([x>=0, f(x)>=0,x'*f(x)==0,KKT1,KKT2,Bounds])


"Thank you very much for your feedback. My question actually was that what should I do If I wanted to satisfy some NCP without having an Objective Function at hand.
For example, I solve a series of QPs independently and then I wanted to check whether some NCP is satisfied or not.    

Sincerely,
Bardia"

Johan Löfberg

unread,
Feb 10, 2014, 2:22:08 PM2/10/14
to yal...@googlegroups.com
Still not clear- If you have solved a QP and want to check that a condition holds, that is not an optimization problem (simply checking, just compute the values and look at them)

If you want to optimize over KKT conditions in quadratic programs, don't miss the built-in operators for kkt systems, complementary models arising there, and bilvel programming etc

Bardia Hassanzadeh

unread,
Feb 10, 2014, 2:31:27 PM2/10/14
to yal...@googlegroups.com
The QPs are the result of a Lagrangian Dual Decomposition as described in page 21 in here and the consistency constraints are there to update "\lambda". My problem is very similar to what appeared in this page but I wanted to solve it as a bilevel optimization problem with NCPs as the outer layer.
Thank you very much for you time.

Johan Löfberg

unread,
Feb 11, 2014, 12:16:14 PM2/11/14
to yal...@googlegroups.com
Will be included the next release.
Reply all
Reply to author
Forward
0 new messages