How to export the coefficient matrix of a quadratic constraint programming (QCP) problem

48 views
Skip to first unread message

Cheng Wang

unread,
Aug 1, 2016, 12:06:56 PM8/1/16
to YALMIP
Hi everyone,

I programmed a QCP model using yalmip and would like to export the coefficient matrix. The export code is as below.

"[model,recoverymodel,diagnostic,internalmodel] = export(F,f_gas,sdpsettings('solver','cplex','verbose',0))"

However, the number of variables of the exported model is larger than the original model. i.e. the number of variables of the exported model is 1416, the number of variables of the original model is 744, and the recoverymodel.used_variables=744. 

I appreciate your attention and discussion. Thanks.

Cheng

Johan Löfberg

unread,
Aug 1, 2016, 12:10:48 PM8/1/16
to YALMIP
Yes, YALMIP will introduce a bunch of new variables to normalize the quadratic forms, so what is the actual question?
Message has been deleted

Cheng Wang

unread,
Aug 1, 2016, 12:18:18 PM8/1/16
to YALMIP
Thanks Johan for your quick reply. I would like to solve the problem using cplexqcp. I don't know how to set a initial value using optimize command. If it works, what is the proper initial value for the unused variables? Should them all be zeros?

Johan Löfberg

unread,
Aug 1, 2016, 12:23:40 PM8/1/16
to YALMIP
Why would you want to give an initial solution to cplex? Most likely, it will have no significant benefit.

I think it would be a mess to figure out the initial values for the artificially added variables They are easily computed, but it requires some bookkeeping. Basically, quadratic constraints are written asSOCPs ||Ax + b|| <= cx, i.e, z = [cx;Ax+b] is in the socp cone. YALMIP introduces z new set of variables z, and equality constraints just described, and tells cplex that z is in the socp cone, or something like that. Hence, if you have initials on x, you have the initials for z too

Cheng Wang

unread,
Aug 1, 2016, 2:40:49 PM8/1/16
to YALMIP
I got it. The QCP problem is convex, so the initial value is unnecessary. Thanks Johan.
Reply all
Reply to author
Forward
0 new messages