These days I tried to port a symmetric positive semi-definite quadratic programming problem to a conic optimization problem. So-far I was able to transcribe the problem into a cone program, however it seems that still some options tuning is necessary, since all the iterations end up with an exitflag -7. Before I shall present the problem specification as a conic optimization problem and a snippet of the evaluation process, I shortly present a result of an example that is close to the solution. Moreover, it is worth noting that some examples finished up with the correct solution despite the consecutive appearance of the exitflag -7. In addition, I followed the piece of advice of the documentation to change the solver, but this had no effect. The same happened while changing the tolerance value from
up to
. Due to the following returned outcome of an example, I suppose that I am on the right track, though the result below is not correct
8.4966 11.5004 5.5087 23.0781 50.0829
The returned result of the evaluation is close to the expected solution below
8.5000 11.5000 5.5000 23.0833 50.0833
which let me suppose that I encounter some numerical issues that I cannot localize. In the hope that a different angle may solve the puzzle, I present now the parameters of the problem. Moreover, we have
, it should hold with equality. The subsequent options setting has been chosen:
opts = optimoptions("coneprog","OptimalityTolerance",1e-12,"ConstraintTolerance",1e-12,"LinearSolver","auto")
And the cone problem is specified as:
Asc((end+1),(end+1)) = 1;
d = [zeros(size(b(:)));1];
socConstraints = secondordercone(Asc,bsc,d,gamma);
[u,fval,exitflag,output,lambda]=coneprog(c,socConstraints,Aineq,bineq,Aeq,a(m),lb,ub,opts)
In this respect, it might be useful to compare the above problem with the symmetric positive semi-definite quadratic programming problem:
[x,fval,exitflag,output,lambda] = quadprog(Q,b,[],[],E(m,:),a(m),vi,ra,x,opts);
Furthermore, I want now to present some snippets of the evaluation process to observe the options and output structure settings.
ConstraintTolerance: 1.0000e-12
OptimalityTolerance: 1.0000e-12
Search direction is small and current iterate is not within the specified constraint and/or optimality tolerance.
primalfeasibility: 1.0206e-11
dualfeasibility: 6.6721e-07
algorithm: 'interior-point'
linearsolver: 'augmented'
message: 'Search direction is small and current iterate is not within the specified constraint and/or optimality tolerance.'
8.4783 11.8906 5.2411 23.1990 49.8576
primalfeasibility: 1.0126e-11
dualfeasibility: 2.3589e-09
algorithm: 'interior-point'
linearsolver: 'augmented'
message: 'Search direction is small and current iterate is not within the specified constraint and/or optimality tolerance.'
Warning: Probably no kernel point found!
> In cp_kernel>computePrk (line 215)
8.4966 11.5004 5.5087 23.0781 50.0829
My question is now: which options must be tuned to get the correct result? Or has the cone problem specification a major flaw, which I have overlooked?
Thank you very much in advance for the kind support and any suggestion of improvements.
EDIT 15 Sep 2021
Thanks to the kind and excellent support of Aykut Bulut I could solve the above precision issue by reformulating the cone problem. For those who are looking for some inspiration for their own work, I present the reformulated cone problem by
Asc((end+1),(end+1)) = 1;
d = [zeros(size(b(:)));1];
socConstraints = secondordercone(Asc,bsc,d,gamma);
[u,fval,exitflag,output,lambda]=coneprog(c,socConstraints,Aineq,bineq,Aeq,a(m),lb,ub,opts);