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

#include <unconstr_terminal_stage.hpp>

Public Member Functions

 UnconstrTerminalStage (const Robot &robot, const std::shared_ptr< CostFunction > &cost, const std::shared_ptr< Constraints > &constraints)
 Constructs a split optimal control problem. More...
 
 UnconstrTerminalStage ()
 Default constructor.
More...
 
 ~UnconstrTerminalStage ()=default
 Default destructor. More...
 
 UnconstrTerminalStage (const UnconstrTerminalStage &)=default
 Default copy constructor. More...
 
UnconstrTerminalStageoperator= (const UnconstrTerminalStage &)=default
 Default copy assign operator. More...
 
 UnconstrTerminalStage (UnconstrTerminalStage &&) noexcept=default
 Default move constructor. More...
 
UnconstrTerminalStageoperator= (UnconstrTerminalStage &&) noexcept=default
 Default move assign operator. More...
 
UnconstrOCPData createData (const Robot &robot) const
 Creates the data. More...
 
bool isFeasible (Robot &robot, const GridInfo &grid_info, const SplitSolution &s, UnconstrOCPData &data) const
 Checks whether the solution is feasible w.r.t. the inequality constraints. More...
 
void initConstraints (Robot &robot, const GridInfo &grid_info, const SplitSolution &s, UnconstrOCPData &data) const
 Initializes the constraints, i.e., set slack and dual variables. More...
 
void evalOCP (Robot &robot, const GridInfo &grid_info, const SplitSolution &s, UnconstrOCPData &data, SplitKKTResidual &kkt_residual) const
 Computes the stage cost and constraint violation of this stage. More...
 
void evalKKT (Robot &robot, const GridInfo &grid_info, const SplitSolution &s, UnconstrOCPData &data, SplitKKTMatrix &kkt_matrix, SplitKKTResidual &kkt_residual) const
 Computes the KKT matrix and residual of this stage. More...
 
void expandPrimalAndDual (UnconstrOCPData &data, SplitDirection &d) const
 Expands the primal and dual variables, i.e., computes the Newton direction of the condensed variables of this stage. More...
 
double maxPrimalStepSize (const UnconstrOCPData &data) const
 Computes the maximum primal step size. More...
 
double maxDualStepSize (const UnconstrOCPData &data) const
 Computes the maximum dual size. More...
 
void updatePrimal (const Robot &robot, const double primal_step_size, const SplitDirection &d, SplitSolution &s, UnconstrOCPData &data) const
 Updates primal variables of this stage. More...
 
void updateDual (const double dual_step_size, UnconstrOCPData &data) const
 Updates dual variables of the inequality constraints. More...
 

Constructor & Destructor Documentation

◆ UnconstrTerminalStage() [1/4]

robotoc::UnconstrTerminalStage::UnconstrTerminalStage ( const Robot robot,
const std::shared_ptr< CostFunction > &  cost,
const std::shared_ptr< Constraints > &  constraints 
)

Constructs a split optimal control problem.

Parameters
[in]robotRobot model.
[in]costShared ptr to the cost function.
[in]constraintsShared ptr to the constraints.

◆ UnconstrTerminalStage() [2/4]

robotoc::UnconstrTerminalStage::UnconstrTerminalStage ( )

Default constructor.

◆ ~UnconstrTerminalStage()

robotoc::UnconstrTerminalStage::~UnconstrTerminalStage ( )
default

Default destructor.

◆ UnconstrTerminalStage() [3/4]

robotoc::UnconstrTerminalStage::UnconstrTerminalStage ( const UnconstrTerminalStage )
default

Default copy constructor.

◆ UnconstrTerminalStage() [4/4]

robotoc::UnconstrTerminalStage::UnconstrTerminalStage ( UnconstrTerminalStage &&  )
defaultnoexcept

Default move constructor.

Member Function Documentation

◆ createData()

UnconstrOCPData robotoc::UnconstrTerminalStage::createData ( const Robot robot) const

Creates the data.

Parameters
[in]robotRobot model.

◆ evalKKT()

void robotoc::UnconstrTerminalStage::evalKKT ( Robot robot,
const GridInfo grid_info,
const SplitSolution s,
UnconstrOCPData data,
SplitKKTMatrix kkt_matrix,
SplitKKTResidual kkt_residual 
) const

Computes the KKT matrix and residual of this stage.

Parameters
[in,out]robotRobot model.
[in]grid_infoGrid info.
[in]sSplit solution of this stage.
[in,out]dataData of this stage.
[in,out]kkt_matrixSplit KKT matrix of this stage.
[in,out]kkt_residualSplit KKT residual of this stage.

◆ evalOCP()

void robotoc::UnconstrTerminalStage::evalOCP ( Robot robot,
const GridInfo grid_info,
const SplitSolution s,
UnconstrOCPData data,
SplitKKTResidual kkt_residual 
) const

Computes the stage cost and constraint violation of this stage.

Parameters
[in,out]robotRobot model.
[in]grid_infoGrid info.
[in]sSplit solution of this stage.
[in,out]dataData of this stage.
[in,out]kkt_residualSplit KKT residual of this stage.

◆ expandPrimalAndDual()

void robotoc::UnconstrTerminalStage::expandPrimalAndDual ( UnconstrOCPData data,
SplitDirection d 
) const

Expands the primal and dual variables, i.e., computes the Newton direction of the condensed variables of this stage.

Parameters
[in,out]dataData of this stage.
[in,out]dSplit direction of this stage.

◆ initConstraints()

void robotoc::UnconstrTerminalStage::initConstraints ( Robot robot,
const GridInfo grid_info,
const SplitSolution s,
UnconstrOCPData data 
) const

Initializes the constraints, i.e., set slack and dual variables.

Parameters
[in,out]robotRobot model.
[in]grid_infoGrid info.
[in]sSplit solution of this stage.
[in,out]dataData of this stage.

◆ isFeasible()

bool robotoc::UnconstrTerminalStage::isFeasible ( Robot robot,
const GridInfo grid_info,
const SplitSolution s,
UnconstrOCPData data 
) const

Checks whether the solution is feasible w.r.t. the inequality constraints.

Parameters
[in,out]robotRobot model.
[in]grid_infoGrid info of this stage.
[in]sSplit solution of this stage.
[in,out]dataData of this stage.

◆ maxDualStepSize()

double robotoc::UnconstrTerminalStage::maxDualStepSize ( const UnconstrOCPData data) const

Computes the maximum dual size.

Parameters
[in]dataData of this stage.
Returns
Maximum dual step size.

◆ maxPrimalStepSize()

double robotoc::UnconstrTerminalStage::maxPrimalStepSize ( const UnconstrOCPData data) const

Computes the maximum primal step size.

Parameters
[in]dataData of this stage.
Returns
Maximum primal step size.

◆ operator=() [1/2]

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

Default copy assign operator.

◆ operator=() [2/2]

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

Default move assign operator.

◆ updateDual()

void robotoc::UnconstrTerminalStage::updateDual ( const double  dual_step_size,
UnconstrOCPData data 
) const

Updates dual variables of the inequality constraints.

Parameters
[in]dual_step_sizeDula step size.
[in,out]dataData of this stage.

◆ updatePrimal()

void robotoc::UnconstrTerminalStage::updatePrimal ( const Robot robot,
const double  primal_step_size,
const SplitDirection d,
SplitSolution s,
UnconstrOCPData data 
) const

Updates primal variables of this stage.

Parameters
[in]robotRobot model.
[in]primal_step_sizePrimal step size.
[in]dSplit direction of this stage.
[in,out]sSplit solution of this stage.
[in,out]dataData of this stage.

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