Does it make a difference?

39 views
Skip to first unread message

Hossein Ghafarian

unread,
Feb 7, 2016, 3:45:21 AM2/7/16
to YALMIP
Dear Johan,

I have a semidefinite problem which I solved using YALMIP with solvers mosek. Unfortunately with a system with 12 core and 24 GB memory, the problem didn't complete. Mainly because of lack of enough memory. So, I am searching for a method to present problem more compactly to the YALMIP and solver. 

My question: I have two semidefinite variables related together, L>=0 and G>=0. I can represent them in terms of another symmetric but necessarily semidefinite matrix X as  L=X.*C and G=X.*D where D and C are constant matrices . Does it make a difference to just use X.*C>=0 and X.*D>=0 instead of L >=0 and G>=0 ?  Both in terms of memory and speed?
Are YALMIP/Solver defines a semidefinite variable for every constraint? if a block of two semidefinite variables are equal does it make element-by-element equality constraints between them? If yes, isn't it a way to circumvent this problem?  

Thank you very much 
Hossein 

Johan Löfberg

unread,
Feb 7, 2016, 12:07:31 PM2/7/16
to YALMIP
It can make a huge difference how you model things. However, it is not clear what you actually do now. If L and G have these dependencies, how do you get that connection now. Are they described using some other set of variables y, or through equalities? Code that runs is always beneficial to understand what you are trying to ask

Hossein Ghafarian

unread,
Feb 7, 2016, 3:45:15 PM2/7/16
to YALMIP
What now I used regarding L and G are as follows:
G   =sdpvar(n+1,n+1);
L    =sdpvar(n+1,n+1);
L    = [R.*G_plus(1:n,1:n) ,1+u;(1+u)',t];
plus some constraints and other variables. In this way, are they described using some other set of variables, or through equalities? I need to understand how YALMIP/Solver deals with this specific problem. Is it defines a set of equality constraints between L and G?

Thank you very much. 

Johan Löfberg

unread,
Feb 8, 2016, 1:49:43 AM2/8/16
to YALMIP
Your first creation of L makes no sense, as it is immediately overwritten

Johan Löfberg

unread,
Feb 8, 2016, 1:50:53 AM2/8/16
to YALMIP
and it is not clear if you ever use G, as it isn't referenced in the third line when you define L (you only use G_plus)

Johan Löfberg

unread,
Feb 8, 2016, 1:52:05 AM2/8/16
to YALMIP
...and there are no equalities here. Looks like you should go through the basics tutorial in the wiki. Equalities are defined using == in constraints

Hossein Ghafarian

unread,
Feb 8, 2016, 8:10:51 AM2/8/16
to YALMIP
Dear Johan, 
Sorry, in L we use parts of G. That becomes 
G   =sdpvar(n+1,n+1);
L    = [R.*G(1:n,1:n) ,1+u;(1+u)',t]; % G_plus was a mistake. 
I need to understand how YALMIP/Solver deals with this specific problem. I know that equalities are defined using ==, but if YALMIP doesn't use equality between elements of L and G, how else it can be presented to the solver?

If I show L>=0 and G>=0 as C.*X>=0 , D.*X>=0 ,repectively, Doesn't YALMIP/Solver have to define  a variable for each of them? in order to impose these semidefinite constraints. 
I am asking this question for knowing what to do with my original question, i.e., How to define two related semidefinite constraints like L and G, efficiently to YALMIP? 

Thank you very much. 

Johan Löfberg

unread,
Feb 8, 2016, 8:24:07 AM2/8/16
to YALMIP
So

G   =sdpvar(n+1,n+1);
L    = [R.*G(1:n,1:n) ,1+u;(1+u)
',t];
Model = [L>=0,G>=0,etc]

means that the only variables are those characterizing G. There will (n+1)*(n+2)/2 variables in the semidefinite program 

Unless R has some very simple specific structure which you haven't revealed, writing it as above and simply sending that model to the solver will be the most efficient model possible

Hossein Ghafarian

unread,
Feb 8, 2016, 9:58:11 AM2/8/16
to YALMIP
Dear Johan,
R hasn't any specific structure except it is semidefinite. Also u is a variable. I just don't understand how this problem can be converted by YALMIP ( solver) to the form: min. c^T x , s.t. A(x)=b without defining equality constraints between parts of L and G? 
 
I thought if we define X=[G,h;h',1], where h=[1+u;0]; that is append last row (and column) of L to G to make X. and then define L=G.*X and G=1_G.*X , where C(1:n,1:n)=R and 1_G(i,j)=1 if 1<=i,j<=n. It may reduce the amount of memory or time needed. 
How do you suggest to increase speed of this problem? Does projection ( or prox, i.e. operator splitting ) methods can make this problem faster? Already, I used SCS with YALMIP which is good, But I want to know if it's possible to make it faster.   

Thank you very much.

Johan Löfberg

unread,
Feb 8, 2016, 10:00:32 AM2/8/16
to YALMIP
YALMIP interprets everything as a parameterization of the dual model (which also looks to be the most suitable interpretation of your model)
Reply all
Reply to author
Forward
0 new messages