http://www.mathworks.com/matlabcentral/newsreader/view_thread/284525
MATLAB Central Newsreader  Optimization using Heaviside function
Feed for thread: Optimization using Heaviside function
enus
©19942014 by MathWorks, Inc.
webmaster@mathworks.com
MATLAB Central Newsreader
http://blogs.law.harvard.edu/tech/rss
60
MathWorks
http://www.mathworks.com/images/membrane_icon.gif

Sun, 13 Jun 2010 17:37:03 +0000
Optimization using Heaviside function
http://www.mathworks.com/matlabcentral/newsreader/view_thread/284525#754090
Petros
I try to run a onevariable optimization of a function that makes use of the heaviside function.<br>
<br>
I have:<br>
Q={700 if x(1)<5, 600 if 5<x(1)<10, 200 if 10<x(1)} or using heaviside functions,<br>
Q=700100*heaviside(x(1)5)400*heaviside(x(1)10)<br>
<br>
also I have <br>
P=100+100*heaviside(x(1)6)+400*heaviside(x(1)13)<br>
<br>
bound: x(1)>0<br>
<br>
I want to minimize f=QP<br>
<br>
I always get:<br>
Optimization completed because the objective function is nondecreasing in <br>
feasible directions, to within the default value of the function tolerance,<br>
and constraints were satisfied to within the default value of the constraint tolerance.<br>
<br>
and I get as solution the point I give as starting point. I believe the problem is the heavisides?<br>
<br>
Thanks.

Sun, 13 Jun 2010 18:25:06 +0000
Re: Optimization using Heaviside function
http://www.mathworks.com/matlabcentral/newsreader/view_thread/284525#754097
Roger Stafford
"Petros " <p3tris@gmail.com> wrote in message <hv34vv$91u$1@fred.mathworks.com>...<br>
> I try to run a onevariable optimization of a function that makes use of the heaviside function.<br>
> <br>
> I have:<br>
> Q={700 if x(1)<5, 600 if 5<x(1)<10, 200 if 10<x(1)} or using heaviside functions,<br>
> Q=700100*heaviside(x(1)5)400*heaviside(x(1)10)<br>
> <br>
> also I have <br>
> P=100+100*heaviside(x(1)6)+400*heaviside(x(1)13)<br>
> <br>
> bound: x(1)>0<br>
> <br>
> I want to minimize f=QP<br>
> <br>
> I always get:<br>
> Optimization completed because the objective function is nondecreasing in <br>
> feasible directions, to within the default value of the function tolerance,<br>
> and constraints were satisfied to within the default value of the constraint tolerance.<br>
> <br>
> and I get as solution the point I give as starting point. I believe the problem is the heavisides?<br>
> <br>
> Thanks.<br>
<br>
It is not appropriate to use the standard optimization routines for step functions like this. These optimization routines typically depend heavily on their input functions being continuous and preferably possessing continuous derivatives, which is most certainly not true of the heavyside function.<br>
<br>
In any case you are making a very hard job out of an easy one. Just evaluate PQ at and on either side of each step and find the minimum of these. What could be simpler?<br>
<br>
Roger Stafford

Sun, 13 Jun 2010 18:33:27 +0000
Re: Optimization using Heaviside function
http://www.mathworks.com/matlabcentral/newsreader/view_thread/284525#754099
Walter Roberson
Petros wrote:<br>
> I try to run a onevariable optimization of a function that makes use of <br>
> the heaviside function.<br>
<br>
> I always get:<br>
> Optimization completed because the objective function is nondecreasing <br>
> in feasible directions, to within the default value of the function <br>
> tolerance,<br>
> and constraints were satisfied to within the default value of the <br>
> constraint tolerance.<br>
<br>
Which minimizer are you using? A number of the minimizers assume that <br>
the differential of the function is continuous, which is not the case <br>
for Heaviside. Or to put it another way, your graph is too smooth <br>
(indeed, it is mostly flat), and most minimizers need a slope to work with.<br>
<br>
You don't need a full minimizer for functions such as that: you only <br>
have to test both sides of each boundary condition.

