File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -276,12 +276,12 @@ def computeDirectionFullQP(self):
276276 nin_count += model .ng
277277
278278 elif self .method == "OSQP" :
279- Aeq = sparse .csr_matrix (A )
280- Aineq = sparse .csr_matrix (C )
279+ Aeq = sparse .csc_matrix (A )
280+ Aineq = sparse .csc_matrix (C )
281281 Aosqp = sparse .vstack ([Aeq , Aineq ])
282282 losqp = np .hstack ([B , l ])
283283 uosqp = np .hstack ([B , u ])
284- P = sparse .csr_matrix (P )
284+ P = sparse .csc_matrix (P )
285285 if self .DEBUG :
286286 print (
287287 "nnz(P) = " ,
@@ -306,14 +306,16 @@ def computeDirectionFullQP(self):
306306 Aosqp ,
307307 losqp ,
308308 uosqp ,
309- warm_start = False ,
309+ warm_starting = False ,
310310 scaling = self .OSQP_scaling ,
311311 max_iter = self .max_qp_iters ,
312312 adaptive_rho = True ,
313+ adaptive_rho_interval = 25 ,
313314 verbose = self .verboseQP ,
314315 eps_rel = self .eps_rel ,
315316 eps_abs = self .eps_abs ,
316317 )
318+
317319 t1 = time .time ()
318320 tmp = prob .solve ()
319321 self .qp_time = time .time () - t1
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ def setUp(self):
3232 self .ddp2 = CSQP (self .problem , "OSQP" )
3333 self .ddp1 .with_callbacks = True
3434 self .ddp2 .with_callbacks = True
35- max_qp_iters = 10000
35+ max_qp_iters = 25
3636 self .ddp1 .max_qp_iters = max_qp_iters
3737 self .ddp2 .max_qp_iters = max_qp_iters
3838 eps_abs = 1e-8
You can’t perform that action at this time.
0 commit comments