Go to the documentation of this file.
25 #ifndef SRC_OPTIMAL_CONTROL_INCLUDE_CORBO_OPTIMAL_CONTROL_STRUCTURED_OCP_DISCRETIZATION_GRIDS_FINITE_DIFFERENCES_VARIABLE_GRID_H_
26 #define SRC_OPTIMAL_CONTROL_INCLUDE_CORBO_OPTIMAL_CONTROL_STRUCTURED_OCP_DISCRETIZATION_GRIDS_FINITE_DIFFERENCES_VARIABLE_GRID_H_
34 class FiniteDifferencesVariableGrid :
public FiniteDifferencesGrid
37 using Ptr = std::shared_ptr<FiniteDifferencesVariableGrid>;
38 using UPtr = std::unique_ptr<FiniteDifferencesVariableGrid>;
58 #ifdef MESSAGE_SUPPORT
59 void fromMessage(
const messages::FiniteDifferencesVariableGrid& message, std::stringstream* issues);
60 void toMessage(messages::FiniteDifferencesVariableGrid& message)
const;
62 void fromMessage(
const messages::DiscretizationGrid& message, std::stringstream* issues)
override
64 fromMessage(message.finite_differences_variable_grid(), issues);
66 void toMessage(messages::DiscretizationGrid& message)
const override { toMessage(*message.mutable_finite_differences_variable_grid()); }
72 bool adaptGrid(
bool new_run, NlpFunctions& nlp_fun)
override;
92 #endif // SRC_OPTIMAL_CONTROL_INCLUDE_CORBO_OPTIMAL_CONTROL_STRUCTURED_OCP_DISCRETIZATION_GRIDS_FINITE_DIFFERENCES_VARIABLE_GRID_H_
FiniteDifferencesVariableGrid()=default
bool isDtFixedIntended() const override
void setGridAdaptTimeBasedAggressiveEstimate(int n_max, double dt_hyst_ratio=0.1, bool adapt_first_iter=false)
void setGridAdaptTimeBasedSingleStep(int n_max, double dt_hyst_ratio=0.1, bool adapt_first_iter=false)
bool adaptGridTimeBasedSingleStep(NlpFunctions &nlp_fun)
GridAdaptStrategy _grid_adapt
std::shared_ptr< FiniteDifferencesVariableGrid > Ptr
bool isMovingHorizonWarmStartActive() const override
void setDtBounds(double dt_lb, double dt_ub)
#define FACTORY_REGISTER_DISCRETIZATION_GRID(type)
std::shared_ptr< DiscretizationGridInterface > Ptr
static Factory & instance()
< Retrieve static instance of the factory
bool adaptGridSimpleShrinkingHorizon(NlpFunctions &nlp_fun)
DiscretizationGridInterface::Ptr getInstance() const override
Return a newly created shared instance of the implemented class.
@ TimeBasedAggressiveEstimate
void setGridAdaptSimpleShrinkingHorizon(bool adapt_first_iter=false)
bool isGridAdaptActive() const override
virtual ~FiniteDifferencesVariableGrid()=default
static Factory< DiscretizationGridInterface > & getFactory()
Get access to the associated factory.
std::unique_ptr< FiniteDifferencesVariableGrid > UPtr
bool adaptGridTimeBasedAggressiveEstimate(NlpFunctions &nlp_fun)
void disableGridAdaptation()
bool adaptGrid(bool new_run, NlpFunctions &nlp_fun) override
control_box_rst
Author(s): Christoph Rösmann
autogenerated on Wed Mar 2 2022 00:05:45