robotoc
robotoc - efficient ROBOT Optimal Control solvers
Loading...
Searching...
No Matches
robotoc::SolverOptions Class Reference

Options of optimal control solvers. More...

#include <solver_options.hpp>

Collaboration diagram for robotoc::SolverOptions:

Public Member Functions

void disp (std::ostream &os) const
 Displays the solver settings onto a ostream. More...
 

Public Attributes

int nthreads = 1
 Number of the threads of parallel computations. Must be positive. Default is 1. More...
 
int max_iter = 100
 Maximum number of iterations. Must be non-negative. Default is 100. More...
 
double kkt_tol = 1.0e-07
 Tolerance of the l2-norm of the (perturbed) KKT residual for convergence. Default is 1.0e-07. Must be positive. More...
 
double mu_init = 1.0e-03
 Initial barrier parameter. Must be positive. Default is 1.0e-03. More...
 
double mu_min = 1.0e-03
 Minimum barrier parameter. Must be positive. Default is 1.0e-03 (that is, no barrier parameter reduction with the default settings). More...
 
double kkt_tol_mu = 1.0e-07
 Tolerance of the l2-norm of the (perturbed) KKT residual for the barrier parameter update. Default is 1.0e-07. Must be positive. More...
 
double mu_linear_decrease_factor = 0.2
 Linear decrease rate of barrier parameter. Default is 0.2. More...
 
double mu_superlinear_decrease_power = 1.5
 Superlinear decrease rate of barrier parameter. Default is 1.5. More...
 
bool enable_line_search = false
 Flag to enable the line search. Default is false. More...
 
LineSearchSettings line_search_settings
 Line search settings. More...
 
DiscretizationMethod discretization_method = DiscretizationMethod::GridBased
 Discretization method of the optimal control problem. Only used in OCPSolver without the STO problem. Default is DiscretizationMethod::GridBased. More...
 
int initial_sto_reg_iter = 0
 Number of initial inner iterations in which a large regularization for the STO problem is added, where the inner iteration means the iterations after each mesh-refinement. Default is 0 (that is, there is no iterations with large STO regularization). More...
 
double initial_sto_reg = 1.0e30
 Magnitude of the large regularization for the STO problem at the initial iterations speficied by initial_sto_reg_iter. Default is 1.0e30. More...
 
double kkt_tol_mesh = 0.1
 Tolerance of the KKT residual to perform mesh-refinement in the STO problem. Default is 1.0e-01. Must be positive. More...
 
double max_dt_mesh = 0.0
 Tolerance of the maximum discretization step size to perform
mesh-refinement in the STO problem. Default is 0. More...
 
double max_dts_riccati = 0.1
 Maximum magnitude of the nominal direction of the switching time computed by the Riccati recursion algorithm. Used in a heuristic regularization on the dynamic programming recursion, which is similar to the trust-region strategy (this value is a kind of a trust region w.r.t. the switching time direction). Must be positive. The regularization increases as this value is closer to 0. A larger regularization means that the numerical computation is more stable
while the convergence speed can become slower. Default is 0.1, that is, a regularization is added so that the magnitude of the nominal switching
time direction is limited to under 0.1 in default. More...
 
bool enable_solution_interpolation = true
 If true, the solution initial guess is constructed from the linear interpolation of the previous solution. More...
 
InterpolationOrder interpolation_order = InterpolationOrder::Linear
 Order of the solution interpolation if enable_solution_interpolation is true. More...
 
bool enable_benchmark = false
 If true, the CPU time is measured at each solve(). More...
 

Friends

std::ostream & operator<< (std::ostream &os, const SolverOptions &solver_options)
 

Detailed Description

Options of optimal control solvers.

Member Function Documentation

◆ disp()

void robotoc::SolverOptions::disp ( std::ostream &  os) const

Displays the solver settings onto a ostream.

Friends And Related Function Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
const SolverOptions solver_options 
)
friend

Member Data Documentation

◆ discretization_method

DiscretizationMethod robotoc::SolverOptions::discretization_method = DiscretizationMethod::GridBased

Discretization method of the optimal control problem. Only used in OCPSolver without the STO problem. Default is DiscretizationMethod::GridBased.

Note
For the STO problem, discretization method is fixed to DiscretizationMethod::PhaseBased regardless of this value.

◆ enable_benchmark

bool robotoc::SolverOptions::enable_benchmark = false

