25 #ifndef SRC_OPTIMAL_CONTROL_INCLUDE_CORBO_OPTIMAL_CONTROL_FUNCTIONS_NLP_FUNCTIONS_H_ 26 #define SRC_OPTIMAL_CONTROL_INCLUDE_CORBO_OPTIMAL_CONTROL_FUNCTIONS_NLP_FUNCTIONS_H_ 34 class DiscretizationGridInterface;
58 const StageFunction& stage_fun, std::vector<BaseEdge::Ptr>& edges);
61 std::vector<BaseEdge::Ptr>& cost_edges, std::vector<BaseEdge::Ptr>& eq_edges,
62 std::vector<BaseEdge::Ptr>& ineq_edges);
65 std::vector<BaseEdge::Ptr>& cost_edges, std::vector<BaseEdge::Ptr>& eq_edges,
66 std::vector<BaseEdge::Ptr>& ineq_edges);
75 if (stage_cost && stage_cost->hasIntegralTerms(k))
return true;
76 if (stage_equalities && stage_equalities->hasIntegralTerms(k))
return true;
77 if (stage_inequalities && stage_inequalities->hasIntegralTerms(k))
return true;
84 final_stage_cost.reset();
85 stage_equalities.reset();
86 stage_inequalities.reset();
87 final_stage_constraints.reset();
88 stage_preprocessor.reset();
90 x_lb = Eigen::VectorXd();
91 x_ub = Eigen::VectorXd();
92 u_lb = Eigen::VectorXd();
93 u_ub = Eigen::VectorXd();
99 #endif // SRC_OPTIMAL_CONTROL_INCLUDE_CORBO_OPTIMAL_CONTROL_FUNCTIONS_NLP_FUNCTIONS_H_
BaseEdge::Ptr getFinalStateCostEdge(int k, VectorVertex &xf)
Generic interface class for discretization grids.
FinalStageConstraint::Ptr final_stage_constraints
StageCost::Ptr stage_cost
void checkAndInitializeBoundDimensions(int x_dim, int u_dim)
Vertex implementation for scalar values.
std::shared_ptr< StageEqualityConstraint > Ptr
std::shared_ptr< StageInequalityConstraint > Ptr
void getFinalControlDeviationEdges(int n, VectorVertex &u_ref, VectorVertex &u_prev, ScalarVertex &u_prev_dt, std::vector< BaseEdge::Ptr > &cost_edges, std::vector< BaseEdge::Ptr > &eq_edges, std::vector< BaseEdge::Ptr > &ineq_edges)
std::shared_ptr< FinalStageConstraint > Ptr
bool hasIntegralTerms(int k) const
FinalStageCost::Ptr final_stage_cost
std::shared_ptr< BaseEdge > Ptr
void getNonIntegralStageFunctionEdges(int k, VectorVertex &xk, VectorVertex &uk, ScalarVertex &dt, VectorVertex &u_prev, ScalarVertex &u_prev_dt, const StageFunction &stage_fun, std::vector< BaseEdge::Ptr > &edges)
BaseEdge::Ptr getFinalStateConstraintEdge(int k, VectorVertex &xf)
Interface class for reference trajectories.
std::shared_ptr< StagePreprocessor > Ptr
Vertex implementation that stores an Eigen::VectorXd (dynamic dimension)
bool update(int n, double t, ReferenceTrajectoryInterface &xref, ReferenceTrajectoryInterface &uref, ReferenceTrajectoryInterface *sref, bool single_dt, const Eigen::VectorXd &x0, const std::vector< double > &dts, const DiscretizationGridInterface *grid)
std::shared_ptr< StageCost > Ptr
StageInequalityConstraint::Ptr stage_inequalities
std::shared_ptr< FinalStageCost > Ptr
StageEqualityConstraint::Ptr stage_equalities
StagePreprocessor::Ptr stage_preprocessor