Skip to content

Commit

Permalink
Fixed bug with dual solution warm-starting with Ruiz scaling and cost…
Browse files Browse the repository at this point in the history
… function normalization
  • Loading branch information
bstellato committed Oct 10, 2017
1 parent 2ecac1c commit 5213cdc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/osqp.c
Expand Up @@ -653,6 +653,7 @@ c_int osqp_warm_start(OSQPWorkspace * work, c_float * x, c_float * y){
if (work->settings->scaling){
vec_ew_prod(work->scaling->Dinv, work->x, work->x, work->data->n);
vec_ew_prod(work->scaling->Einv, work->y, work->y, work->data->m);
vec_mult_scalar(work->y, work->scaling->c, work->data->m);
}

// Compute Ax = z and store it in z
Expand Down Expand Up @@ -697,6 +698,7 @@ c_int osqp_warm_start_y(OSQPWorkspace * work, c_float * y){
// Scale iterate
if (work->settings->scaling){
vec_ew_prod(work->scaling->Einv, work->y, work->y, work->data->m);
vec_mult_scalar(work->y, work->scaling->c, work->data->m);
}

// Cold start x and z
Expand Down

0 comments on commit 5213cdc

Please sign in to comment.