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

The switching time optimization (STO) problem. More...

#include <switching_time_optimization.hpp>

Public Member Functions

 SwitchingTimeOptimization (const OCP &ocp)
 Construct the STO problem. More...
 
 SwitchingTimeOptimization ()
 Default constructor. More...
 
 ~SwitchingTimeOptimization ()=default
 Default destructor. More...
 
 SwitchingTimeOptimization (const SwitchingTimeOptimization &)=default
 Default copy constructor. More...
 
SwitchingTimeOptimizationoperator= (const SwitchingTimeOptimization &)=default
 Default copy assign operator. More...
 
 SwitchingTimeOptimization (SwitchingTimeOptimization &&) noexcept=default
 Default move constructor. More...
 
SwitchingTimeOptimizationoperator= (SwitchingTimeOptimization &&) noexcept=default
 Default move assign operator. More...
 
void setRegularization (const double sto_reg)
 Sets the regularization paremeter on the STO problem. More...
 
void initConstraints (const TimeDiscretization &time_discretization)
 Initializes the priaml-dual interior point method for inequality constraints. More...
 
bool isFeasible (const TimeDiscretization &time_discretization)
 Checks whether the solution is feasible under inequality constraints. More...
 
void evalSTO (const TimeDiscretization &time_discretization)
 Computes the cost and constraint violations. More...
 
void evalKKT (const TimeDiscretization &time_discretization, KKTMatrix &kkt_matrix, KKTResidual &kkt_residual)
 Computes the KKT residual and matrix. More...
 
const PerformanceIndexgetEval () const
 Gets the performance index of the evaluation. More...
 
void computeStepSizes (const TimeDiscretization &time_discretization, const Direction &d)
 Computes the step sizes via the fraction-to-boundary-rule. More...
 
double maxPrimalStepSize () const
 Gets the maximum primal step size of the fraction-to-boundary-rule. More...
 
double maxDualStepSize () const
 Gets the maximum dual step size of the fraction-to-boundary-rule. More...
 
void integrateSolution (const TimeDiscretization &time_discretization, const double primal_step_size, const double dual_step_size, const Direction &d)
 Computes the initial state direction. More...
 

Detailed Description

The switching time optimization (STO) problem.

Constructor & Destructor Documentation

◆ SwitchingTimeOptimization() [1/4]

robotoc::SwitchingTimeOptimization::SwitchingTimeOptimization ( const OCP ocp)

Construct the STO problem.

Parameters
[in]ocpOptimal control problem.

◆ SwitchingTimeOptimization() [2/4]

robotoc::SwitchingTimeOptimization::SwitchingTimeOptimization ( )

Default constructor.

◆ ~SwitchingTimeOptimization()

robotoc::SwitchingTimeOptimization::~SwitchingTimeOptimization ( )
default

Default destructor.

◆ SwitchingTimeOptimization() [3/4]

robotoc::SwitchingTimeOptimization::SwitchingTimeOptimization ( const SwitchingTimeOptimization )
default

Default copy constructor.

◆ SwitchingTimeOptimization() [4/4]

robotoc::SwitchingTimeOptimization::SwitchingTimeOptimization ( SwitchingTimeOptimization &&  )
defaultnoexcept

Default move constructor.

Member Function Documentation

◆ computeStepSizes()

void robotoc::SwitchingTimeOptimization::computeStepSizes ( const TimeDiscretization time_discretization,
const Direction d 
)

Computes the step sizes via the fraction-to-boundary-rule.

Parameters
[in]time_discretizationTime discretization.
[in]dDirection.

◆ evalKKT()

void robotoc::SwitchingTimeOptimization::evalKKT ( const TimeDiscretization time_discretization,
KKTMatrix kkt_matrix,
KKTResidual kkt_residual 
)

Computes the KKT residual and matrix.

Parameters
[in]time_discretizationTime discretization.
[in,out]kkt_matrixKKT matrix.
[in,out]kkt_residualKKT residual.

◆ evalSTO()

void robotoc::SwitchingTimeOptimization::evalSTO ( const TimeDiscretization time_discretization)

Computes the cost and constraint violations.

Parameters
[in]time_discretizationTime discretization.

◆ getEval()

const PerformanceIndex & robotoc::SwitchingTimeOptimization::getEval ( ) const

Gets the performance index of the evaluation.

Returns
const reference to the performance index.

◆ initConstraints()

void robotoc::SwitchingTimeOptimization::initConstraints ( const TimeDiscretization time_discretization)

Initializes the priaml-dual interior point method for inequality constraints.

Parameters
[in]time_discretizationTime discretization.

◆ integrateSolution()

void robotoc::SwitchingTimeOptimization::integrateSolution ( const TimeDiscretization time_discretization,
const double  primal_step_size,
const double  dual_step_size,
const Direction d 
)

Computes the initial state direction.

Parameters
[in]time_discretizationTime discretization.
[in]primal_step_sizePrimal step size.
[in]dual_step_sizeDual step size.
[in,out]dDirection.

◆ isFeasible()

bool robotoc::SwitchingTimeOptimization::isFeasible ( const TimeDiscretization time_discretization)

Checks whether the solution is feasible under inequality constraints.

Parameters
[in]time_discretizationTime discretization.

◆ maxDualStepSize()

double robotoc::SwitchingTimeOptimization::maxDualStepSize ( ) const

Gets the maximum dual step size of the fraction-to-boundary-rule.

Returns
The dual step size of the fraction-to-boundary-rule.

◆ maxPrimalStepSize()

double robotoc::SwitchingTimeOptimization::maxPrimalStepSize ( ) const

Gets the maximum primal step size of the fraction-to-boundary-rule.

Returns
The primal step size of the fraction-to-boundary-rule.

◆ operator=() [1/2]

SwitchingTimeOptimization & robotoc::SwitchingTimeOptimization::operator= ( const SwitchingTimeOptimization )
default

Default copy assign operator.

◆ operator=() [2/2]

SwitchingTimeOptimization & robotoc::SwitchingTimeOptimization::operator= ( SwitchingTimeOptimization &&  )
defaultnoexcept

Default move assign operator.

◆ setRegularization()

void robotoc::SwitchingTimeOptimization::setRegularization ( const double  sto_reg)

Sets the regularization paremeter on the STO problem.

Parameters
[in]sto_regThe regularization paremeter. Must be non-negative.

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