Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
Levi-Armstrong committed Nov 21, 2023
1 parent c7e82ec commit ce0eb88
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
12 changes: 6 additions & 6 deletions trajopt_sco/include/trajopt_sco/optimizers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,26 +236,26 @@ struct BasicTrustRegionSQPResults
DblVec old_cnt_viols;
/** @brief The previous iterations (exact) merit = vecSum(old_cost_vals) + merit_error_coeff * vecSum(old_cnt_viols)
*/
double old_merit;
double old_merit{ 0 };
/** @brief The models merit = vecSum(model_cost_vals) + merit_error_coeff * vecSum(model_cnt_viols) */
double model_merit;
double model_merit{ 0 };
/** @brief The exact merit = vecSum(new_cost_vals) + merit_error_coeff * vecSum(new_cnt_viols) */
double new_merit;
double new_merit{ 0 };
/**
* @brief A measure of improvement approximated using values from the model.
* approx_merit_improve = old_merit - model_merit;
*/
double approx_merit_improve;
double approx_merit_improve{ 0 };
/**
* @brief A measure of improvement using exact values
* exact_merit_improve = old_merit - new_merit;
*/
double exact_merit_improve;
double exact_merit_improve{ 0 };
/**
* @brief The ratio between the exact and model merit improvement
* merit_improve_ratio = exact_merit_improve / approx_merit_improve;
*/
double merit_improve_ratio;
double merit_improve_ratio{ 0 };
/** @brief This is the penalty applied to the constraints for this iteration */
std::vector<double> merit_error_coeffs;
/** @brief Variable names */
Expand Down
1 change: 1 addition & 0 deletions trajopt_sco/src/bpmpd_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
TRAJOPT_IGNORE_WARNINGS_PUSH
#include <cmath>
#include <array>
#include <mutex>
#include <trajopt_sco/bpmpd_io.hpp>
TRAJOPT_IGNORE_WARNINGS_POP

Expand Down
6 changes: 0 additions & 6 deletions trajopt_sco/src/optimizers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -307,12 +307,6 @@ BasicTrustRegionSQPResults::BasicTrustRegionSQPResults(std::vector<std::string>
old_cost_vals.clear();
new_cnt_viols.clear();
old_cnt_viols.clear();
old_merit = 0;
model_merit = 0;
new_merit = 0;
approx_merit_improve = 0;
exact_merit_improve = 0;
merit_improve_ratio = 0;
merit_error_coeffs = std::vector<double>(this->cnt_names.size(), 0);
}

Expand Down

0 comments on commit ce0eb88

Please sign in to comment.