How can I custom the cvx precision


#1
cvx_begin    
cvx_solver_settings('cvx_precision',[1e-3,1e-3,1e-3]); 
..........................
cvx_end

I want to set the cvx precison, but there is no any detail about this content. I use the order cvx_solver_settings lin the way above but got nothing different. So how should I use the order to specify a precision value I want?


(Mark L. Stone) #2

Please re-read http://cvxr.com/cvx/doc/solver.html#controlling-precision

For cvx_solver_settings, you need to use name value pairs for parameter names specific to the solver you are invoking.

For cvx_precision, use one of
cvx_precision low:
cvx_precision medium
cvx_precision default:
cvx_precision high
cvx_precision best

and there are other calling methods as described in the above link.

The command
cvx_precision
displays the current CVX precision settings.

cvx_solver_settings provides more control and allows you to specify any parameter values the solver accepts. You need to look at the solver documentation to see the list of parameter names and how they are used by the solver.

The primal-dual solvers called by CVX often tend to get to some level of achievable precision in the solution, and the precision or solution achieved often doesn’t vary much or at all when precision parameters are adjusted over a fairly wide range of values. That is not true however for first order solvers such as SCS, which can be called by CVX 3.0beta, and only converge at a linear rate.


#3

You see, I want change the fundamental value of precision, i.e. 2.22e-16. The cvx_user’s guide says as following,
To create a new custom setting for the current solver,use this syntax:
cvx_solver_settings(’{name}’,{value})
{name} must be a valid MATLAB variable/field name. {value} van be any valid Matlab object.

What does that mean? what’s a valid MATLAB variable/field name or valid Matlab object? Is there any example to custom solver settings?


(Mark L. Stone) #4

There is an example at Handling a strict positive semidefinite constraint in CVX