Thanks to visit codestin.com
Credit goes to github.com

Skip to content

The same QP problem was solved successfully with V0.6.2, but failed with V1.0.0 #760

@PuYuuu

Description

@PuYuuu

Hi, OSQP teams !

The constrained QP problem that was originally solved normally under v0.6.2 did not converge with v1.0.0 and would exit due to exceeding the maximum number of iterations. I noticed that the main difference in v1.0.0 is that OSQPCscMatrix replaces the original csc and osqp_setup() function parameter passing. I ensured that the problem input was consistent and all parameters were at their default values, but v1.0.0 still did not converge. The following is the verbose log output:

v0.6.2

       OSQP v0.6.2  -  Operator Splitting QP Solver
          (c) Bartolomeo Stellato,  Goran Banjac
    University of Oxford  -  Stanford University 2021

problem: variables n = 84, constraints m = 152
nnz(P) + nnz(A) = 1036
settings: linear system solver = qdldl,
eps_abs = 1.0e-03, eps_rel = 1.0e-03,
eps_prim_inf = 1.0e-04, eps_dual_inf = 1.0e-04,
rho = 1.00e-01 (adaptive),
sigma = 1.00e-06, alpha = 1.60, max_iter = 4000
check_termination: on (interval 25),
scaling: on, scaled_termination: off
warm start: on, polish: off, time_limit: off

iter objective pri res dua res rho time
1 -1.2880e+02 4.80e-16 1.88e+01 1.00e-01 1.55e-04s
50 -1.7380e+02 2.68e-15 3.40e-06 1.00e-06 3.28e-04s

status: solved
number of iterations: 50
optimal objective: -173.8003
run time: 3.47e-04s
optimal rho estimate: 1.00e-06

v1.0.0

OSQP v1.0.0 - Operator Splitting QP Solver
(c) The OSQP Developer Team
problem: variables n = 84, constraints m = 152
nnz(P) + nnz(A) = 1036
settings: algebra = Built-in,
OSQPInt = 8 bytes, OSQPFloat = 8 bytes,
linear system solver = QDLDL v0.1.8,
eps_abs = 1.0e-03, eps_rel = 1.0e-03,
eps_prim_inf = 1.0e-04, eps_dual_inf = 1.0e-04,
rho = 1.00e-01 (adaptive: 50 iterations),
sigma = 1.00e-06, alpha = 1.60, max_iter = 4000
check_termination: on (interval 25, duality gap: on),
time_limit: 1.00e+10 sec,
scaling: on (10 iterations), scaled_termination: off
warm starting: on, polishing: off,
iter objective prim res dual res gap rel kkt rho time
1 -6.9344e+01 1.42e+01 7.05e+02 -nan -nan 1.00e-01 8.70e-04s
50 7.6205e+02 4.32e-03 2.54e+00 -nan -nan 1.16e-02* 1.99e-03s
200 7.6139e+02 1.02e-14 2.22e-14 -nan -nan 1.16e-02 5.51e-03s
400 7.6139e+02 1.02e-14 4.18e-14 -nan -nan 1.16e-02 9.71e-03s
600 7.6139e+02 9.05e-15 6.42e-14 -nan -nan 1.16e-02 1.31e-02s
800 7.6139e+02 1.09e-14 3.17e-14 -nan -nan 1.16e-02 1.55e-02s
1000 7.6139e+02 7.69e-15 3.17e-14 -nan -nan 1.16e-02 1.80e-02s
1200 7.6139e+02 7.24e-15 3.17e-14 -nan -nan 1.16e-02 1.99e-02s
1400 7.6139e+02 9.51e-15 3.15e-14 -nan -nan 1.16e-02 2.14e-02s
1600 7.6139e+02 7.92e-15 4.18e-14 -nan -nan 1.16e-02 2.33e-02s
1800 7.6139e+02 1.09e-14 6.42e-14 -nan -nan 1.16e-02 2.50e-02s
2000 7.6139e+02 6.45e-15 3.21e-14 -nan -nan 1.16e-02 2.64e-02s
2200 7.6139e+02 4.41e-15 4.28e-14 -nan -nan 1.16e-02 2.77e-02s
2400 7.6139e+02 6.45e-15 4.22e-14 -nan -nan 1.16e-02 2.90e-02s
2600 7.6139e+02 7.24e-15 4.23e-14 -nan -nan 1.16e-02 3.02e-02s
2800 7.6139e+02 8.60e-15 3.33e-14 -nan -nan 1.16e-02 3.12e-02s
3000 7.6139e+02 1.02e-14 3.15e-14 -nan -nan 1.16e-02 3.22e-02s
3200 7.6139e+02 7.92e-15 6.66e-14 -nan -nan 1.16e-02 3.33e-02s
3400 7.6139e+02 8.60e-15 3.33e-14 -nan -nan 1.16e-02 3.44e-02s
3600 7.6139e+02 8.60e-15 6.66e-14 -nan -nan 1.16e-02 3.54e-02s
3800 7.6139e+02 4.30e-15 8.88e-14 -nan -nan 1.16e-02 3.63e-02s
4000 7.6139e+02 9.62e-15 8.47e-14 -nan -nan 1.16e-02 3.72e-02s

status: maximum iterations reached
number of iterations: 4000
run time: 3.72e-02s
optimal rho estimate: 1.13e-02

Any feedback would be helpful, thanks for your work. By the way, I used the C interfaces.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions