Skip to content

Commit

Permalink
fixed bug in rho_update_interval
Browse files Browse the repository at this point in the history
  • Loading branch information
skleff1994 committed Aug 9, 2024
1 parent 40af61a commit a4531ad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/csqp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ void SolverCSQP::computeDirection(const bool recalcDiff){

for (std::size_t iter = 1; iter < max_qp_iters_+1; ++iter){

if (iter % rho_update_interval_ == 1 || iter == 1){
if (iter % rho_update_interval_ == 1 || rho_update_interval_ == 1){
backwardPass();
}
else{
Expand Down Expand Up @@ -497,7 +497,7 @@ void SolverCSQP::update_rho_vec(int iter){



if (iter % rho_update_interval_ == 0 && iter > 1){
if (iter % rho_update_interval_ == 0){ // && iter > 1){
if(rho_estimate_sparse_ > rho_sparse_ * adaptive_rho_tolerance_ ||
rho_estimate_sparse_ < rho_sparse_ / adaptive_rho_tolerance_){
rho_sparse_ = rho_estimate_sparse_;
Expand Down

0 comments on commit a4531ad

Please sign in to comment.