Using a second order solver, such as SDPT3, on a continuous variable problem, you are not likely to get a much smaller duality gap. And trying for a larger duality gap might not save you much, if any, computing time…
Thanks for your kind help.
Yes, I am just trying to set a larger duality gap as the stopping criterion, such as 1e-5. I’ve read the two links shared by you but I didn’t obtain enough information. Could you please tell me the exact matlab code? Thanks!
cvx_precision Controls CVX solver precision.
The cvx_precision command controls the precision-related stopping criteria
for the numerical solver. Up to 3 precision levels can be specified:
0 <= PBEST <= PHIGH <= PLOW << 1.
— PBEST: the solver’s target precision. The solver is instructed
to iterate until it achieves this precision OR until it can
make no further progress.
— PHIGH: the ‘standard’ precision level. Any problem achieving
PRECISION <= PHIGH is considered accurately solved (returning
cvx_status = ‘Solved’).
— PLOW: the ‘minimum acceptable’ precision level. Any problem
achieving PHIGH < PRECISION <= PLOW is considered inaccurately
solved (returning cvx_status = ‘Inaccurate/Solved’).
Problems which cannot achieve PRECISION <= PLOW are considered unsolved
(returning cvx_status = ‘Failed’). These precision levels apply in
appropriate ways to infeasible and unbounded problems as well.
cvx_precision(TOL), where TOL is a positive scalar, sets
PBEST = MAX(TOL,eps^0.5), PHIGH = TOL,
PLOW = min(sqrt(TOL),max(TOL,eps^0.25)).
Note that if TOL>eps^0.25, then PLOW=PHIGH.
cvx_precision(TOL), where TOL is a nonnegative 2-vector,
PBEST = MAX(MIN(TOL),eps^0.5), PHIGH = MIN(TOL), and PLOW = MAX(TOL).
cvx_precision(TOL), where TOL is a 3-vector, sets
PBEST = MIN(TOL), PHIGH = MEDIAN(TOL), and PLOW = MAX(TOL).
MIN(TOL) may be zero, but the other two elements must be positive.
A number of text-based options are provided for convenience:
cvx_precision DEFAULT: [eps^0.5, eps^0.5, eps^0.25 ]
cvx_precision HIGH : [eps^0.75, eps^0.75, eps^0.375]
cvx_precision MEDIUM : [eps^0.5, eps^0.375, eps^0.25 ]
cvx_precision LOW : [eps^0.5, eps^0.25, eps^0.25 ]
cvx_precision BEST : [0, eps^0.5, eps^0.25 ]
cvx_precision([]) is the same as cvx_precision DEFAULT.
cvx_precision BEST creates a 'best effort' mode. By setting PBSET=0,
it instructs the solver to proceed as long as it can make any useful
progress. By setting PLOW and PHIGH to their default values, it returns
exactly the same CVX_STATUS values as the DEFAULT setting. Therefore,
it yields higher precision when it can be achieved, without penalizing
models for which it cannot. Of course, higher precision comes at a cost
of increased computation time as well.
If cvx_precision(TOL) is called within a model---that is, between the
statements CVX_BEGIN and CVX_END---then the new precision applies only to
that particular model. If called outside of a model, then the change
applies to all subsequent models.
On exit, cvx_precision(TOL) returns the *previous* precision, so that it
can be saved and restored later; for example:
otol = cvx_precision(tol);
cvx_begin
...
cvx_end
cvx_precision(otol);
Of course, this is equivalent to
cvx_begin
cvx_precision(tol);
...
cvx_end
but the former syntax it may come in handy if you wish to solve several
models in a row with a different precision.
cvx_precision, with no arguments, returns the current precision value.
I use Gurobi as the CVX solver and I am not sure how can I change the Gap. I used cvx_solver_settings( ‘{name}’, {value} ), however I don’t now exactly what should I use for the name to change the Gap. I also tried https://www.gurobi.com/documentation/9.0/refman/mipgapabs.html#parameter:MIPGapAbs method, but no change.
I would appreciate it, if you could help me with this problem.