#include <non_uniform_shooting_grid_base.h>

Classes | |
| struct | ShootingInterval |
Public Types | |
| using | Ptr = std::shared_ptr< NonUniformShootingGridBase > |
| using | UPtr = std::unique_ptr< NonUniformShootingGridBase > |
Public Types inherited from corbo::DiscretizationGridInterface | |
| using | Ptr = std::shared_ptr< DiscretizationGridInterface > |
| using | UPtr = std::unique_ptr< DiscretizationGridInterface > |
Public Types inherited from corbo::VertexSetInterface | |
| using | Ptr = std::shared_ptr< VertexSetInterface > |
Public Member Functions | |
| void | clear () override |
| std::vector< VertexInterface * > & | getActiveVertices () override |
| double | getDtRef () const |
| void | getDts (std::vector< double > &dts) const |
| double | getFinalTime () const override |
| bool | getFirstControlInput (Eigen::VectorXd &u0) override |
| double | getFirstDt () const override |
| double | getInitialDt () const override |
| int | getInitialN () const override |
| DiscretizationGridInterface::Ptr | getInstance () const override=0 |
| Return a newly created shared instance of the implemented class. More... | |
| int | getN () const override |
| int | getNRef () const |
| void | getStateAndControlTimeSeries (TimeSeries::Ptr x_sequence, TimeSeries::Ptr u_sequence, double t_max=CORBO_INF_DBL) const override |
| Return state and control trajectory as time series object (shared instance) More... | |
| void | getVertices (std::vector< VertexInterface *> &vertices) override |
| bool | hasConstantControls () const override |
| bool | hasSingleDt () const override |
| bool | isEmpty () const override |
| bool | isTimeVariableGrid () const override |
| bool | isUniformGrid () const override |
| bool | isValid () const |
| NonUniformShootingGridBase ()=default | |
| bool | providesStateTrajectory () const override |
| void | setConsiderIntermediateStateConstraints (bool active) |
| void | setDtRef (double dt) |
| void | setInitialDt (double dt) override |
| void | setN (int n, bool try_resample=true) override |
| Return dimension of the control input dimension in the grid. More... | |
| void | setNRef (int n) |
| void | setNumControlsPerShootingInterval (int num_u_per_interv) |
| void | setNumControlsPerShootingInterval (int num_u_per_interv, bool intermediate_x_constraints) |
| void | setNumericalIntegrator (NumericalIntegratorExplicitInterface::Ptr integrator) |
| void | setWarmStart (bool active) |
| void | setXfFixed (const Eigen::Matrix< bool, -1, 1 > &xf_fixed) |
| GridUpdateResult | update (const Eigen::VectorXd &x0, ReferenceTrajectoryInterface &xref, ReferenceTrajectoryInterface &uref, NlpFunctions &nlp_fun, OptimizationEdgeSet &edges, SystemDynamicsInterface::Ptr dynamics, bool new_run, const Time &t, ReferenceTrajectoryInterface *sref=nullptr, const Eigen::VectorXd *prev_u=nullptr, double prev_u_dt=0, ReferenceTrajectoryInterface *xinit=nullptr, ReferenceTrajectoryInterface *uinit=nullptr) override |
| virtual | ~NonUniformShootingGridBase ()=default |
Public Member Functions inherited from corbo::DiscretizationGridInterface | |
| DiscretizationGridInterface ()=default | |
| DiscretizationGridInterface (int state_dim, int control_dim) | |
| virtual | ~DiscretizationGridInterface ()=default |
| Virtual destructor. More... | |
Public Member Functions inherited from corbo::VertexSetInterface | |
| void | applyIncrementNonFixed (const Eigen::Ref< const Eigen::VectorXd > &increment) |
| Active vertices related methods. More... | |
| void | applyIncrementNonFixed (int idx, double increment) |
| void | backupParametersActiveVertices () |
| void | clearConnectedEdges () |
| void | computeVertexIndices () |
| Precompute vertex indices in the hyper-graph (e.g. for the Jacobian or Hessian structure) More... | |
| void | discardBackupParametersActiveVertices (bool all=false) |
| void | getBounds (Eigen::Ref< Eigen::VectorXd > lb, Eigen::Ref< Eigen::VectorXd > ub) |
| double | getLowerBound (int idx) |
| int | getParameterDimension () |
| double | getParameterValue (int idx) |
| void | getParameterVector (Eigen::Ref< Eigen::VectorXd > x) |
| double | getUpperBound (int idx) |
| bool | isModified () const |
| void | restoreBackupParametersActiveVertices (bool keep_backup) |
| void | setBounds (const Eigen::Ref< const Eigen::VectorXd > &lb, const Eigen::Ref< const Eigen::VectorXd > &ub) |
| void | setLowerBound (int idx, double lb) |
| void | setModified (bool modified) |
| void | setParameterValue (int idx, double x) |
| void | setParameterVector (const Eigen::Ref< const Eigen::VectorXd > &x) |
| void | setUpperBound (int idx, double ub) |
| VertexSetInterface () | |
| virtual | ~VertexSetInterface () |
| Virtual destructor. More... | |
Protected Member Functions | |
| virtual bool | adaptGrid (bool new_run, NlpFunctions &nlp_fun) |
| bool | checkAndInitializeXfFixedFlags (int dim_x) |
| void | computeActiveVertices () override |
| virtual void | createEdges (NlpFunctions &nlp_fun, OptimizationEdgeSet &edges, SystemDynamicsInterface::Ptr dynamics)=0 |
| int | findNearestShootingInterval (const Eigen::VectorXd &x0) |
| void | initializeSequences (const Eigen::VectorXd &x0, const Eigen::VectorXd &xf, ReferenceTrajectoryInterface &uref, NlpFunctions &nlp_fun) |
| void | initializeSequences (const Eigen::VectorXd &x0, const Eigen::VectorXd &xf, ReferenceTrajectoryInterface &xref, ReferenceTrajectoryInterface &uref, NlpFunctions &nlp_fun) |
| virtual bool | isDtFixedIntended () const |
| virtual bool | isGridAdaptActive () const |
| virtual bool | isMovingHorizonWarmStartActive () const |
| virtual bool | isXfShootingNode () const |
| void | updateBounds (const NlpFunctions &nlp_fun) |
| void | warmStartShifting (const Eigen::VectorXd &x0) |
Protected Member Functions inherited from corbo::DiscretizationGridInterface | |
| void | setLastControlRef (const Eigen::VectorXd &last_u_ref) |
| void | setPreviousControl (const Eigen::VectorXd &prev_u, double prev_u_dt) |
Protected Member Functions inherited from corbo::VertexSetInterface | |
| void | setVertexIdx (VertexInterface &vertex, int idx) |
Protected Attributes | |
| std::vector< VertexInterface * > | _active_vertices |
| double | _dt_lb = 0 |
| double | _dt_ref = 0.1 |
| double | _dt_ub = CORBO_INF_DBL |
| bool | _first_run = true |
| bool | _full_discretization = true |
| NumericalIntegratorExplicitInterface::Ptr | _integrator |
| bool | _intermediate_x_constraints = false |
| std::vector< ShootingInterval > | _intervals |
| int | _n_adapt = 0 |
| int | _n_ref = 11 |
| int | _num_u_per_interv_ref = 1 |
| bool | _warm_start = false |
| PartiallyFixedVectorVertex | _xf |
| Eigen::Matrix< bool, -1, 1 > | _xf_fixed |
Protected Attributes inherited from corbo::DiscretizationGridInterface | |
| VectorVertex | _u_prev |
| ScalarVertex | _u_prev_dt |
| VectorVertex | _u_ref |
Protected Attributes inherited from corbo::VertexSetInterface | |
| bool | _modified = true |
Additional Inherited Members | |
Static Public Member Functions inherited from corbo::DiscretizationGridInterface | |
| static Factory< DiscretizationGridInterface > & | getFactory () |
| Get access to the accociated factory. More... | |
Definition at line 39 of file non_uniform_shooting_grid_base.h.
| using corbo::NonUniformShootingGridBase::Ptr = std::shared_ptr<NonUniformShootingGridBase> |
Definition at line 42 of file non_uniform_shooting_grid_base.h.
| using corbo::NonUniformShootingGridBase::UPtr = std::unique_ptr<NonUniformShootingGridBase> |
Definition at line 43 of file non_uniform_shooting_grid_base.h.
|
default |
|
virtualdefault |
|
inlineprotectedvirtual |
Reimplemented in corbo::NonUniformMultipleShootingVariableGrid.
Definition at line 138 of file non_uniform_shooting_grid_base.h.
|
protected |
Definition at line 457 of file non_uniform_shooting_grid_base.cpp.
|
overridevirtual |
Implements corbo::DiscretizationGridInterface.
Definition at line 508 of file non_uniform_shooting_grid_base.cpp.
|
overrideprotectedvirtual |
Implements corbo::DiscretizationGridInterface.
Definition at line 538 of file non_uniform_shooting_grid_base.cpp.
|
protectedpure virtual |
Implemented in corbo::NonUniformMultipleShootingVariableGrid.
|
protected |
Definition at line 368 of file non_uniform_shooting_grid_base.cpp.
|
inlineoverridevirtual |
Implements corbo::DiscretizationGridInterface.
Definition at line 124 of file non_uniform_shooting_grid_base.h.
|
inline |
Definition at line 110 of file non_uniform_shooting_grid_base.h.
| void corbo::NonUniformShootingGridBase::getDts | ( | std::vector< double > & | dts | ) | const |
Definition at line 448 of file non_uniform_shooting_grid_base.cpp.
|
overridevirtual |
Implements corbo::DiscretizationGridInterface.
Definition at line 405 of file non_uniform_shooting_grid_base.cpp.
|
overridevirtual |
Implements corbo::DiscretizationGridInterface.
Definition at line 415 of file non_uniform_shooting_grid_base.cpp.
|
inlineoverridevirtual |
Implements corbo::DiscretizationGridInterface.
Definition at line 73 of file non_uniform_shooting_grid_base.h.
|
inlineoverridevirtual |
Implements corbo::DiscretizationGridInterface.
Definition at line 97 of file non_uniform_shooting_grid_base.h.
|
inlineoverridevirtual |
Implements corbo::DiscretizationGridInterface.
Definition at line 98 of file non_uniform_shooting_grid_base.h.
|
overridepure virtual |
Return a newly created shared instance of the implemented class.
Implements corbo::DiscretizationGridInterface.
Implemented in corbo::NonUniformMultipleShootingVariableGrid.
|
overridevirtual |
Implements corbo::DiscretizationGridInterface.
Definition at line 423 of file non_uniform_shooting_grid_base.cpp.
|
inline |
Definition at line 100 of file non_uniform_shooting_grid_base.h.
|
overridevirtual |
Return state and control trajectory as time series object (shared instance)
Implements corbo::DiscretizationGridInterface.
Definition at line 556 of file non_uniform_shooting_grid_base.cpp.
|
overridevirtual |
Implements corbo::DiscretizationGridInterface.
Definition at line 518 of file non_uniform_shooting_grid_base.cpp.
|
inlineoverridevirtual |
Implements corbo::DiscretizationGridInterface.
Definition at line 76 of file non_uniform_shooting_grid_base.h.
|
inlineoverridevirtual |
Implements corbo::DiscretizationGridInterface.
Definition at line 77 of file non_uniform_shooting_grid_base.h.
|
protected |
Definition at line 146 of file non_uniform_shooting_grid_base.cpp.
|
protected |
Definition at line 224 of file non_uniform_shooting_grid_base.cpp.
|
inlineprotectedvirtual |
Reimplemented in corbo::NonUniformMultipleShootingVariableGrid.
Definition at line 148 of file non_uniform_shooting_grid_base.h.
|
inlineoverridevirtual |
Implements corbo::DiscretizationGridInterface.
Definition at line 88 of file non_uniform_shooting_grid_base.h.
|
inlineprotectedvirtual |
Reimplemented in corbo::NonUniformMultipleShootingVariableGrid.
Definition at line 150 of file non_uniform_shooting_grid_base.h.
|
inlineprotectedvirtual |
Reimplemented in corbo::NonUniformMultipleShootingVariableGrid.
Definition at line 149 of file non_uniform_shooting_grid_base.h.
|
inlineoverridevirtual |
Implements corbo::DiscretizationGridInterface.
Definition at line 78 of file non_uniform_shooting_grid_base.h.
|
inlineoverridevirtual |
Implements corbo::DiscretizationGridInterface.
Definition at line 79 of file non_uniform_shooting_grid_base.h.
|
inline |
Definition at line 89 of file non_uniform_shooting_grid_base.h.
|
inlineprotectedvirtual |
Definition at line 155 of file non_uniform_shooting_grid_base.h.
|
inlineoverridevirtual |
Implements corbo::DiscretizationGridInterface.
Definition at line 80 of file non_uniform_shooting_grid_base.h.
|
inline |
Definition at line 113 of file non_uniform_shooting_grid_base.h.
|
inline |
Definition at line 109 of file non_uniform_shooting_grid_base.h.
|
inlineoverridevirtual |
Implements corbo::DiscretizationGridInterface.
Definition at line 96 of file non_uniform_shooting_grid_base.h.
|
inlineoverridevirtual |
Return dimension of the control input dimension in the grid.
Implements corbo::DiscretizationGridInterface.
Definition at line 91 of file non_uniform_shooting_grid_base.h.
| void corbo::NonUniformShootingGridBase::setNRef | ( | int | n | ) |
Definition at line 434 of file non_uniform_shooting_grid_base.cpp.
|
inline |
Definition at line 102 of file non_uniform_shooting_grid_base.h.
|
inline |
Definition at line 103 of file non_uniform_shooting_grid_base.h.
|
inline |
Definition at line 115 of file non_uniform_shooting_grid_base.h.
|
inline |
Definition at line 112 of file non_uniform_shooting_grid_base.h.
|
inline |
Definition at line 117 of file non_uniform_shooting_grid_base.h.
|
overridevirtual |
Implements corbo::DiscretizationGridInterface.
Definition at line 37 of file non_uniform_shooting_grid_base.cpp.
|
protected |
Definition at line 472 of file non_uniform_shooting_grid_base.cpp.
|
protected |
Definition at line 302 of file non_uniform_shooting_grid_base.cpp.
|
protected |
Definition at line 161 of file non_uniform_shooting_grid_base.h.
|
protected |
Definition at line 173 of file non_uniform_shooting_grid_base.h.
|
protected |
Definition at line 166 of file non_uniform_shooting_grid_base.h.
|
protected |
Definition at line 174 of file non_uniform_shooting_grid_base.h.
|
protected |
Definition at line 169 of file non_uniform_shooting_grid_base.h.
|
protected |
Definition at line 176 of file non_uniform_shooting_grid_base.h.
|
protected |
Definition at line 157 of file non_uniform_shooting_grid_base.h.
|
protected |
Definition at line 177 of file non_uniform_shooting_grid_base.h.
|
protected |
Definition at line 159 of file non_uniform_shooting_grid_base.h.
|
protected |
Definition at line 165 of file non_uniform_shooting_grid_base.h.
|
protected |
Definition at line 164 of file non_uniform_shooting_grid_base.h.
|
protected |
Definition at line 163 of file non_uniform_shooting_grid_base.h.
|
protected |
Definition at line 168 of file non_uniform_shooting_grid_base.h.
|
protected |
Definition at line 160 of file non_uniform_shooting_grid_base.h.
|
protected |
Definition at line 172 of file non_uniform_shooting_grid_base.h.