#include <multiple_shooting_grid.h>
Public Types | |
using | Ptr = std::shared_ptr< MultipleShootingGrid > |
using | UPtr = std::unique_ptr< MultipleShootingGrid > |
![]() | |
using | Ptr = std::shared_ptr< ShootingGridBase > |
using | UPtr = std::unique_ptr< ShootingGridBase > |
![]() | |
using | Ptr = std::shared_ptr< DiscretizationGridInterface > |
using | UPtr = std::unique_ptr< DiscretizationGridInterface > |
![]() | |
using | Ptr = std::shared_ptr< VertexSetInterface > |
Public Member Functions | |
DiscretizationGridInterface::Ptr | getInstance () const override |
Return a newly created shared instance of the implemented class. More... | |
MultipleShootingGrid ()=default | |
virtual | ~MultipleShootingGrid ()=default |
![]() | |
void | clear () override |
std::vector< VertexInterface * > & | getActiveVertices () override |
double | getDt () const |
double | getDtRef () const |
double | getFinalTime () const override |
bool | getFirstControlInput (Eigen::VectorXd &u0) override |
double | getFirstDt () const override |
double | getInitialDt () const override |
int | getInitialN () const override |
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 |
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) |
ShootingGridBase ()=default | |
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 | ~ShootingGridBase ()=default |
![]() | |
DiscretizationGridInterface ()=default | |
DiscretizationGridInterface (int state_dim, int control_dim) | |
virtual | ~DiscretizationGridInterface ()=default |
Virtual destructor. More... | |
![]() | |
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... | |
Static Public Member Functions | |
static Factory< DiscretizationGridInterface > & | getFactory () |
Get access to the associated factory. More... | |
![]() | |
static Factory< DiscretizationGridInterface > & | getFactory () |
Get access to the accociated factory. More... | |
Protected Member Functions | |
void | createEdges (NlpFunctions &nlp_fun, OptimizationEdgeSet &edges, SystemDynamicsInterface::Ptr dynamics) override |
void | getStageFunctionEdgesIntermediateControlDtMultipleShooting (int k, VectorVertex &uk, ScalarVertex &dt, VectorVertex &u_prev, ScalarVertex &dt_prev, const StageFunction &stage_fun, std::vector< BaseEdge::Ptr > &edges) |
bool | isDtFixedIntended () const override |
![]() | |
virtual bool | adaptGrid (bool new_run, NlpFunctions &nlp_fun) |
bool | checkAndInitializeXfFixedFlags (int dim_x) |
void | computeActiveVertices () override |
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 | isGridAdaptActive () const |
virtual bool | isMovingHorizonWarmStartActive () const |
virtual bool | isXfShootingNode () const |
void | resampleTrajectory (int n_new, NlpFunctions &nlp_fun) |
void | updateBounds (const NlpFunctions &nlp_fun) |
void | warmStartShifting (const Eigen::VectorXd &x0) |
![]() | |
void | setLastControlRef (const Eigen::VectorXd &last_u_ref) |
void | setPreviousControl (const Eigen::VectorXd &prev_u, double prev_u_dt) |
![]() | |
void | setVertexIdx (VertexInterface &vertex, int idx) |
Additional Inherited Members | |
![]() | |
std::vector< VertexInterface * > | _active_vertices |
ScalarVertex | _dt |
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 |
![]() | |
VectorVertex | _u_prev |
ScalarVertex | _u_prev_dt |
VectorVertex | _u_ref |
![]() | |
bool | _modified = true |
Definition at line 34 of file multiple_shooting_grid.h.
using corbo::MultipleShootingGrid::Ptr = std::shared_ptr<MultipleShootingGrid> |
Definition at line 37 of file multiple_shooting_grid.h.
using corbo::MultipleShootingGrid::UPtr = std::unique_ptr<MultipleShootingGrid> |
Definition at line 38 of file multiple_shooting_grid.h.
|
default |
|
virtualdefault |
|
overrideprotectedvirtual |
Implements corbo::ShootingGridBase.
Definition at line 38 of file multiple_shooting_grid.cpp.
|
inlinestatic |
Get access to the associated factory.
Definition at line 47 of file multiple_shooting_grid.h.
|
inlineoverridevirtual |
Return a newly created shared instance of the implemented class.
Implements corbo::ShootingGridBase.
Reimplemented in corbo::MultipleShootingVariableGrid.
Definition at line 44 of file multiple_shooting_grid.h.
|
protected |
Definition at line 199 of file multiple_shooting_grid.cpp.
|
inlineoverrideprotectedvirtual |
Reimplemented from corbo::ShootingGridBase.
Reimplemented in corbo::MultipleShootingVariableGrid.
Definition at line 66 of file multiple_shooting_grid.h.