File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
trajopt_optimizers/trajopt_sqp/include/trajopt_sqp
trajopt_sco/include/trajopt_sco Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ struct SQPParameters
5555 /* * @brief NLP converges if approx_merit_improves is smaller than this */
5656 double min_approx_improve = 1e-4 ;
5757 /* * @brief NLP converges if approx_merit_improve / best_exact_merit < min_approx_improve_frac */
58- double min_approx_improve_frac = static_cast <double >(-INFINITY );
58+ double min_approx_improve_frac = std::numeric_limits <double >::lowest( );
5959 /* * @brief Max number of QP calls allowed */
6060 int max_iterations = 50 ;
6161
@@ -73,7 +73,7 @@ struct SQPParameters
7373 /* * @brief Constraints are scaled by this amount when inflated */
7474 double merit_coeff_increase_ratio = 10 ;
7575 /* * @brief Max time in seconds that the optimizer will run */
76- double max_time = static_cast <double >(INFINITY );
76+ double max_time = std::numeric_limits <double >::max( );
7777 /* * @brief Initial coefficient that is used to scale the constraints. The total constaint cost is constaint_value
7878 * coeff * merit_coeff */
7979 double initial_merit_error_coeff = 10 ;
Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ struct BasicTrustRegionSQPParameters
8989 /* * @brief If model improves less than this, exit and report convergence */
9090 double min_approx_improve = 1e-4 ;
9191 /* * @brief If model improves less than this, exit and report convergence */
92- double min_approx_improve_frac = static_cast <double >(-INFINITY );
92+ double min_approx_improve_frac = std::numeric_limits <double >::lowest( );
9393 /* * @brief The max number of iterations */
9494 double max_iter = 50 ;
9595 /* * @brief If improvement is less than improve_ratio_threshold, shrink trust region by this ratio */
@@ -105,7 +105,7 @@ struct BasicTrustRegionSQPParameters
105105 /* * @brief Ratio that we increase coeff each time */
106106 double merit_coeff_increase_ratio = 10 ;
107107 /* * @brief Max time in seconds that the optimizer will run */
108- double max_time = static_cast <double >(INFINITY );
108+ double max_time = std::numeric_limits <double >::max( );
109109 /* * @brief Initial coefficient that is used to scale the constraints. The total constaint cost is constaint_value *
110110 * coeff * merit_coeff */
111111 double initial_merit_error_coeff = 10 ;
You can’t perform that action at this time.
0 commit comments