Sun, 13 Jun 2010 18:43:03 +0000
Re: Optimization using Heaviside function
http://www.mathworks.com/matlabcentral/newsreader/view_thread/284525#754100
Petros
Thanks for replying. Really the function is not that one. The real function is a 2variable function with quadratic parts and heaviside functions. I just wanted to start with something simpler. I cannot avoid the heaviside functions unfortunately, because they represent decisions made by a controller. So, the functions are<br>
<br>
P={a if 0<x1<5; b if 5<x1} and<br>
Q={c if 0<x2<19; d if 19<x2} and<br>
L=(QPQ0)*FINE(QPQ0) where <br>
FINE(QPQ0)={e if 0<(QPQ0)<100; f if 100<(QPQ0)<200}<br>
<br>
And I try to maximize (QPL) or minimize (QPL).<br>
It's not something I can do by hand for repeated problems and I thought matlab could help me out.<br>
<br>
Thanks again.

Sun, 13 Jun 2010 19:06:03 +0000
Re: Optimization using Heaviside function
http://www.mathworks.com/matlabcentral/newsreader/view_thread/284525#754102
Petros
If I use an approximation like: heaviside(x)=1/(1+exp(50000*x)) which gives a good approximation of the heaviside funtion, will it be ok for using fmincon?

Sun, 13 Jun 2010 19:48:03 +0000
Re: Optimization using Heaviside function
http://www.mathworks.com/matlabcentral/newsreader/view_thread/284525#754104
Roger Stafford
"Petros " <p3tris@gmail.com> wrote in message <hv38rn$sfv$1@fred.mathworks.com>...<br>
> Thanks for replying. Really the function is not that one. The real function is a 2variable function with quadratic parts and heaviside functions. I just wanted to start with something simpler. I cannot avoid the heaviside functions unfortunately, because they represent decisions made by a controller. So, the functions are<br>
> <br>
> P={a if 0<x1<5; b if 5<x1} and<br>
> Q={c if 0<x2<19; d if 19<x2} and<br>
> L=(QPQ0)*FINE(QPQ0) where <br>
> FINE(QPQ0)={e if 0<(QPQ0)<100; f if 100<(QPQ0)<200}<br>
> <br>
> And I try to maximize (QPL) or minimize (QPL).<br>
> It's not something I can do by hand for repeated problems and I thought matlab could help me out.<br>
> <br>
> Thanks again.<br>
<br>
You haven't stated what Q0 is, but if it's like P and Q, then you still have a step function, though in two variables. That is, the function is constant over various rectangular regions in the xy plane, (or I should say x1x2 plane.) In spite of the '*' operation it is in no sense a quadratic function. The standard optimization routines still cannot handle these flat planar regions properly.<br>
<br>
I think you have no choice but to evaluate the function on either side of its discontinuities and select the minimum or maximum. After all, the answer lies among only finitely many possible sums, differences, and products of the numbers, a, b, c, d, e, and f. It is a mistake to invoke routines that are attuned to deal with a (nearly) infinite continuum of values?<br>
<br>
Roger Stafford

Sun, 13 Jun 2010 20:25:04 +0000
Re: Optimization using Heaviside function
http://www.mathworks.com/matlabcentral/newsreader/view_thread/284525#754109
Roger Stafford
(Ignoring the as yet unspecified Q0,) you have discontinuities along the x1 axis only at 0 and 5, and along the x2 axis at 0 and 19. Define<br>
<br>
x1 = [01,(0+5)/2,5+1];<br>
x2 = [01,(0+19)/2,19+1];<br>
<br>
Now evaluate QPL at each of the nine combinations of values in x1 and x2. That is, at<br>
<br>
[X1,X2] = meshgrid(x1,x2);<br>
<br>
and select the maximum of these nine QPL values.<br>
<br>
As long as your function consists only of constant rectangular regions as in the case you have described, this kind of procedure should be all that is necessary to find the maximum. It is only when the total number of combined discontinuities are too large for practical computation that more heroic methods become necessary.<br>
<br>
Roger Stafford

Sun, 13 Jun 2010 20:25:05 +0000
Re: Optimization using Heaviside function
http://www.mathworks.com/matlabcentral/newsreader/view_thread/284525#754110
Petros
I understand what you are saying. But, these functions get really complicated. How do I check finite number of possible solutions? I have managed to plot a few of them with syms and ezsurf() after that what?<br>
<br>
Q0 is a constant and the equation sometimes goes:<br>
<br>
P={c*x2^2 if x2<5; d*x2^2+e*x2 if x2>5}<br>
<br>
that's why I said quadratic. If I use the approximation I stated above and use the fmincon, will it be ok?

