robotoc
robotoc - efficient ROBOT Optimal Control solvers
Loading...
Searching...
No Matches
robotoc::STOCostFunctionComponentBase Class Referenceabstract

Base class of components of the cost function of the switching time optimization (STO) problem. More...

#include <sto_cost_function_component_base.hpp>

Inheritance diagram for robotoc::STOCostFunctionComponentBase:
Collaboration diagram for robotoc::STOCostFunctionComponentBase:

Public Member Functions

 STOCostFunctionComponentBase ()
 Default constructor. More...
 
virtual ~STOCostFunctionComponentBase ()
 Destructor. More...
 
 STOCostFunctionComponentBase (const STOCostFunctionComponentBase &)=default
 Default copy constructor. More...
 
STOCostFunctionComponentBaseoperator= (const STOCostFunctionComponentBase &)=default
 Default copy operator. More...
 
 STOCostFunctionComponentBase (STOCostFunctionComponentBase &&) noexcept=default
 Default move constructor. More...
 
STOCostFunctionComponentBaseoperator= (STOCostFunctionComponentBase &&) noexcept=default
 Default move assign operator. More...
 
virtual double evalCost (const TimeDiscretization &time_discretization) const =0
 Computes the cost on the switching times. More...
 
virtual void evalCostDerivatives (const TimeDiscretization &time_discretization, Eigen::VectorXd &lt) const =0
 Computes the derivative of the cost on the switching times. More...
 
virtual void evalCostHessian (const TimeDiscretization &time_discretization, Eigen::MatrixXd &Qtt) const =0
 Computes the twice-time derivative (Hessian) of the cost on the switching times. More...
 
template<typename Derived >
std::shared_ptr< Derived > as_shared_ptr ()
 Gets the shared ptr of this object as the specified type. If this fails in dynamic casting, throws an exception. More...
 

Detailed Description

Base class of components of the cost function of the switching time optimization (STO) problem.

Constructor & Destructor Documentation

◆ STOCostFunctionComponentBase() [1/3]

robotoc::STOCostFunctionComponentBase::STOCostFunctionComponentBase ( )
inline

Default constructor.

◆ ~STOCostFunctionComponentBase()

virtual robotoc::STOCostFunctionComponentBase::~STOCostFunctionComponentBase ( )
inlinevirtual

Destructor.

◆ STOCostFunctionComponentBase() [2/3]

robotoc::STOCostFunctionComponentBase::STOCostFunctionComponentBase ( const STOCostFunctionComponentBase )
default

Default copy constructor.

◆ STOCostFunctionComponentBase() [3/3]

robotoc::STOCostFunctionComponentBase::STOCostFunctionComponentBase ( STOCostFunctionComponentBase &&  )
defaultnoexcept

Default move constructor.

Member Function Documentation

◆ as_shared_ptr()

template<typename Derived >
std::shared_ptr< Derived > robotoc::STOCostFunctionComponentBase::as_shared_ptr ( )
inline

Gets the shared ptr of this object as the specified type. If this fails in dynamic casting, throws an exception.

Template Parameters
DerivedThe derived type.
Returns
shared ptr of this object as the specified type.

◆ evalCost()

virtual double robotoc::STOCostFunctionComponentBase::evalCost ( const TimeDiscretization time_discretization) const
pure virtual

Computes the cost on the switching times.

Parameters
[in]time_discretizationTime discretization of the hybrid optimal control problem.
Returns
Cost on the switching times.

◆ evalCostDerivatives()

virtual void robotoc::STOCostFunctionComponentBase::evalCostDerivatives ( const TimeDiscretization time_discretization,
Eigen::VectorXd &  lt 
) const
pure virtual

Computes the derivative of the cost on the switching times.

Parameters
[in]time_discretizationTime discretization of the hybrid optimal control problem.
[in,out]ltThe derivatives of the Lagrangian w.r.t. the switching times.

◆ evalCostHessian()

virtual void robotoc::STOCostFunctionComponentBase::evalCostHessian ( const TimeDiscretization time_discretization,
Eigen::MatrixXd &  Qtt 
) const
pure virtual

Computes the twice-time derivative (Hessian) of the cost on the switching times.

Parameters
[in]time_discretizationTime discretization of the hybrid optimal control problem.
[in,out]QttThe Hessian of the Lagrangian w.r.t. the switching times.

◆ operator=() [1/2]

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

Default copy operator.

◆ operator=() [2/2]

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

Default move assign operator.


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