The value is cycling in the two value

optimal value is cycling with 1.89 and 1.68 , cannot reach the precision and jump out the loop
Status: Solved
Optimal value (cvx_optval): +1.68917

Calling Mosek 9.1.9: 123 variables, 60 equality constraints
For improved efficiency, Mosek is solving the dual problem.

MOSEK Version 9.1.9 (Build date: 2019-11-21 11:34:40)
Copyright © MOSEK ApS, Denmark. WWW: mosek.com
Platform: Windows/64-X86

Problem
Name :
Objective sense : min
Type : CONIC (conic optimization problem)
Constraints : 60
Cones : 30
Scalar variables : 123
Matrix variables : 0
Integer variables : 0

Optimizer started.
Presolve started.
Linear dependency checker started.
Linear dependency checker terminated.
Eliminator started.
Freed constraints in eliminator : 7
Eliminator terminated.
Eliminator - tries : 1 time : 0.00
Lin. dep. - tries : 1 time : 0.00
Lin. dep. - number : 0
Presolve terminated. Time: 0.01
Problem
Name :
Objective sense : min
Type : CONIC (conic optimization problem)
Constraints : 60
Cones : 30
Scalar variables : 123
Matrix variables : 0
Integer variables : 0

Optimizer - threads : 6
Optimizer - solved problem : the primal
Optimizer - Constraints : 15
Optimizer - Cones : 30
Optimizer - Scalar variables : 105 conic : 90
Optimizer - Semi-definite variables: 0 scalarized : 0
Factor - setup time : 0.00 dense det. time : 0.00
Factor - ML order time : 0.00 GP order time : 0.00
Factor - nonzeros before factor : 48 after factor : 56
Factor - dense dim. : 0 flops : 5.77e+02
ITE PFEAS DFEAS GFEAS PRSTATUS POBJ DOBJ MU TIME
0 1.0e+00 3.1e+01 2.9e+01 0.00e+00 2.780935265e+01 -3.721088630e-01 1.0e+00 0.03
1 3.1e-01 9.7e+00 1.3e+01 -7.91e-01 1.987424995e+01 -1.124571011e+00 3.1e-01 0.11
2 6.1e-02 1.9e+00 2.2e+00 -2.64e-01 3.824098374e+00 -2.690921954e+00 6.1e-02 0.11
3 3.2e-02 9.9e-01 8.5e-01 5.72e-01 6.501314516e-01 -3.109540287e+00 3.2e-02 0.11
4 1.4e-02 4.3e-01 2.3e-01 8.76e-01 -1.489795956e+00 -3.165033030e+00 1.4e-02 0.11
5 3.5e-03 1.1e-01 2.0e-02 1.30e+00 -2.228841846e+00 -2.590239840e+00 3.5e-03 0.13
6 8.8e-04 2.8e-02 2.4e-03 1.34e+00 -1.979982585e+00 -2.059774925e+00 8.8e-04 0.13
7 2.1e-04 6.5e-03 2.6e-04 1.17e+00 -1.910632827e+00 -1.927632333e+00 2.1e-04 0.13
8 2.4e-05 7.3e-04 9.1e-06 1.14e+00 -1.898190373e+00 -1.899979432e+00 2.4e-05 0.13
9 2.4e-06 7.5e-05 3.0e-07 1.06e+00 -1.895665080e+00 -1.895842090e+00 2.4e-06 0.13
10 4.4e-07 1.4e-05 2.4e-08 1.00e+00 -1.895510696e+00 -1.895543249e+00 4.4e-07 0.14
11 1.8e-08 5.6e-07 1.9e-10 1.00e+00 -1.895481983e+00 -1.895483306e+00 1.8e-08 0.14
12 6.2e-11 1.9e-09 3.9e-14 1.00e+00 -1.895480570e+00 -1.895480575e+00 6.2e-11 0.14
Optimizer terminated. Time: 0.19

Interior-point solution summary
Problem status : PRIMAL_AND_DUAL_FEASIBLE
Solution status : OPTIMAL
Primal. obj: -1.8954805704e+00 nrm: 4e+00 Viol. con: 8e-11 var: 2e-08 cones: 1e-10
Dual. obj: -1.8954805750e+00 nrm: 3e+01 Viol. con: 0e+00 var: 2e-09 cones: 0e+00
Optimizer summary
Optimizer - time: 0.19
Interior-point - iterations : 12 time: 0.14
Basis identification - time: 0.00
Primal - iterations : 0 time: 0.00
Dual - iterations : 0 time: 0.00
Clean primal - iterations : 0 time: 0.00
Clean dual - iterations : 0 time: 0.00
Simplex - time: 0.00
Primal simplex - iterations : 0 time: 0.00
Dual simplex - iterations : 0 time: 0.00
Mixed integer - relaxations: 0 time: 0.00


Status: Solved
Optimal value (cvx_optval): +1.89548

Calling Mosek 9.1.9: 123 variables, 60 equality constraints
For improved efficiency, Mosek is solving the dual problem.

MOSEK Version 9.1.9 (Build date: 2019-11-21 11:34:40)
Copyright © MOSEK ApS, Denmark. WWW: mosek.com
Platform: Windows/64-X86

Problem
Name :
Objective sense : min
Type : CONIC (conic optimization problem)
Constraints : 60
Cones : 30
Scalar variables : 123
Matrix variables : 0
Integer variables : 0

