Go to the documentation of this file.
25 #ifndef SRC_OPTIMAL_CONTROL_INCLUDE_CORBO_OPTIMAL_CONTROL_OPTIMAL_CONTROL_PROBLEM_INTERFACE_H_
26 #define SRC_OPTIMAL_CONTROL_INCLUDE_CORBO_OPTIMAL_CONTROL_OPTIMAL_CONTROL_PROBLEM_INTERFACE_H_
36 #ifdef MESSAGE_SUPPORT
37 #include <corbo-communication/messages/optimal_control/optimal_control_problem.pb.h>
44 class OptimalControlProblemInterface
47 using Ptr = std::shared_ptr<OptimalControlProblemInterface>;
48 using UPtr = std::unique_ptr<OptimalControlProblemInterface>;
56 virtual void reset() = 0;
60 virtual int getN()
const = 0;
64 virtual bool compute(
const StateVector&
x, ReferenceTrajectoryInterface& xref, ReferenceTrajectoryInterface& uref,
65 ReferenceTrajectoryInterface* sref,
const Time& t,
bool new_run =
true, SignalTargetInterface* signal_target =
nullptr,
67 const std::string& ns =
"") = 0;
88 #ifdef MESSAGE_SUPPORT
89 virtual void toMessage(corbo::messages::OptimalControlProblem& message)
const {}
90 virtual void fromMessage(
const corbo::messages::OptimalControlProblem& message, std::stringstream* issues =
nullptr) {}
95 #define FACTORY_REGISTER_OCP(type) FACTORY_REGISTER_OBJECT(type, OptimalControlProblemInterface)
99 #endif // SRC_OPTIMAL_CONTROL_INCLUDE_CORBO_OPTIMAL_CONTROL_OPTIMAL_CONTROL_PROBLEM_INTERFACE_H_
virtual void setPreviousControlInput(const Eigen::Ref< const ControlVector > &u_prev, double dt)
virtual Ptr getInstance() const =0
virtual int getControlInputDimension() const =0
std::unique_ptr< OptimalControlProblemInterface > UPtr
Eigen::VectorXd ControlVector
virtual OptimalControlProblemStatistics::Ptr getStatistics() const
Interface class for reference trajectories.
std::shared_ptr< OptimalControlProblemStatistics > Ptr
virtual double getCurrentObjectiveValue()
Eigen::VectorXd StateVector
constexpr const double CORBO_INF_DBL
Representation for infinity (double version)
virtual bool getFirstControlInput(ControlVector &u0) const =0
virtual ~OptimalControlProblemInterface()
std::shared_ptr< OptimalControlProblemInterface > Ptr
virtual bool isConstantControlAction() const =0
virtual double getFirstDt() const =0
virtual bool compute(const StateVector &x, ReferenceTrajectoryInterface &xref, ReferenceTrajectoryInterface &uref, ReferenceTrajectoryInterface *sref, const Time &t, bool new_run=true, SignalTargetInterface *signal_target=nullptr, ReferenceTrajectoryInterface *xinit=nullptr, ReferenceTrajectoryInterface *uinit=nullptr, const std::string &ns="")=0
virtual void setPreviousControlInputDt(double dt)
virtual bool initialize()
A matrix or vector expression mapping an existing expression.
virtual int getN() const =0
virtual bool providesFutureStates() const =0
std::shared_ptr< TimeSeries > Ptr
virtual int getStateDimension() const =0
virtual void getTimeSeries(TimeSeries::Ptr x_sequence, TimeSeries::Ptr u_sequence, double t_max=CORBO_INF_DBL)=0
virtual bool providesFutureControls() const =0
control_box_rst
Author(s): Christoph Rösmann
autogenerated on Wed Mar 2 2022 00:05:58