Maximum Iterations Exceeded

819 views
Skip to first unread message

zwei

unread,
Sep 5, 2013, 6:25:22 AM9/5/13
to yal...@googlegroups.com
Hi,

I have a problem with maximum number of iterations exceeded. The code is below:

%Declare variables and data
x=sdpvar(201,1);
mu=1.35:-0.3/199:1.05+0.3/199;
a0=[-mu';-1.05;-1];
sigma=0.65:-0.6/199:0.05+0.6/199;
a1=[sigma'-mu';1.05;-1];
z=sdpvar(199,1);
w=sdpvar(199,1);
a3=[mu';1.05;-1];

%Budget Constraint
F4=[a3'*x-sum(abs(z))-45.921*max(abs(w))>=0, z+w==sigma'.*x(1:199), sum(x(1:200))==1, x(1:200)>=0];


solvesdp(F4,-x(201));
plot(double(x(1:200)),'^','MarkerEdgeColor','m');


Exiting: Maximum number of iterations exceeded; increase options.MaxIter.

I get the above error. How do I increase the maximum iterations?

Thanks!

PS: I use sdpt3



Johan Löfberg

unread,
Sep 5, 2013, 6:28:32 AM9/5/13
to yal...@googlegroups.com
Why are you using SDPT3? Isn't this a simple LP

Anyway, sdpt3 options are avaible through sdpsettings as any other option
http://users.isy.liu.se/johanl/yalmip/pmwiki.php?n=Tutorials.Basics

zwei

unread,
Sep 5, 2013, 10:18:52 AM9/5/13
to yal...@googlegroups.com
Hi,

options = sdpsettings('MaxIter',100);
Error using sdpsettings (line 1652)
The property name 'MaxIter' is obsolete. Sorry...

What does this error mean? Thank you very much!





Johan Löfberg

unread,
Sep 5, 2013, 11:46:20 AM9/5/13
to yal...@googlegroups.com
sdpt3.maxiter

It is a property of the solver, not a general YALMIP property

zwei

unread,
Nov 8, 2013, 11:41:05 AM11/8/13
to yal...@googlegroups.com
Hi Johan,

it has been a while.

%Declare Variables
x=sdpvar(201,1);
mu=1.35:-0.3/199:1.05+0.3/199;
sigma=0.65:-0.6/199:0.05+0.6/199;
z=sdpvar(199,1);
w=sdpvar(199,1);
a3=[mu';1.05;-1];

%Budgeted RC
F4=[a3'*x-sum(abs(z))-45.921*max(abs(w))>=0, z+w==sigma'.*x(1:199), sum(x(1:200))==1, x(1:200)>=0];
solvesdp(F4,-x(201));
Exiting: Maximum number of iterations exceeded; increase options.MaxIter.

I did not install any solver, so it seems like matlab has some in-built solver. I am using version 2013b.

Therefore, I wrote:
options.MaxIter=10000000000000000;

and I did it again, and had the same problem.

The funny thing is, after I installed sdpt3 and tried the above code again but now with an additional code:

sdpsettings('solver','sdpt3');
solvesdp(F4,-x(201));

I get the same error again.

Exiting: Maximum number of iterations exceeded; increase options.MaxIter.

So it seems that matlab just ignored by sdpsettings command and used its inbuilt solver instead.

I tried with lpsolve and the same problem occurs. (Although I do not know if I installed lpsolve correctly by adding (lpsolve55.dll) and (mxlpsolve.mexw64) to my working directory).

Thanks very much in advance!

Johan Löfberg

unread,
Nov 8, 2013, 1:37:49 PM11/8/13
to yal...@googlegroups.com
You are using linprog. Look at the struct returned from solvesdp and you will see this.

To set options, you must supply the options structure to solvesdp (third argument)
Reply all
Reply to author
Forward
0 new messages