Go to the documentation of this file.
25 #ifndef SRC_OPTIMAL_CONTROL_INCLUDE_CORBO_OPTIMAL_CONTROL_STRUCTURED_OCP_EDGES_FINITE_DIFFERENCES_COLLOCATION_EDGES_H_
26 #define SRC_OPTIMAL_CONTROL_INCLUDE_CORBO_OPTIMAL_CONTROL_STRUCTURED_OCP_EDGES_FINITE_DIFFERENCES_COLLOCATION_EDGES_H_
43 class FDCollocationEdge :
public Edge<VectorVertex, VectorVertex, VectorVertex, ScalarVertex>
46 using Ptr = std::shared_ptr<FDCollocationEdge>;
47 using UPtr = std::unique_ptr<FDCollocationEdge>;
50 :
Edge<VectorVertex, VectorVertex, VectorVertex, ScalarVertex>(x1, u1, x2, dt),
_dynamics(dynamics)
65 bool isLinear()
const override {
return false; }
88 const VectorVertex*
_x1 =
nullptr;
89 const VectorVertex*
_u1 =
nullptr;
101 using Ptr = std::shared_ptr<TrapezoidalIntegralCostEdge>;
102 using UPtr = std::unique_ptr<TrapezoidalIntegralCostEdge>;
108 assert(stage_cost->getIntegralStateControlTermDimension(
_k) == 1);
152 using Ptr = std::shared_ptr<TrapezoidalIntegralEqualityDynamicsEdge>;
153 using UPtr = std::unique_ptr<TrapezoidalIntegralEqualityDynamicsEdge>;
173 bool isLinear()
const override {
return false; }
209 Eigen::VectorXd
_eq1;
210 Eigen::VectorXd
_eq2;
221 using Ptr = std::shared_ptr<TrapezoidalIntegralEqualityEdge>;
222 using UPtr = std::unique_ptr<TrapezoidalIntegralEqualityEdge>;
263 Eigen::VectorXd
_eq2;
274 using Ptr = std::shared_ptr<TrapezoidalIntegralInequalityEdge>;
275 using UPtr = std::unique_ptr<TrapezoidalIntegralInequalityEdge>;
328 using Ptr = std::shared_ptr<LeftSumCostEdge>;
329 using UPtr = std::unique_ptr<LeftSumCostEdge>;
335 assert(stage_cost->getIntegralStateControlTermDimension(
_k) == 1);
344 bool isLinear()
const override {
return false; }
356 values *= dt->
value();
371 using Ptr = std::shared_ptr<LeftSumEqualityEdge>;
372 using UPtr = std::unique_ptr<LeftSumEqualityEdge>;
386 bool isLinear()
const override {
return false; }
398 values *= dt->
value();
415 using Ptr = std::shared_ptr<LeftSumInequalityEdge>;
416 using UPtr = std::unique_ptr<LeftSumInequalityEdge>;
430 bool isLinear()
const override {
return false; }
443 values *= dt->
value();
459 #endif // SRC_OPTIMAL_CONTROL_INCLUDE_CORBO_OPTIMAL_CONTROL_STRUCTURED_OCP_EDGES_FINITE_DIFFERENCES_COLLOCATION_EDGES_H_
int getDimension() const override
Get dimension of the edge (dimension of the cost-function/constraint value vector)
bool isLeastSquaresForm() const override
Defines if the edge is formulated as Least-Squares form.
bool isLinear() const override
Return true if the edge is linear (and hence its Hessian is always zero)
int getDimension() const override
Get dimension of the edge (dimension of the cost-function/constraint value vector)
int getDimension() const override
Return number of elements/values/components stored in this vertex.
std::shared_ptr< TrapezoidalIntegralEqualityDynamicsEdge > Ptr
std::unique_ptr< LeftSumEqualityEdge > UPtr
void computeValues(Eigen::Ref< Eigen::VectorXd > values) override
Compute function values.
StageEqualityConstraint::Ptr _stage_eq
int getDimension() const override
Get dimension of the edge (dimension of the cost-function/constraint value vector)
LeftSumInequalityEdge(VectorVertex &x1, VectorVertex &u1, ScalarVertex &dt, StageInequalityConstraint::Ptr stage_ineq, int k)
bool isLeastSquaresForm() const override
Defines if the edge is formulated as Least-Squares form.
void setFiniteDifferencesCollocationMethod(FiniteDifferencesCollocationInterface::Ptr fd_eval)
virtual ~LeftSumCostEdge()=default
std::shared_ptr< StageInequalityConstraint > Ptr
std::shared_ptr< LeftSumCostEdge > Ptr
TrapezoidalIntegralInequalityEdge(VectorVertex &x1, VectorVertex &u1, VectorVertex &x2, ScalarVertex &dt, StageInequalityConstraint::Ptr stage_ineq, int k)
void setFiniteDifferencesCollocationMethod(FiniteDifferencesCollocationInterface::Ptr fd_eval)
int getDimension() const override
Get dimension of the edge (dimension of the cost-function/constraint value vector)
bool isLeastSquaresForm() const override
Defines if the edge is formulated as Least-Squares form.
std::shared_ptr< StageCost > Ptr
bool isLeastSquaresForm() const override
Defines if the edge is formulated as Least-Squares form.
const Eigen::VectorXd & values() const
Read-access to the underlying value vector.
std::unique_ptr< TrapezoidalIntegralInequalityEdge > UPtr
std::shared_ptr< FDCollocationEdge > Ptr
virtual ~TrapezoidalIntegralCostEdge()=default
std::unique_ptr< TrapezoidalIntegralEqualityDynamicsEdge > UPtr
int getDimension() const override
Get dimension of the edge (dimension of the cost-function/constraint value vector)
TrapezoidalIntegralCostEdge(VectorVertex &x1, VectorVertex &u1, VectorVertex &x2, ScalarVertex &dt, StageCost::Ptr stage_cost, int k)
FiniteDifferencesCollocationInterface::Ptr _fd_eval
TrapezoidalIntegralEqualityEdge(VectorVertex &x1, VectorVertex &u1, VectorVertex &x2, ScalarVertex &dt, StageEqualityConstraint::Ptr stage_eq, int k)
StageEqualityConstraint::Ptr _stage_eq
bool isLinear() const override
Return true if the edge is linear (and hence its Hessian is always zero)
bool isLinear() const override
Return true if the edge is linear (and hence its Hessian is always zero)
virtual ~LeftSumInequalityEdge()=default
void computeValues(Eigen::Ref< Eigen::VectorXd > values) override
Compute function values.
void computeValues(Eigen::Ref< Eigen::VectorXd > values) override
Compute function values.
void computeValues(Eigen::Ref< Eigen::VectorXd > values) override
Compute function values.
virtual ~TrapezoidalIntegralInequalityEdge()=default
#define EIGEN_MAKE_ALIGNED_OPERATOR_NEW
FDCollocationEdge(SystemDynamicsInterface::Ptr dynamics, VectorVertex &x1, VectorVertex &u1, VectorVertex &x2, ScalarVertex &dt)
LeftSumEqualityEdge(VectorVertex &x1, VectorVertex &u1, ScalarVertex &dt, StageEqualityConstraint::Ptr stage_eq, int k)
std::shared_ptr< SystemDynamicsInterface > Ptr
bool isLinear() const override
Return true if the edge is linear (and hence its Hessian is always zero)
SystemDynamicsInterface::Ptr _dynamics
StageInequalityConstraint::Ptr _stage_ineq
StageCost::Ptr _stage_cost
std::unique_ptr< FDCollocationEdge > UPtr
StageInequalityConstraint::Ptr _stage_ineq
TrapezoidalIntegralEqualityDynamicsEdge(SystemDynamicsInterface::Ptr dynamics, VectorVertex &x1, VectorVertex &u1, VectorVertex &x2, ScalarVertex &dt, StageEqualityConstraint::Ptr stage_eq, int k)
FiniteDifferencesCollocationInterface::Ptr _fd_eval
bool isLeastSquaresForm() const override
Defines if the edge is formulated as Least-Squares form.
std::unique_ptr< TrapezoidalIntegralCostEdge > UPtr
int getDimension() const override
Get dimension of the edge (dimension of the cost-function/constraint value vector)
int getDimension() const override
Get dimension of the edge (dimension of the cost-function/constraint value vector)
std::shared_ptr< FiniteDifferencesCollocationInterface > Ptr
bool isLinear() const override
Return true if the edge is linear (and hence its Hessian is always zero)
virtual ~LeftSumEqualityEdge()=default
A matrix or vector expression mapping an existing expression.
std::shared_ptr< TrapezoidalIntegralCostEdge > Ptr
const double & value() const
Get underlying value.
StageCost::Ptr _stage_cost
Vertex implementation for scalar values.
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.
bool isLeastSquaresForm() const override
Defines if the edge is formulated as Least-Squares form.
bool isLinear() const override
Return true if the edge is linear (and hence its Hessian is always zero)
bool isLinear() const override
Return true if the edge is linear (and hence its Hessian is always zero)
void computeValues(Eigen::Ref< Eigen::VectorXd > values) override
Compute function values.
std::unique_ptr< LeftSumCostEdge > UPtr
bool isLeastSquaresForm() const override
Defines if the edge is formulated as Least-Squares form.
Templated base edge class that stores an arbitary number of value.
int getDimension() const override
Get dimension of the edge (dimension of the cost-function/constraint value vector)
void computeValues(Eigen::Ref< Eigen::VectorXd > values) override
Compute function values.
Vertex implementation that stores an Eigen::VectorXd (dynamic dimension)
std::shared_ptr< TrapezoidalIntegralInequalityEdge > Ptr
SystemDynamicsInterface::Ptr _dynamics
StageEqualityConstraint::Ptr _stage_eq
void computeValues(Eigen::Ref< Eigen::VectorXd > values) override
Compute function values.
virtual ~TrapezoidalIntegralEqualityEdge()=default
virtual ~TrapezoidalIntegralEqualityDynamicsEdge()=default
void computeValues(Eigen::Ref< Eigen::VectorXd > values) override
Compute function values.
std::shared_ptr< StageEqualityConstraint > Ptr
LeftSumCostEdge(VectorVertex &x1, VectorVertex &u1, ScalarVertex &dt, StageCost::Ptr stage_cost, int k)
std::shared_ptr< LeftSumEqualityEdge > Ptr
const VertexContainer _vertices
Vertex container.
control_box_rst
Author(s): Christoph Rösmann
autogenerated on Wed Mar 2 2022 00:05:45