25 #ifndef SRC_OPTIMAL_CONTROL_INCLUDE_CORBO_OPTIMAL_CONTROL_STRUCTURED_OCP_EDGES_L1_STAB_EDGES_H_ 26 #define SRC_OPTIMAL_CONTROL_INCLUDE_CORBO_OPTIMAL_CONTROL_STRUCTURED_OCP_EDGES_L1_STAB_EDGES_H_ 44 using Ptr = std::shared_ptr<L1StabCostEdge>;
45 using UPtr = std::unique_ptr<L1StabCostEdge>;
56 bool isLinear()
const override {
return false; }
80 using Ptr = std::shared_ptr<L1StabInequalityEdge>;
81 using UPtr = std::unique_ptr<L1StabInequalityEdge>;
89 _dim_x = _x->getDimension();
98 bool isLinear()
const override {
return false; }
110 assert(_xref->size() == _dim_x);
111 values.head(_dim_x).noalias() = _x->values() - *_xref -
_s->
values();
112 values.tail(_dim_x).noalias() = *_xref - _x->values() -
_s->
values();
116 values.head(_dim_x).noalias() = _x->values() -
_s->
values();
117 values.tail(_dim_x).noalias() = -_x->values() -
_s->
values();
124 const Eigen::VectorXd* _xref =
nullptr;
134 #endif // SRC_OPTIMAL_CONTROL_INCLUDE_CORBO_OPTIMAL_CONTROL_STRUCTURED_OCP_EDGES_L1_STAB_EDGES_H_ int getDimension() const override
Get dimension of the edge (dimension of the cost-function/constraint value vector) ...
L1StabCostEdge(VectorVertex &s, double delta_pow_k)
#define EIGEN_MAKE_ALIGNED_OPERATOR_NEW
std::shared_ptr< L1StabInequalityEdge > Ptr
int getDimension() const override
Get dimension of the edge (dimension of the cost-function/constraint value vector) ...
std::unique_ptr< L1StabInequalityEdge > UPtr
bool isLinear() const override
Return true if the edge is linear (and hence its Hessian is always zero)
std::unique_ptr< L1StabCostEdge > UPtr
bool isLinear() const override
Return true if the edge is linear (and hence its Hessian is always zero)
bool isLeastSquaresForm() const override
Defines if the edge is formulated as Least-Squares form.
int getDimension() const override
Return number of elements/values/components stored in this vertex.
bool isLeastSquaresForm() const override
Defines if the edge is formulated as Least-Squares form.
A matrix or vector expression mapping an existing expression.
void computeValues(Eigen::Ref< Eigen::VectorXd > values) override
Compute function values.
L1StabInequalityEdge(VectorVertex &x, VectorVertex &s, const Eigen::VectorXd *xref)
Templated base edge class that stores an arbitary number of value.
Vertex implementation that stores an Eigen::VectorXd (dynamic dimension)
std::shared_ptr< L1StabCostEdge > Ptr
const Eigen::VectorXd & values() const
Read-access to the underlying value vector.
const VertexContainer _vertices
Vertex container.
void computeValues(Eigen::Ref< Eigen::VectorXd > values) override
Compute function values.