MaxMinProblem:Maximum Number of Iterations Exceeded

229 views
Skip to first unread message

COD

unread,
Mar 5, 2014, 12:29:03 PM3/5/14
to yal...@googlegroups.com
I have the following optimization problem
https://drive.google.com/file/d/0B39N8ztL-yN3U2dpQmxZYTc0NHM/edit?usp=sharing
the problem can be reformulated by introducing a variable t in the objective function as
https://drive.google.com/file/d/0B39N8ztL-yN3d1BDNG91cmlNVDQ/edit?usp=sharing
The problem is convex and I am using IPOPT solver to solve it.
following are the data and code file.
code     data
The solver takes too much time and runs out of iterations giving me the solution matrices for p and w.
results
Should I treat them as optimum values?
Why is the solver runs out of iterations? Should I use a different solver/tool.
I am trying to implement a paper in which the the authors have missed the term 'w' is not there in the denominator of the fraction inside the log term in the 1st constraint (As pointed out johan sir in my post in CompSci forum(link)) (That makes their problem non-convex(After adding w it becomes convex))
Should I modal the problem differently? Also Can I some how speed up the process?
Please Help!!

Johan Löfberg

unread,
Mar 5, 2014, 12:33:33 PM3/5/14
to yal...@googlegroups.com
Undefined variable GainMacro.

Error in DataFemto10 (line 45)
I
(k) =  (sum((PowerFemto/N).*
GainMacro(:,k)));


COD

unread,
Mar 5, 2014, 12:51:39 PM3/5/14
to yal...@googlegroups.com
There is a mistake in the data file. here is the new data file.

DataFemto10.m

Johan Löfberg

unread,
Mar 5, 2014, 1:26:16 PM3/5/14
to yal...@googlegroups.com
Your model is simply numerically very poor. You essentially have log(1+A/(B*1e-12)). That will lead to pure numerical garbage in most numerical solvers. fmincon, ipopt and knitro all show the same failure numerically. With a reasonable scale on the data (e.g., when sigma is 0.001 or so) the problem is easily solved with ipopt.

Perhaps you could refomulate and get something which works better, such as log(B*1e-12 + A) - log(B) - log2(1e-12). Could still causes issues though as B*1e-12 drowns in comparison with A
Message has been deleted

COD

unread,
Mar 6, 2014, 7:03:44 AM3/6/14
to yal...@googlegroups.com
Sir I precomputed

H(k)/(sigma+I(k)) = F(k) (The value of F(k) is small)
So my function basically is

W log2(1+(P*F)/W)

Now I can write the 1st constraint as

t <= sum((B/N)*(-1*rel_entr(W(:,k),
W(:,k)+(P(:,k).*F(k)))))

This works in CVX. But YALMIP gives me an error.
Does the rel_entr operator handled differently in YALMIP and CVX?
Here are my CVX and YALMIP code+data files
YALMIP(Data+Code)
CVX(data+code)

Johan Löfberg

unread,
Mar 6, 2014, 8:35:43 AM3/6/14
to yal...@googlegroups.com
You will still have a horrible problem due to your lousy numerics with those small numbers

rel_entr is a CVX-specific command. If you don't want to use logarithm directly as you can do in YALMIP (as you already do), you can construct it using entropy and cross-entropy.  xlog(x/y) = -entropy(x) + crossentropy(x,y)

Johan Löfberg

unread,
Mar 6, 2014, 8:39:01 AM3/6/14
to yal...@googlegroups.com
I think the best model for your model is along the lines of the original, i.e., stuff*log(1+more stuff). That keeps the solver away from singularities of the logarithmic function. You just have to sort out your poor scaling.

COD

unread,
Mar 7, 2014, 3:04:32 AM3/7/14
to yal...@googlegroups.com
Thank you sir..:)

Peixi Liu

unread,
Oct 11, 2019, 11:25:48 PM10/11/19
to YALMIP
Hi, Dr. Löfberg. I tried -entropy(x) + crossentropy(x,y) in yalpmip with mosek solver, and it turns out that "Solver not applicable (mosek)" .  Do you know how to fix this? Thanks!

Johan Löfberg

unread,
Oct 12, 2019, 5:19:17 AM10/12/19
to YALMIP
crossentropy is neither convex nor concave, so it can not be formulated as exp-cone problem

Peixi Liu

unread,
Oct 12, 2019, 6:52:38 AM10/12/19
to YALMIP
Is there a way to transform rel_entr into a form which YALMIP allows, please?

Johan Löfberg

unread,
Oct 12, 2019, 6:57:43 AM10/12/19
to YALMIP
Reply all
Reply to author
Forward
0 new messages