Go to the documentation of this file.
25 #ifndef SRC_OPTIMAL_CONTROL_INCLUDE_CORBO_OPTIMAL_CONTROL_FUNCTIONS_FINAL_STATE_COST_H_
26 #define SRC_OPTIMAL_CONTROL_INCLUDE_CORBO_OPTIMAL_CONTROL_FUNCTIONS_FINAL_STATE_COST_H_
38 class BaseQuadraticFinalStateCost :
public FinalStageCost
41 using Ptr = std::shared_ptr<BaseQuadraticFinalStateCost>;
42 using ConstPtr = std::shared_ptr<const BaseQuadraticFinalStateCost>;
44 virtual const Eigen::MatrixXd&
getWeightQf()
const = 0;
47 class QuadraticFinalStateCost :
public BaseQuadraticFinalStateCost
50 using Ptr = std::shared_ptr<QuadraticFinalStateCost>;
64 const Eigen::MatrixXd&
getWeightQf()
const override {
return _Qf; }
71 bool single_dt,
const Eigen::VectorXd& x0,
StagePreprocessor::Ptr stage_preprocessor,
const std::vector<double>& dts,
79 return dimension_modified;
82 bool checkParameters(
int state_dim,
int control_dim, std::stringstream* issues)
const override;
84 #ifdef MESSAGE_SUPPORT
85 bool fromMessage(
const messages::FinalStageCost& message, std::stringstream* issues)
override;
86 void toMessage(messages::FinalStageCost& message)
const override;
133 const Eigen::MatrixXd&
getWeightQf()
const override {
return _Qf; }
137 bool update(
int n,
double t, ReferenceTrajectoryInterface& xref, ReferenceTrajectoryInterface& uref, ReferenceTrajectoryInterface* sref,
141 bool checkParameters(
int state_dim,
int control_dim, std::stringstream* issues)
const override;
143 #ifdef MESSAGE_SUPPORT
144 bool fromMessage(
const messages::FinalStageCost& message, std::stringstream* issues)
override;
145 void toMessage(messages::FinalStageCost& message)
const override;
171 #endif // SRC_OPTIMAL_CONTROL_INCLUDE_CORBO_OPTIMAL_CONTROL_FUNCTIONS_FINAL_STATE_COST_H_
std::shared_ptr< QuadraticFinalStateCost > Ptr
bool _R_diagonal_mode_intentionally
int getNonIntegralStateTermDimension(int k) const override
std::shared_ptr< BaseQuadraticFinalStateCost > Ptr
std::shared_ptr< StagePreprocessor > Ptr
FinalStageCost::Ptr getInstance() const override
Return a newly created shared instance of the implemented class.
Eigen::VectorXd _steady_state_x
Interface class for reference trajectories.
void computeNonIntegralStateTerm(int k, const Eigen::Ref< const Eigen::VectorXd > &x_k, Eigen::Ref< Eigen::VectorXd > cost) const override
#define FACTORY_REGISTER_FINAL_STAGE_COST(type)
void computeNonIntegralStateTerm(int k, const Eigen::Ref< const Eigen::VectorXd > &x_k, Eigen::Ref< Eigen::VectorXd > cost) const override
Eigen::VectorXd _steady_state_u
Eigen::DiagonalMatrix< double, -1 > _Qf_diag
bool setWeightQf(const Eigen::Ref< const Eigen::MatrixXd > &Qf)
bool computeWeightQfSqrt()
bool checkParameters(int state_dim, int control_dim, std::stringstream *issues) const override
virtual const Eigen::MatrixXd & getWeightQf() const =0
virtual bool isZero() const
SystemDynamicsInterface::Ptr _dynamics
const Eigen::MatrixXd & getWeightQf() const override
int getNonIntegralStateTermDimension(int k) const override
bool _diagonal_mode_intentionally
virtual bool update(int n, double t, ReferenceTrajectoryInterface &xref, ReferenceTrajectoryInterface &uref, ReferenceTrajectoryInterface *sref, bool single_dt, const Eigen::VectorXd &x0, StagePreprocessor::Ptr stage_preprocessor, const std::vector< double > &dts, const DiscretizationGridInterface *grid)
const ReferenceTrajectoryInterface * _x_ref
Eigen::DiagonalMatrix< double, -1 > _Qf_diag_sqrt
std::shared_ptr< SystemDynamicsInterface > Ptr
const Eigen::MatrixXd & getWeightQf() const override
bool checkParameters(int state_dim, int control_dim, std::stringstream *issues) const override
void setLsqForm(bool lsq_form)
A matrix or vector expression mapping an existing expression.
bool update(int n, double t, ReferenceTrajectoryInterface &xref, ReferenceTrajectoryInterface &uref, ReferenceTrajectoryInterface *sref, bool single_dt, const Eigen::VectorXd &x0, StagePreprocessor::Ptr stage_preprocessor, const std::vector< double > &dts, const DiscretizationGridInterface *grid) override
bool setWeightQ(const Eigen::Ref< const Eigen::MatrixXd > &Q)
const ReferenceTrajectoryInterface * _x_ref
bool _Q_diagonal_mode_intentionally
QuadraticFinalStateCostRiccati()
void setLsqForm(bool lsq_form)
std::shared_ptr< const BaseQuadraticFinalStateCost > ConstPtr
std::shared_ptr< FinalStageCost > Ptr
bool update(int n, double t, ReferenceTrajectoryInterface &xref, ReferenceTrajectoryInterface &uref, ReferenceTrajectoryInterface *sref, bool single_dt, const Eigen::VectorXd &x0, StagePreprocessor::Ptr stage_preprocessor, const std::vector< double > &dts, const DiscretizationGridInterface *) override
bool isLsqFormNonIntegralStateTerm(int k) const override
FinalStageCost::Ptr getInstance() const override
Return a newly created shared instance of the implemented class.
void setSystemDynamics(SystemDynamicsInterface::Ptr dynamics)
bool setWeightR(const Eigen::Ref< const Eigen::MatrixXd > &R)
QuadraticFinalStateCost()
Generic interface class for discretization grids.
control_box_rst
Author(s): Christoph Rösmann
autogenerated on Wed Mar 2 2022 00:05:45