sdpsetting for optimization problem

417 views
Skip to first unread message

Negar Tabibpour

unread,
Sep 29, 2016, 3:24:50 PM9/29/16
to YALMIP
hello 
i want to solve an optimization problem ,but I do not know what order should I use for sdpsetting?

Johan Löfberg

unread,
Sep 29, 2016, 3:26:27 PM9/29/16
to YALMIP
There is no order, just field followed by value

Negar Tabibpour

unread,
Oct 2, 2016, 12:56:58 AM10/2/16
to YALMIP
i need a solver to solve operation optimization problem in yalmip ,CPLEX is used before this ,but i cant download that .what is other solvers to solve operation optimization problem?

Johan Löfberg

unread,
Oct 2, 2016, 4:35:07 AM10/2/16
to YALMIP
Message has been deleted

Negar Tabibpour

unread,
Oct 10, 2016, 3:13:33 AM10/10/16
to YALMIP
Hi, 
Thank you. Now I get a new error in my optimization code and I am not sure how to solve it,
When I run my mfile script the following error comes up

>> projectFinall
Error using solvesdp (line 98)
First argument (F) should be a constraint object.

Error in optimize (line 31)
varargout{:} = solvesdp(varargin{:});

Error in projectFinall (line 110)
sol = optimize(Constraint,Objective,Options);
 

Johan Löfberg

unread,
Oct 10, 2016, 3:58:03 AM10/10/16
to YALMIP
Well obviously you are not sending a constraint as the first argument in solvesdp (which is obsolete, it is called optimize)

Negar Tabibpour

unread,
Oct 14, 2016, 1:21:20 AM10/14/16
to YALMIP
Thank you for all your help.
The error that matlab is shows has something to do with the way that the constraints are written. I tried to rewrite my code based on Matlab recommendation but it still does not work, can you take a look at the script please ?

Johan Löfberg

unread,
Oct 14, 2016, 1:56:30 AM10/14/16
to YALMIP
What script?
Message has been deleted

Johan Löfberg

unread,
Oct 14, 2016, 2:09:29 AM10/14/16
to YALMIP

Constraints=[ 1 > == Spurt+Ssellt                    ↑
Error: Unexpected MATLAB operator.

Please the the basic tutorial on how constraints are defined

Johan Löfberg

unread,
Oct 14, 2016, 2:16:31 AM10/14/16
to YALMIP
And your code makes no sense as all expressions in your constraints are numerical data which means all comparisons evaluates to logic data, which will causes MATLAB to terminate as it cannot concatenate numerical data of different dimensions.

Additionally, you are using strict inequalities > which isn't allowed (it runs, but YALMIP will tell you that you shouldn't use it as it doesn't support it really. Everything is non-strict in solvers)

Johan Löfberg

unread,
Oct 14, 2016, 2:21:46 AM10/14/16
to YALMIP
It also looks like you think you can solve this using a linear solver (as you appear to want to use cplex), but the problem is nonlinear as you have nonconvex bilinear constraints.

Negar Tabibpour

unread,
Oct 28, 2016, 4:38:42 AM10/28/16
to YALMIP
hello ,Thanks a lot for your help again,it means a lot to me .i was able to solve the issues my coding had with your hints,however, as I remember ,you said the problem is nonlinear while i was using linear solvers and i didn't make a change .i am now getting some errors when i try to run the m-file.I have attached the m-file for you to take a look at.Please let me know how to fix them,thanks.
projectfinalD.m
error.png

Johan Löfberg

unread,
Oct 28, 2016, 4:48:02 AM10/28/16
to YALMIP
Constraints is just a list ones, so the code makes no sense

Johan Löfberg

unread,
Oct 28, 2016, 4:49:06 AM10/28/16
to YALMIP
and your options make no sense.

Options = sdpsettings('solver','cplex','verbos','1','solver','bmibnb');


You want to use both cplex and bmibnb?. And it should be 'verbose',1

Negar Tabibpour

unread,
Oct 28, 2016, 5:23:04 AM10/28/16
to YALMIP
some of the errors matlab gave me as regarding the constraints that i  had deleted them.
and unfortunately i dont have enough knowledge about sdpsetting and i just wanted to test these settings.

Johan Löfberg

unread,
Oct 28, 2016, 5:24:36 AM10/28/16
to YALMIP
so you've understood now where the problem is?

Negar Tabibpour

unread,
Oct 28, 2016, 5:30:00 AM10/28/16
to YALMIP
No,can you explain more or refine the code?

Johan Löfberg

unread,
Oct 28, 2016, 5:33:40 AM10/28/16
to YALMIP
This is your problem

>> Constraints

Constraints =

 
Columns 1 through 15

     
1     1     1     1     1     1     1     1     1     1     1     1     1     1     1

 
Columns 16 through 26

     
1     1     1     1     1     1     1     1     1     1     0



Negar Tabibpour

unread,
Oct 28, 2016, 5:44:11 AM10/28/16
to YALMIP
Now what should i do to resolve this problem

Johan Löfberg

unread,
Oct 28, 2016, 6:45:07 AM10/28/16
to YALMIP
1. Understand which variable is crazy (Constraints)
2. Figure out on which line that variable is defined
3. Look at the objects which you use to define it
4. Understand why those objects look like they do, and fix that

Negar Tabibpour

unread,
Oct 30, 2016, 4:15:14 AM10/30/16
to YALMIP
Hi again, i changed my constraints and now i know what was the problem with my coding. I have fixed the problem by using Sedumi and sdpt3  solvers. In the meanwhile though, i am not sure what the major differences are between these two solvers
projectfinalE.m

Johan Löfberg

unread,
Oct 30, 2016, 4:21:45 AM10/30/16
to YALMIP
For the casual user, no difference.

Negar Tabibpour

unread,
Oct 31, 2016, 10:16:22 AM10/31/16
to YALMIP
thank you very much.
Reply all
Reply to author
Forward
0 new messages