Optimizer started.
Presolve started.
Linear dependency checker started.
Linear dependency checker terminated.
Eliminator started.
Freed constraints in eliminator : 6
Eliminator terminated.
Eliminator - tries : 1 time : 0.00
Lin. dep. - tries : 1 time : 0.00
Lin. dep. - number : 0
Presolve terminated. Time: 0.01
Problem
Name :
Objective sense : min
Type : CONIC (conic optimization problem)
Constraints : 60
Cones : 30
Scalar variables : 123
Matrix variables : 0
Integer variables : 0

Optimizer - threads : 6
Optimizer - solved problem : the primal
Optimizer - Constraints : 14
Optimizer - Cones : 30
Optimizer - Scalar variables : 103 conic : 90
Optimizer - Semi-definite variables: 0 scalarized : 0
Factor - setup time : 0.00 dense det. time : 0.00
Factor - ML order time : 0.00 GP order time : 0.00
Factor - nonzeros before factor : 44 after factor : 52
Factor - dense dim. : 0 flops : 5.51e+02
ITE PFEAS DFEAS GFEAS PRSTATUS POBJ DOBJ MU TIME
0 1.0e+00 5.0e+02 2.6e+01 0.00e+00 2.439882319e+01 -3.721088630e-01 1.0e+00 0.03
1 2.9e-01 1.4e+02 1.2e+01 -8.40e-01 1.716999126e+01 -1.273499411e+00 2.9e-01 0.11
2 7.2e-02 3.6e+01 2.6e+00 -3.16e-01 4.062000995e+00 -3.043146118e+00 7.2e-02 0.11
3 1.3e-02 6.3e+00 1.8e-01 5.84e-01 -2.381226220e+00 -3.866984350e+00 1.3e-02 0.11
4 2.7e-03 1.3e+00 1.2e-02 1.35e+00 -2.392638119e+00 -2.663695614e+00 2.7e-03 0.13
5 7.6e-04 3.8e-01 1.8e-03 1.18e+00 -1.820571996e+00 -1.891172063e+00 7.6e-04 0.13
6 8.7e-05 4.4e-02 6.3e-05 1.14e+00 -1.703952546e+00 -1.711601667e+00 8.7e-05 0.13
7 6.8e-06 3.4e-03 1.1e-06 1.14e+00 -1.690401737e+00 -1.690963043e+00 6.8e-06 0.14
8 8.8e-07 4.4e-04 5.1e-08 1.07e+00 -1.689288370e+00 -1.689358468e+00 8.8e-07 0.14
9 1.6e-07 8.2e-05 4.1e-09 1.01e+00 -1.689182718e+00 -1.689195645e+00 1.6e-07 0.14
10 7.8e-09 3.9e-06 4.9e-11 1.00e+00 -1.689166169e+00 -1.689166775e+00 7.8e-09 0.14
11 5.0e-10 2.5e-07 7.9e-13 1.00e+00 -1.689165077e+00 -1.689165115e+00 5.0e-10 0.14
Optimizer terminated. Time: 0.17

Interior-point solution summary
Problem status : PRIMAL_AND_DUAL_FEASIBLE
Solution status : OPTIMAL
Primal. obj: -1.6891650765e+00 nrm: 4e-01 Viol. con: 3e-09 var: 4e-07 cones: 9e-10
Dual. obj: -1.6891651154e+00 nrm: 3e+01 Viol. con: 0e+00 var: 2e-08 cones: 0e+00
Optimizer summary
Optimizer - time: 0.17
Interior-point - iterations : 11 time: 0.14
Basis identification - time: 0.00
Primal - iterations : 0 time: 0.00
Dual - iterations : 0 time: 0.00
Clean primal - iterations : 0 time: 0.00
Clean dual - iterations : 0 time: 0.00
Simplex - time: 0.00
Primal simplex - iterations : 0 time: 0.00
Dual simplex - iterations : 0 time: 0.00
Mixed integer - relaxations: 0 time: 0.00


Status: Solved
Optimal value (cvx_optval): +1.68917

Why is this happening and how to solve it?

The log output shows Mosek solves the problem to fairly high accuracy. So from output there does not seem to be any issue.

I do not think it is possible say what is wrong based on the information provided since we no clue what you are doing beyond solving two optimization problems.

I am guessing you have implemented a higher level algorithm which solves a sequence of convex CVX optiimzation problems, feeding the result from one iteration of your algorithm into the input of the next. Perhaps Sequential Convex Programming, or alternating variables.

The good news is that when someone like Stephen Boyd applies such an algorithm to problems he shows in a book, paper, or class notes, it usually works well. The bad news is when an ordinary Joe applies such an algorithm they’ve implemented themself to their own problem, it often doesn’t converge at all (cycling is but one of many possibilities), and when it does converge, it may not be to a local optimum, let alone global optimum, of the original problem. Starting value, which is input to your high level algorithm, may have a significant effect on whether the overall algorithm converges at all, and if it does converge, what it converges to.

My advice: You are usuaully better off using a high quality nonlinear non-convex optimization solver, which implements line search, trust region, or other safegaurd, than to use you own unsophisticated, unsafeguarded, “poor man’s” non-convex nonlinear optimization solver. There’s a reason those solvers are more than 10 lines long.

you are right,i use the successive convex approximation method。 but could you please make it clearly?what solver i can use

I don’t know what problem you are solving. But I am referring to a local or global non-convex solver, which would not be accessible from CVX. You might find YALMIP convenient for solving non-convex problems