Sun, 13 Jun 2010 20:59:04 +0000
Re: Optimization using Heaviside function
http://www.mathworks.com/matlabcentral/newsreader/view_thread/284525#754113
John D'Errico
"Petros " <p3tris@gmail.com> wrote in message <hv3a6r$ip3$1@fred.mathworks.com>...<br>
> If I use an approximation like: heaviside(x)=1/(1+exp(50000*x)) which gives a good approximation of the heaviside funtion, will it be ok for using fmincon?<br>
<br>
NO!!!!!!!<br>
<br>
You don't understand that the problem is the nondifferentiability<br>
of your function, when you then try to use an optimizer that is<br>
designed to work on a differentiable objective function.<br>
<br>
Creating a function that is IDENTICAL to a step function in ALL<br>
respects when used in floating point arithmetic is not a valid<br>
solution, since that function is also essentially nondifferentiable<br>
in terms of floating point arithmetic.<br>
<br>
You can't fool mathematics by being tricky.<br>
<br>
John

Sun, 13 Jun 2010 22:42:04 +0000
Re: Optimization using Heaviside function
http://www.mathworks.com/matlabcentral/newsreader/view_thread/284525#754120
Roger Stafford
"Petros " <p3tris@gmail.com> wrote in message <hv3er0$nk7$1@fred.mathworks.com>...<br>
> I understand what you are saying. But, these functions get really complicated. How do I check finite number of possible solutions? I have managed to plot a few of them with syms and ezsurf() after that what?<br>
> <br>
> Q0 is a constant and the equation sometimes goes:<br>
> <br>
> P={c*x2^2 if x2<5; d*x2^2+e*x2 if x2>5}<br>
> <br>
> that's why I said quadratic. If I use the approximation I stated above and use the fmincon, will it be ok?<br>
<br>
I have bad news for you Petros! As John has pointed out, using exp(50000*x) will do you no good at all. It is necessary to face the discontinuities as they stand and deal with them effectively.<br>
<br>
It would be easily possible to use combinations of heavysidetype equations in such a way that would produce many not necessarily rectangular regions in the x1x2 space in which the boundaries are discontinuous for the objective function and inside of which that function is variable in complex ways even though "smooth". If you contemplate something of this kind, I believe there is no option for you but to handle each such region separately, using an optimization routine on each if necessary. I know of no matlab routine that would automatically carry out such an analysis for you.<br>
<br>
Wasn't it Euclid who said to King Ptolemy, "there is no Royal Road to geometry"? An analogous remark might conceivably be made of functions composed of complicated heavysidetype combinations.<br>
<br>
Roger Stafford

Mon, 14 Jun 2010 02:06:44 +0000
Re: Optimization using Heaviside function
http://www.mathworks.com/matlabcentral/newsreader/view_thread/284525#754134
Greg Heath
On Jun 13, 1:37 pm, "Petros " <p3t...@gmail.com> wrote:<br>
> I try to run a onevariable optimization of a function that makes use of the heaviside function.<br>
><br>
> I have:<br>
> Q={700 if x(1)<5, 600 if 5<x(1)<10, 200 if 10<x(1)} or using heaviside functions,<br>
> Q=700100*heaviside(x(1)5)400*heaviside(x(1)10)<br>
><br>
> also I have<br>
> P=100+100*heaviside(x(1)6)+400*heaviside(x(1)13)<br>
><br>
> bound: x(1)>0<br>
><br>
> I want to minimize f=QP<br>
><br>
> I always get:<br>
> Optimization completed because the objective function is nondecreasing in<br>
> feasible directions, to within the default value of the function tolerance,<br>
> and constraints were satisfied to within the default value of the constraint tolerance.<br>
><br>
> and I get as solution the point I give as starting point. I believe the problem is the heavisides?<br>
><br>
> Thanks.<br>
<br>
If that, indeed, is your ONLY problem then you probably can<br>
sneak up on the answer by replacing the Heaviside by a<br>
sequence of logsigs (if you have the NN Toolbox otherwise<br>
just use the definition)<br>
<br>
logsig(a(n)*x) = 1/(1+exp(a(n)*x))<br>
<br>
a(n) > a(n1) >= a(1) = 1<br>
<br>
Hope this helps.<br>
<br>
Greg

