Stack of the cost function of the switching time optimization (STO) problem. Composed by cost function components that inherits STOCostFunctionComponentBase.
More...
#include <sto_cost_function.hpp>
Stack of the cost function of the switching time optimization (STO) problem. Composed by cost function components that inherits STOCostFunctionComponentBase.
◆ STOCostFunctionComponentBasePtr
◆ STOCostFunction() [1/3]
robotoc::STOCostFunction::STOCostFunction |
( |
| ) |
|
◆ ~STOCostFunction()
robotoc::STOCostFunction::~STOCostFunction |
( |
| ) |
|
|
default |
◆ STOCostFunction() [2/3]
Default copy constructor.
◆ STOCostFunction() [3/3]
Default move constructor.
◆ add()
Adds a STO cost function component. If a component of the same name exists, throws an exeption.
- Parameters
-
[in] | name | Name of the STO cost function component. |
[in] | cost | shared pointer to the STO cost function component. |
◆ clear()
void robotoc::STOCostFunction::clear |
( |
| ) |
|
Clear cost function by removing all components.
◆ erase()
void robotoc::STOCostFunction::erase |
( |
const std::string & |
name | ) |
|
Erases a STO cost function component. If a component of the specified name does not exist, throws an exeption.
- Parameters
-
[in] | name | Name of the STO cost function component. |
◆ evalCost()
double robotoc::STOCostFunction::evalCost |
( |
const TimeDiscretization & |
time_discretization | ) |
const |
Computes the cost on the switching times.
- Parameters
-
[in] | time_discretization | Time discretization. |
- Returns
- Cost on the switching times.
◆ exist()
bool robotoc::STOCostFunction::exist |
( |
const std::string & |
name | ) |
const |
Checks if thsi has a STO cost function component of the specified name.
- Parameters
-
[in] | name | Name of the STO cost function component. |
- Returns
- treu if a STO cost function component of the specified name exists.
◆ get()
Gets a STO cost function component. If a component of the specified name does not exist, throws an exeption.
- Parameters
-
[in] | name | Name of the STO cost function component. |
- Returns
- Shared ptr to the specified STO cost function component.
◆ linearizeCost()
double robotoc::STOCostFunction::linearizeCost |
( |
const TimeDiscretization & |
time_discretization, |
|
|
Eigen::VectorXd & |
lt |
|
) |
| const |
Computes the cost and its derivative on the switching times.
- Parameters
-
[in] | time_discretization | Time discretization. |
[in,out] | lt | The derivatives of the Lagrangian w.r.t. the switching times. |
◆ operator=() [1/2]
◆ operator=() [2/2]
Default move assign operator.
◆ quadratizeCost()
double robotoc::STOCostFunction::quadratizeCost |
( |
const TimeDiscretization & |
time_discretization, |
|
|
Eigen::VectorXd & |
lt, |
|
|
Eigen::MatrixXd & |
Qtt |
|
) |
| const |
Computes the cost and its derivative on the switching times.
- Parameters
-
[in] | time_discretization | Time discretization. |
[in,out] | lt | The derivatives of the Lagrangian w.r.t. the switching times. |
[in,out] | Qtt | The Hessian of the Lagrangian w.r.t. the switching times. |
The documentation for this class was generated from the following file: