CVX error when reaching cvx_end

Hello there,

I was trying to solve an analytic center finding problem via modelling it in CVX. After compilation of the model, CVX returned an error message, saying that…

x = analytic_center(A,b)
CVX Warning:
Models involving “log” or other functions in the log, exp, and entropy
family are solved using an experimental successive approximation method.
The method requires multiple calls to the solver, so it can be slow; and
in certain cases it fails to converge. See Appendix D of the the user’s
guide for more information about this method, and for instructions on how
to suppress this warning in the future.
??? Undefined function or variable “tlX”.

Error in ==> cvxprob.solve at 314
tol = max( tlX );

Error in ==> cvx_end at 77
solve( prob );

Error in ==> analytic_center at 33
cvx_end

My model is

function [an_center, cvx_optval] = analytic_center(A,b)
n = size(A,2);
cvx_begin quiet
variable x(n);
maximize(sum(log(x)));
subject to
A*x==b;
x>=0;
cvx_end
an_center = x;
end

and I used random data to test the code:

A = randn(10,10);
b = randn(10,1);

I also have to mention that I use a startup.m file, which contains these lines:

addpath c:\users\user\documents\matlab'external libraries’\cvx
addpath c:\users\user\documents\matlab'external libraries’\cvx\structures
addpath c:\users\user\documents\matlab'external libraries’\cvx\lib
addpath c:\users\user\documents\matlab'external libraries’\cvx\functions
addpath c:\users\user\documents\matlab'external libraries’\cvx\commands
addpath c:\users\user\documents\matlab'external libraries’\cvx\builtins
addpath c:\users\user\documents\matlab'external libraries’\cvx\keywords
addpath c:\users\user\documents\matlab'external libraries’\cvx\sets
Problem didn’t solved by removing this file and rerunning cvx_setup.

I had used this code successfully years before, when I coded it as part of my BSc thesis. So, to get such an error by just running this code using the same CVX distribution installed to the same MATLAB version caught me by surprise. I’m pretty sure that I didn’t make any change in the CVX code (I don’t know how to upload solve.m here in order to have my claim verified). Please, suggest me a solution or workaround to this error.

I use CVX v. 1.22 in MATLAB 7.6, under Windows 8.1 x64.
d

This is not a complete answer, so mcg can add to this,

Try running it without the quiet option. Given the way you’re generating the random data for A and b, the probability that your problem is feasible (constraints are satisfied for any x) is essentially nil. Is this really the problem formulation you want? When you ran the code years ago, what was your input data A and b? Your Ax == b with x>=0 is essentially overdetermined (min component of any x satisfying Ax=b will be < 0), when I think you want an underdetermined system.

Edit: With A and b as defined. the probability of the problem being feasible is about 1 in 1000.

I’m afraid there is absolutely no way I can support version 1.22 anymore, particularly with the successive approximation code. You really do need to update at least to version 2.1.

That said, if your objective is just sum(log(x)) you should replace it with geo_mean(x). You’ll get the same result and you won’t need to use the successive approximation hack at all.