Mon, 14 Jun 2010 07:58:03 +0000
Re: Optimization using Heaviside function
http://www.mathworks.com/matlabcentral/newsreader/view_thread/284525#754164
Petros
Greg Heath <heath@alumni.brown.edu> wrote in message <dde7f674e072434d821310ee9a1a9d2e@5g2000vbf.googlegroups.com>...<br>
> On Jun 13, 1:37 pm, "Petros " <p3t...@gmail.com> wrote:<br>
> > I try to run a onevariable optimization of a function that makes use of the heaviside function.<br>
> ><br>
> > I have:<br>
> > Q={700 if x(1)<5, 600 if 5<x(1)<10, 200 if 10<x(1)} or using heaviside functions,<br>
> > Q=700100*heaviside(x(1)5)400*heaviside(x(1)10)<br>
> ><br>
> > also I have<br>
> > P=100+100*heaviside(x(1)6)+400*heaviside(x(1)13)<br>
> ><br>
> > bound: x(1)>0<br>
> ><br>
> > I want to minimize f=QP<br>
> ><br>
> > I always get:<br>
> > Optimization completed because the objective function is nondecreasing in<br>
> > feasible directions, to within the default value of the function tolerance,<br>
> > and constraints were satisfied to within the default value of the constraint tolerance.<br>
> ><br>
> > and I get as solution the point I give as starting point. I believe the problem is the heavisides?<br>
> ><br>
> > Thanks.<br>
> <br>
> If that, indeed, is your ONLY problem then you probably can<br>
> sneak up on the answer by replacing the Heaviside by a<br>
> sequence of logsigs (if you have the NN Toolbox otherwise<br>
> just use the definition)<br>
> <br>
> logsig(a(n)*x) = 1/(1+exp(a(n)*x))<br>
> <br>
> a(n) > a(n1) >= a(1) = 1<br>
> <br>
> Hope this helps.<br>
> <br>
> Greg<br>
<br>
Sorry, didn't get that NN thing. <br>
<br>
I understand what all you people are saying and I agree. The problem is that with a rough estimation I have made the full scale problem will have more than 100 000 "pieces". That is why I hoped for the optimization. I can do it brute force (with x1 x2 increments of 0.1) but... Normally, if I aggregate all the heaviside in large number I can approximate each function with fit curve 2a+b*x+c*x^2+..." and go from there. I will go with the brute force program now and I will see how it goes. <br>
<br>
Thanks for help. You gave me plenty ideas and helped me focus.

Mon, 14 Jun 2010 13:10:57 +0000
Re: Optimization using Heaviside function
http://www.mathworks.com/matlabcentral/newsreader/view_thread/284525#754225
Greg Heath
On Jun 14, 3:58 am, "Petros " <p3t...@gmail.com> wrote:<br>
> Greg Heath <he...@alumni.brown.edu> wrote in message <dde7f674e072434d821310ee9a1a9...@5g2000vbf.googlegroups.com>...<br>
> > On Jun 13, 1:37 pm, "Petros " <p3t...@gmail.com> wrote:<br>
> > > I try to run a onevariable optimization of a function that makes use of the heaviside function.<br>
><br>
> > > I have:<br>
> > > Q={700 if x(1)<5, 600 if 5<x(1)<10, 200 if 10<x(1)} or using heaviside functions,<br>
> > > Q=700100*heaviside(x(1)5)400*heaviside(x(1)10)<br>
><br>
> > > also I have<br>
> > > P=100+100*heaviside(x(1)6)+400*heaviside(x(1)13)<br>
><br>
> > > bound: x(1)>0<br>
><br>
> > > I want to minimize f=QP<br>
><br>
> > > I always get:<br>
> > > Optimization completed because the objective function is nondecreasing in<br>
> > > feasible directions, to within the default value of the function tolerance,<br>
> > > and constraints were satisfied to within the default value of the constraint tolerance.<br>
><br>
> > > and I get as solution the point I give as starting point. I believe the problem is the heavisides?<br>
><br>
> > > Thanks.<br>
><br>
> > If that, indeed, is your ONLY problem then you probably can<br>
> > sneak up on the answer by replacing the Heaviside by a<br>
> > sequence of logsigs (if you have the NN Toolbox otherwise<br>
> > just use the definition)<br>
><br>
> > logsig(a(n)*x) = 1/(1+exp(a(n)*x))<br>
><br>
> > a(n) > a(n1) >= a(1) = 1<br>
><br>
> > Hope this helps.<br>
><br>
> > Greg<br>
><br>
> Sorry, didn't get that NN thing.<br>
<br>
If you have the NN Tbx, then you can use the function "logsig".<br>
Otherwise, just use the definition and "exp".<br>
<br>
<br>
Greg