If true, the CPU time is measured at each solve().

◆ enable_line_search

bool robotoc::SolverOptions::enable_line_search = false

Flag to enable the line search. Default is false.

◆ enable_solution_interpolation

bool robotoc::SolverOptions::enable_solution_interpolation = true

If true, the solution initial guess is constructed from the linear interpolation of the previous solution.

◆ initial_sto_reg

double robotoc::SolverOptions::initial_sto_reg = 1.0e30

Magnitude of the large regularization for the STO problem at the initial iterations speficied by initial_sto_reg_iter. Default is 1.0e30.

Note
The purpose of a large regularization on the STO problem is to
stabilize the numerical computation. With sufficiently large
regularization on the STO, the optimization problem involving the STO problem is the same as one without STO problem.

◆ initial_sto_reg_iter

int robotoc::SolverOptions::initial_sto_reg_iter = 0

Number of initial inner iterations in which a large regularization for the STO problem is added, where the inner iteration means the iterations after each mesh-refinement. Default is 0 (that is, there is no iterations with large STO regularization).

Note
The purpose of a large regularization on the STO problem is to
stabilize the numerical computation. With sufficiently large
regularization on the STO, the optimization problem involving the STO problem is the same as one without STO problem.

◆ interpolation_order

InterpolationOrder robotoc::SolverOptions::interpolation_order = InterpolationOrder::Linear

Order of the solution interpolation if enable_solution_interpolation is true.

◆ kkt_tol

double robotoc::SolverOptions::kkt_tol = 1.0e-07

Tolerance of the l2-norm of the (perturbed) KKT residual for convergence. Default is 1.0e-07. Must be positive.

◆ kkt_tol_mesh

double robotoc::SolverOptions::kkt_tol_mesh = 0.1

Tolerance of the KKT residual to perform mesh-refinement in the STO problem. Default is 1.0e-01. Must be positive.

◆ kkt_tol_mu

double robotoc::SolverOptions::kkt_tol_mu = 1.0e-07

Tolerance of the l2-norm of the (perturbed) KKT residual for the barrier parameter update. Default is 1.0e-07. Must be positive.

◆ line_search_settings

LineSearchSettings robotoc::SolverOptions::line_search_settings

Line search settings.

◆ max_dt_mesh

double robotoc::SolverOptions::max_dt_mesh = 0.0

Tolerance of the maximum discretization step size to perform
mesh-refinement in the STO problem. Default is 0.

◆ max_dts_riccati

double robotoc::SolverOptions::max_dts_riccati = 0.1

Maximum magnitude of the nominal direction of the switching time computed by the Riccati recursion algorithm. Used in a heuristic regularization on the dynamic programming recursion, which is similar to the trust-region strategy (this value is a kind of a trust region w.r.t. the switching time direction). Must be positive. The regularization increases as this value is closer to 0. A larger regularization means that the numerical computation is more stable
while the convergence speed can become slower. Default is 0.1, that is, a regularization is added so that the magnitude of the nominal switching
time direction is limited to under 0.1 in default.

◆ max_iter

int robotoc::SolverOptions::max_iter = 100

Maximum number of iterations. Must be non-negative. Default is 100.

◆ mu_init

double robotoc::SolverOptions::mu_init = 1.0e-03

Initial barrier parameter. Must be positive. Default is 1.0e-03.

◆ mu_linear_decrease_factor

double robotoc::SolverOptions::mu_linear_decrease_factor = 0.2

Linear decrease rate of barrier parameter. Default is 0.2.

Note
New barrier parameter mu is obtained by taking the minimum of mu*"mu_linear_decrease_factor" and mu^"superlinear_decrease_power".

◆ mu_min

double robotoc::SolverOptions::mu_min = 1.0e-03

Minimum barrier parameter. Must be positive. Default is 1.0e-03 (that is, no barrier parameter reduction with the default settings).

◆ mu_superlinear_decrease_power

double robotoc::SolverOptions::mu_superlinear_decrease_power = 1.5

Superlinear decrease rate of barrier parameter. Default is 1.5.

Note
New barrier parameter mu is obtained by taking the minimum of mu*"mu_linear_decrease_factor" and mu^"superlinear_decrease_power".

◆ nthreads

int robotoc::SolverOptions::nthreads = 1

Number of the threads of parallel computations. Must be positive. Default is 1.


The documentation for this class was generated from the following file: