25 #ifndef SRC_OPTIMAL_CONTROL_INCLUDE_CORBO_OPTIMAL_CONTROL_STRUCTURED_OCP_DISCRETIZATION_GRIDS_MULTIPLE_SHOOTING_VARIABLE_GRID_H_ 26 #define SRC_OPTIMAL_CONTROL_INCLUDE_CORBO_OPTIMAL_CONTROL_STRUCTURED_OCP_DISCRETIZATION_GRIDS_MULTIPLE_SHOOTING_VARIABLE_GRID_H_ 37 using Ptr = std::shared_ptr<MultipleShootingVariableGrid>;
38 using UPtr = std::unique_ptr<MultipleShootingVariableGrid>;
58 #ifdef MESSAGE_SUPPORT 59 void fromMessage(
const messages::MultipleShootingVariableGrid& message, std::stringstream* issues);
60 void toMessage(messages::MultipleShootingVariableGrid& message)
const;
62 void fromMessage(
const messages::DiscretizationGrid& message, std::stringstream* issues)
override 64 fromMessage(message.multiple_shooting_variable_grid(), issues);
66 void toMessage(messages::DiscretizationGrid& message)
const override { toMessage(*message.mutable_multiple_shooting_variable_grid()); }
91 #endif // SRC_OPTIMAL_CONTROL_INCLUDE_CORBO_OPTIMAL_CONTROL_STRUCTURED_OCP_DISCRETIZATION_GRIDS_MULTIPLE_SHOOTING_VARIABLE_GRID_H_
std::unique_ptr< DiscretizationGridInterface > UPtr
void setGridAdaptSimpleShrinkingHorizon()
static Factory< DiscretizationGridInterface > & getFactory()
Get access to the associated factory.
GridAdaptStrategy _grid_adapt
bool isGridAdaptActive() const override
bool adaptGridTimeBasedSingleStep(NlpFunctions &nlp_fun)
#define FACTORY_REGISTER_DISCRETIZATION_GRID(type)
bool adaptGridTimeBasedAggressiveEstimate(NlpFunctions &nlp_fun)
void setDtBounds(double dt_lb, double dt_ub)
void setGridAdaptTimeBasedAggressiveEstimate(int n_max, double dt_hyst_ratio=0.1)
bool adaptGridSimpleShrinkingHorizon(NlpFunctions &nlp_fun)
virtual ~MultipleShootingVariableGrid()=default
void disableGridAdaptation()
static Factory & instance()
< Retrieve static instance of the factory
bool isDtFixedIntended() const override
std::shared_ptr< DiscretizationGridInterface > Ptr
bool adaptGrid(bool new_run, NlpFunctions &nlp_fun) override
void setGridAdaptTimeBasedSingleStep(int n_max, double dt_hyst_ratio=0.1)
DiscretizationGridInterface::Ptr getInstance() const override
Return a newly created shared instance of the implemented class.
bool isMovingHorizonWarmStartActive() const override
MultipleShootingVariableGrid()=default