Mon, 14 Jun 2010 13:24:04 +0000
Re: Optimization using Heaviside function
http://www.mathworks.com/matlabcentral/newsreader/view_thread/284525#754227
Petros
I do have the NN toolbox (because I work at my university's pc which has all toolbox) but even if I use that, how do I solve the problem later?

Mon, 14 Jun 2010 14:20:34 +0000
Re: Optimization using Heaviside function
http://www.mathworks.com/matlabcentral/newsreader/view_thread/284525#754250
Steven Lord
<br>
"Petros " <p3tris@gmail.com> wrote in message <br>
news:hv34vv$91u$1@fred.mathworks.com...<br>
>I try to run a onevariable optimization of a function that makes use of <br>
>the heaviside function.<br>
><br>
> I have:<br>
> Q={700 if x(1)<5, 600 if 5<x(1)<10, 200 if 10<x(1)} or using heaviside <br>
> functions,<br>
> Q=700100*heaviside(x(1)5)400*heaviside(x(1)10)<br>
><br>
> also I have P=100+100*heaviside(x(1)6)+400*heaviside(x(1)13)<br>
><br>
> bound: x(1)>0<br>
><br>
> I want to minimize f=QP<br>
<br>
So Q's behavior changes at x1 = 5 and x1 = 10, while P's behavior changes at <br>
x1 = 6 and x1 = 13.<br>
<br>
Sounds like you have several problems here:<br>
<br>
f(1) = minimize QP on the interval (Inf, 5)<br>
f(2) = minimize QP on the interval (5, 6)<br>
f(3) = minimize QP on the interval (6, 10)<br>
f(4) = minimize QP on the interval (10, 13)<br>
f(5) = minimize QP on the interval (13, Inf)<br>
<br>
Now the minimum of your whole function is the minimum value among the f's.<br>
<br>
*snip*<br>
<br>
> and I get as solution the point I give as starting point. I believe the <br>
> problem is the heavisides?<br>
<br>
The problem is the discontinuitites, as Roger and John have said.<br>
<br>
 <br>
Steve Lord<br>
slord@mathworks.com<br>
comp.softsys.matlab (CSSM) FAQ: <a href="http://matlabwiki.mathworks.com/MATLAB_FAQ">http://matlabwiki.mathworks.com/MATLAB_FAQ</a><br>
To contact Technical Support use the Contact Us link on <br>
<a href="http://www.mathworks.com">http://www.mathworks.com</a>

Tue, 15 Jun 2010 17:14:36 +0000
Re: Optimization using Heaviside function
http://www.mathworks.com/matlabcentral/newsreader/view_thread/284525#754656
Greg Heath
On Jun 14, 9:24 am, "Petros " <p3t...@gmail.com> wrote:<br>
> I do have the NN toolbox (because I work at my university's pc which has all toolbox) but even if I use that, how do I solve the problem later?<br>
<br>
I thought you said that the discontinuous heaviside was<br>
your only problem.If that is true, try to construct a<br>
sequence of solutions where each new solution is based<br>
on replacing heaviside(z) with logsig(a(n)*z) with<br>
a(n) > a(n1) >= 1.<br>
<br>
Hope this helps.<br>
<br>
Greg

Wed, 16 Jun 2010 10:33:08 +0000
Re: Optimization using Heaviside function
http://www.mathworks.com/matlabcentral/newsreader/view_thread/284525#754809
Johan Löfberg
Greg Heath <heath@alumni.brown.edu> wrote in message <85578c571844440e952c6dda746ad5c3@t10g2000yqg.googlegroups.com>...<br>
> On Jun 14, 9:24 am, "Petros " <p3t...@gmail.com> wrote:<br>
> > I do have the NN toolbox (because I work at my university's pc which has all toolbox) but even if I use that, how do I solve the problem later?<br>
> <br>
> I thought you said that the discontinuous heaviside was<br>
> your only problem.If that is true, try to construct a<br>
> sequence of solutions where each new solution is based<br>
> on replacing heaviside(z) with logsig(a(n)*z) with<br>
> a(n) > a(n1) >= 1.<br>
> <br>
> Hope this helps.<br>
> <br>
> Greg<br>
<br>
<br>
If you are willing to use a mixedinteger solver (glpk, gurobi,cplex, etc), the following code implements my interpretation of your problem, in the modelling language YALMIP (free matlab toolbox)<br>
<br>
d1 = sdpvar(2,1);<br>
d2 = binvar(2,1);<br>
d3 = binvar(2,1);<br>
<br>
sdpvar L Q P x1 x2<br>
<br>
a = 1;<br>
b = 2;<br>
c = 3;<br>
d = 4;<br>
e = 5;<br>
f = 6;<br>
Q0 = 7;<br>
<br>
Constraints1 = [implies(d1(1),[P==a, 0<x1<5]),implies(d1(2),[P==b, x1>5]),sum(d1)==1]<br>
Constraints2 = [implies(d2(1),[Q==c, 0<x2<19]),implies(d2(2),[Q==d, x2>19]),sum(d2)==1];<br>
Constraints3 = [implies(d3(1),[L == (QPQ0)*e, 0<QPQ0<100])];<br>
Constraints4 = [implies(d3(2),[L == (QPQ0)*f, 100<QPQ0<200]),sum(d3)==1]<br>
Constraints = [Constraints1,Constraints2,Constraints3,Constraints4,1000<[L Q P x1 x2]<1000];<br>
solvesdp(Constraints,L)

Wed, 16 Jun 2010 10:36:07 +0000
Re: Optimization using Heaviside function
http://www.mathworks.com/matlabcentral/newsreader/view_thread/284525#754811
Johan Löfberg
whoops, should be <br>
<br>
d1 =binvar(2,1);<br>
<br>
<br>
<br>
"Johan Löfberg" <loefberg@control.ee.ethz.ch> wrote in message <hva994$jg3$1@fred.mathworks.com>...<br>
> Greg Heath <heath@alumni.brown.edu> wrote in message <85578c571844440e952c6dda746ad5c3@t10g2000yqg.googlegroups.com>...<br>
> > On Jun 14, 9:24 am, "Petros " <p3t...@gmail.com> wrote:<br>
> > > I do have the NN toolbox (because I work at my university's pc which has all toolbox) but even if I use that, how do I solve the problem later?<br>
> > <br>
> > I thought you said that the discontinuous heaviside was<br>
> > your only problem.If that is true, try to construct a<br>
> > sequence of solutions where each new solution is based<br>
> > on replacing heaviside(z) with logsig(a(n)*z) with<br>
> > a(n) > a(n1) >= 1.<br>
> > <br>
> > Hope this helps.<br>
> > <br>
> > Greg<br>
> <br>
> <br>
> If you are willing to use a mixedinteger solver (glpk, gurobi,cplex, etc), the following code implements my interpretation of your problem, in the modelling language YALMIP (free matlab toolbox)<br>
> <br>
> d1 = sdpvar(2,1);<br>
> d2 = binvar(2,1);<br>
> d3 = binvar(2,1);<br>
> <br>
> sdpvar L Q P x1 x2<br>
> <br>
> a = 1;<br>
> b = 2;<br>
> c = 3;<br>
> d = 4;<br>
> e = 5;<br>
> f = 6;<br>
> Q0 = 7;<br>
> <br>
> Constraints1 = [implies(d1(1),[P==a, 0<x1<5]),implies(d1(2),[P==b, x1>5]),sum(d1)==1]<br>
> Constraints2 = [implies(d2(1),[Q==c, 0<x2<19]),implies(d2(2),[Q==d, x2>19]),sum(d2)==1];<br>
> Constraints3 = [implies(d3(1),[L == (QPQ0)*e, 0<QPQ0<100])];<br>
> Constraints4 = [implies(d3(2),[L == (QPQ0)*f, 100<QPQ0<200]),sum(d3)==1]<br>
> Constraints = [Constraints1,Constraints2,Constraints3,Constraints4,1000<[L Q P x1 x2]<1000];<br>
> solvesdp(Constraints,L)