Public Types | Public Member Functions | Protected Member Functions | Private Attributes | List of all members
corbo::MultipleShootingEdge Class Reference

#include <multiple_shooting_edges.h>

Inheritance diagram for corbo::MultipleShootingEdge:
Inheritance graph
[legend]

Public Types

using Ptr = std::shared_ptr< MultipleShootingEdge >
 
using UPtr = std::unique_ptr< MultipleShootingEdge >
 
- Public Types inherited from corbo::MixedEdge<>
using ConstPtr = std::shared_ptr< const MixedEdge >
 
using Ptr = std::shared_ptr< MixedEdge >
 
using UPtr = std::unique_ptr< MixedEdge >
 
using VertexContainer = std::vector< VertexInterface * >
 Typedef to represent the vertex container. More...
 
- Public Types inherited from corbo::BaseMixedEdge
using Ptr = std::shared_ptr< BaseMixedEdge >
 
using UPtr = std::unique_ptr< BaseMixedEdge >
 
- Public Types inherited from corbo::EdgeInterface
using Ptr = std::shared_ptr< EdgeInterface >
 
using UPtr = std::unique_ptr< EdgeInterface >
 

Public Member Functions

void computeEqualityValues (Eigen::Ref< Eigen::VectorXd > eq_values) override
 
void computeInequalityValues (Eigen::Ref< Eigen::VectorXd > ineq_values) override
 
void computeObjectiveValues (Eigen::Ref< Eigen::VectorXd > obj_values) override
 
void finalize ()
 
int getEqualityDimension () const override
 
int getInequalityDimension () const override
 
int getObjectiveDimension () const override
 
bool isEqualityLinear () const override
 
bool isInequalityLinear () const override
 
bool isObjectiveLeastSquaresForm () const override
 
bool isObjectiveLinear () const override
 Return true if the edge is linear (and hence its Hessian is always zero) More...
 
 MultipleShootingEdge (SystemDynamicsInterface::Ptr dynamics, StageCost::ConstPtr stage_cost, StageEqualityConstraint::ConstPtr stage_eq, StageInequalityConstraint::ConstPtr stage_ineq, int k, int n_interval, int nc_interval, int nt_interval, bool eval_intermediate_constr)
 
void precompute () override
 
void setIntegrator (NumericalIntegratorExplicitInterface::Ptr integrator)
 
- Public Member Functions inherited from corbo::MixedEdge<>
int getNumVertices () const override
 Return number of attached vertices. More...
 
const VertexInterfacegetVertex (int idx) const override
 
VertexInterfacegetVertexRaw (int idx) override
 Get access to vertex with index idx (0 <= idx < numVertices) More...
 
 MixedEdge ()
 
 MixedEdge (int num_vertices)
 
void resizeVertexContainer (int n)
 Set number n of vertices attached to this edge. More...
 
void setVertex (int idx, VertexInterface &vertex)
 
int verticesDimension () const override
 Return the combined dimension of all attached vertices (excluding fixed vertex components) More...
 
- Public Member Functions inherited from corbo::BaseMixedEdge
virtual void computeConstraintHessians (int vtx_idx_i, int vtx_idx_j, const Eigen::Ref< const Eigen::MatrixXd > &eq_jacobian_i, const Eigen::Ref< const Eigen::MatrixXd > &ineq_jacobian_i, Eigen::Ref< Eigen::MatrixXd > eq_hessian_ij, Eigen::Ref< Eigen::MatrixXd > ineq_hessian_ij, const double *multipliers_eq=nullptr, const double *multipliers_ineq=nullptr)
 
virtual void computeConstraintHessiansInc (int vtx_idx_i, int vtx_idx_j, const Eigen::Ref< const Eigen::MatrixXd > &eq_jacobian_i, const Eigen::Ref< const Eigen::MatrixXd > &ineq_jacobian_i, Eigen::Ref< Eigen::MatrixXd > eq_hessian_ij, Eigen::Ref< Eigen::MatrixXd > ineq_hessian_ij, const double *multipliers_eq=nullptr, const double *multipliers_ineq=nullptr)
 
virtual void computeConstraintJacobians (int vtx_idx, Eigen::Ref< Eigen::MatrixXd > eq_jacobian, Eigen::Ref< Eigen::MatrixXd > ineq_jacobian, const double *eq_multipliers=nullptr, const double *ineq_multipliers=nullptr)
 
virtual void computeEqualityHessian (int vtx_idx_i, int vtx_idx_j, const Eigen::Ref< const Eigen::MatrixXd > &block_jacobian_i, Eigen::Ref< Eigen::MatrixXd > block_hessian_ij, const double *multipliers=nullptr, double weight=1.0)
 
virtual void computeEqualityHessianInc (int vtx_idx_i, int vtx_idx_j, const Eigen::Ref< const Eigen::MatrixXd > &block_jacobian_i, Eigen::Ref< Eigen::MatrixXd > block_hessian_ij, const double *multipliers=nullptr, double weight=1.0)
 
virtual void computeEqualityJacobian (int vtx_idx, Eigen::Ref< Eigen::MatrixXd > block_jacobian, const double *multipliers=nullptr)
 
virtual void computeHessians (int vtx_idx_i, int vtx_idx_j, const Eigen::Ref< const Eigen::MatrixXd > &obj_jacobian_i, const Eigen::Ref< const Eigen::MatrixXd > &eq_jacobian_i, const Eigen::Ref< const Eigen::MatrixXd > &ineq_jacobian_i, Eigen::Ref< Eigen::MatrixXd > obj_hessian_ij, Eigen::Ref< Eigen::MatrixXd > eq_hessian_ij, Eigen::Ref< Eigen::MatrixXd > ineq_hessian_ij, const double *multipliers_eq=nullptr, const double *multipliers_ineq=nullptr, double weight_obj=1.0)
 
virtual void computeHessiansInc (int vtx_idx_i, int vtx_idx_j, const Eigen::Ref< const Eigen::MatrixXd > &obj_jacobian_i, const Eigen::Ref< const Eigen::MatrixXd > &eq_jacobian_i, const Eigen::Ref< const Eigen::MatrixXd > &ineq_jacobian_i, Eigen::Ref< Eigen::MatrixXd > obj_hessian_ij, Eigen::Ref< Eigen::MatrixXd > eq_hessian_ij, Eigen::Ref< Eigen::MatrixXd > ineq_hessian_ij, const double *multipliers_eq=nullptr, const double *multipliers_ineq=nullptr, double weight_obj=1.0)
 
virtual void computeInequalityHessian (int vtx_idx_i, int vtx_idx_j, const Eigen::Ref< const Eigen::MatrixXd > &block_jacobian_i, Eigen::Ref< Eigen::MatrixXd > block_hessian_ij, const double *multipliers=nullptr, double weight=1.0)
 
virtual void computeInequalityHessianInc (int vtx_idx_i, int vtx_idx_j, const Eigen::Ref< const Eigen::MatrixXd > &block_jacobian_i, Eigen::Ref< Eigen::MatrixXd > block_hessian_ij, const double *multipliers=nullptr, double weight=1.0)
 
virtual void computeInequalityJacobian (int vtx_idx, Eigen::Ref< Eigen::MatrixXd > block_jacobian, const double *multipliers=nullptr)
 
virtual void computeJacobians (int vtx_idx, Eigen::Ref< Eigen::MatrixXd > obj_jacobian, Eigen::Ref< Eigen::MatrixXd > eq_jacobian, Eigen::Ref< Eigen::MatrixXd > ineq_jacobian, const double *obj_multipliers=nullptr, const double *eq_multipliers=nullptr, const double *ineq_multipliers=nullptr)
 
virtual void computeObjectiveHessian (int vtx_idx_i, int vtx_idx_j, const Eigen::Ref< const Eigen::MatrixXd > &block_jacobian_i, Eigen::Ref< Eigen::MatrixXd > block_hessian_ij, const double *multipliers=nullptr, double weight=1.0)
 
virtual void computeObjectiveHessianInc (int vtx_idx_i, int vtx_idx_j, const Eigen::Ref< const Eigen::MatrixXd > &block_jacobian_i, Eigen::Ref< Eigen::MatrixXd > block_hessian_ij, const double *multipliers=nullptr, double weight=1.0)
 
virtual void computeObjectiveJacobian (int vtx_idx, Eigen::Ref< Eigen::MatrixXd > block_jacobian, const double *multipliers=nullptr)
 
virtual double computeSquaredNormOfObjectiveValues ()
 
virtual double computeSumOfObjectiveValues ()
 
void computeValues (Eigen::Ref< Eigen::VectorXd > values) final
 Compute function values. More...
 
int getDimension () const override
 Get dimension of the edge (dimension of the cost-function/constraint value vector) More...
 
int getEdgeEqualityIdx () const
 
int getEdgeInequalityIdx () const
 
int getEdgeObjectiveIdx () const
 Retrieve current edge index (warning, this value is determined within the related HyperGraph) More...
 
void reserveCacheMemory (int num_value_vectors, int num_jacobians)
 
void reserveValuesCacheMemory (int num_obj_values, int num_eq_values, int num_ineq_values)
 
void reserveJacobiansCacheMemory (int num_obj_jacobians, int num_eq_jacobians, int num_ineq_jacobians)
 
void computeObjectiveValuesCached ()
 Call computeObjectiveValues() and store result to the internal cache. More...
 
void computeSquaredNormOfObjectiveValuesCached ()
 compute the specialied squared-norm method for computing the values (note only the first element in the values cache is used) More...
 
void computeEqualityValuesCached ()
 Call computeEqualityValues() and store result to the internal cache. More...
 
void computeInequalityValuesCached ()
 Call computeInequalityValues() and store result to the internal cache. More...
 
EdgeCachegetObjectiveCache ()
 
const EdgeCachegetObjectiveCache () const
 
EdgeCachegetEqualityCache ()
 
const EdgeCachegetEqualityCache () const
 
EdgeCachegetInequalityCache ()
 
const EdgeCachegetInequalityCache () const
 
- Public Member Functions inherited from corbo::EdgeInterface
virtual double computeSquaredNormOfValues ()
 
virtual double computeSumOfValues ()
 
int getNumFiniteVerticesLowerBounds () const
 
int getNumFiniteVerticesUpperBounds () const
 
virtual ~EdgeInterface ()
 Virtual destructor. More...
 

Protected Member Functions

void activateIntermediateStateCostAndConstraints ()
 
void configureIntegrand ()
 

Private Attributes

Eigen::VectorXd _current
 
int _current_idx = 0
 
int _dim_lb_x = 0
 
int _dim_ub_x = 0
 
ScalarVertex_dtvert = nullptr
 
int _dyn_dim = 0
 
SystemDynamicsInterface::Ptr _dynamics
 
bool _eval_intermediate_constr = false
 
int _int_ineq_dim = 0
 
int _int_obj_dim = 0
 
std::function< void(const Eigen::VectorXd &, Eigen::Ref< Eigen::VectorXd >)> _integrand
 
NumericalIntegratorExplicitInterface::Ptr _integrator
 
int _k = 0
 
Eigen::VectorXd _lb_ineq_values
 
int _n_interval = 0
 
int _nc_interval = 0
 
int _nonint_eq_dim = 0
 
Eigen::VectorXd _nonint_eq_values
 
int _nonint_ineq_dim = 0
 
Eigen::VectorXd _nonint_ineq_values
 
int _nonint_obj_dim = 0
 
Eigen::VectorXd _nonint_obj_values
 
int _nt_interval = 0
 
int _num_intermediate_states = 0
 
int _other_int_eq_dim = 0
 
const VectorVertex_shooting_node = nullptr
 
StageCost::ConstPtr _stage_cost
 
StageEqualityConstraint::ConstPtr _stage_eq
 
StageInequalityConstraint::ConstPtr _stage_ineq
 
int _total_dim_eq = 0
 
int _total_dim_ineq = 0
 
int _total_dim_obj = 0
 
Eigen::VectorXd _ub_ineq_values
 
VectorVertex_ukvert = nullptr
 
Eigen::VectorXd _values
 

Additional Inherited Members

- Protected Attributes inherited from corbo::MixedEdge<>
VertexContainer _vertices
 Vertex container. More...
 
- Protected Attributes inherited from corbo::BaseMixedEdge
int _edge_idx_eq = 0
 
int _edge_idx_ineq = 0
 
int _edge_idx_obj = 0
 
EdgeCache _equality_cache
 
EdgeCache _inequality_cache
 
EdgeCache _objective_cache
 

Detailed Description

Definition at line 477 of file multiple_shooting_edges.h.

Member Typedef Documentation

◆ Ptr

Definition at line 480 of file multiple_shooting_edges.h.

◆ UPtr

Definition at line 481 of file multiple_shooting_edges.h.

Constructor & Destructor Documentation

◆ MultipleShootingEdge()

corbo::MultipleShootingEdge::MultipleShootingEdge ( SystemDynamicsInterface::Ptr  dynamics,
StageCost::ConstPtr  stage_cost,
StageEqualityConstraint::ConstPtr  stage_eq,
StageInequalityConstraint::ConstPtr  stage_ineq,
int  k,
int  n_interval,
int  nc_interval,
int  nt_interval,
bool  eval_intermediate_constr 
)
inlineexplicit

Definition at line 483 of file multiple_shooting_edges.h.

Member Function Documentation

◆ activateIntermediateStateCostAndConstraints()

void corbo::MultipleShootingEdge::activateIntermediateStateCostAndConstraints ( )
inlineprotected

Definition at line 698 of file multiple_shooting_edges.h.

◆ computeEqualityValues()

void corbo::MultipleShootingEdge::computeEqualityValues ( Eigen::Ref< Eigen::VectorXd >  eq_values)
inlineoverridevirtual

Implements corbo::MixedEdge<>.

Definition at line 647 of file multiple_shooting_edges.h.

◆ computeInequalityValues()

void corbo::MultipleShootingEdge::computeInequalityValues ( Eigen::Ref< Eigen::VectorXd >  ineq_values)
inlineoverridevirtual

Implements corbo::MixedEdge<>.

Definition at line 665 of file multiple_shooting_edges.h.

◆ computeObjectiveValues()

void corbo::MultipleShootingEdge::computeObjectiveValues ( Eigen::Ref< Eigen::VectorXd >  obj_values)
inlineoverridevirtual

Implements corbo::MixedEdge<>.

Definition at line 632 of file multiple_shooting_edges.h.

◆ configureIntegrand()

void corbo::MultipleShootingEdge::configureIntegrand ( )
inlineprotected

Definition at line 732 of file multiple_shooting_edges.h.

◆ finalize()

void corbo::MultipleShootingEdge::finalize ( )
inline

Definition at line 499 of file multiple_shooting_edges.h.

◆ getEqualityDimension()

int corbo::MultipleShootingEdge::getEqualityDimension ( ) const
inlineoverridevirtual

Implements corbo::MixedEdge<>.

Definition at line 530 of file multiple_shooting_edges.h.

◆ getInequalityDimension()

int corbo::MultipleShootingEdge::getInequalityDimension ( ) const
inlineoverridevirtual

Implements corbo::MixedEdge<>.

Definition at line 532 of file multiple_shooting_edges.h.

◆ getObjectiveDimension()

int corbo::MultipleShootingEdge::getObjectiveDimension ( ) const
inlineoverridevirtual

Implements corbo::MixedEdge<>.

Definition at line 528 of file multiple_shooting_edges.h.

◆ isEqualityLinear()

bool corbo::MultipleShootingEdge::isEqualityLinear ( ) const
inlineoverridevirtual

Reimplemented from corbo::BaseMixedEdge.

Definition at line 536 of file multiple_shooting_edges.h.

◆ isInequalityLinear()

bool corbo::MultipleShootingEdge::isInequalityLinear ( ) const
inlineoverridevirtual

Reimplemented from corbo::BaseMixedEdge.

Definition at line 537 of file multiple_shooting_edges.h.

◆ isObjectiveLeastSquaresForm()

bool corbo::MultipleShootingEdge::isObjectiveLeastSquaresForm ( ) const
inlineoverridevirtual

Implements corbo::BaseMixedEdge.

Definition at line 542 of file multiple_shooting_edges.h.

◆ isObjectiveLinear()

bool corbo::MultipleShootingEdge::isObjectiveLinear ( ) const
inlineoverridevirtual

Return true if the edge is linear (and hence its Hessian is always zero)

Reimplemented from corbo::BaseMixedEdge.

Definition at line 535 of file multiple_shooting_edges.h.

◆ precompute()

void corbo::MultipleShootingEdge::precompute ( )
inlineoverridevirtual

Implements corbo::MixedEdge<>.

Definition at line 544 of file multiple_shooting_edges.h.

◆ setIntegrator()

void corbo::MultipleShootingEdge::setIntegrator ( NumericalIntegratorExplicitInterface::Ptr  integrator)
inline

Definition at line 695 of file multiple_shooting_edges.h.

Member Data Documentation

◆ _current

Eigen::VectorXd corbo::MultipleShootingEdge::_current
private

Definition at line 795 of file multiple_shooting_edges.h.

◆ _current_idx

int corbo::MultipleShootingEdge::_current_idx = 0
private

Definition at line 791 of file multiple_shooting_edges.h.

◆ _dim_lb_x

int corbo::MultipleShootingEdge::_dim_lb_x = 0
private

Definition at line 780 of file multiple_shooting_edges.h.

◆ _dim_ub_x

int corbo::MultipleShootingEdge::_dim_ub_x = 0
private

Definition at line 781 of file multiple_shooting_edges.h.

◆ _dtvert

ScalarVertex* corbo::MultipleShootingEdge::_dtvert = nullptr
private

Definition at line 768 of file multiple_shooting_edges.h.

◆ _dyn_dim

int corbo::MultipleShootingEdge::_dyn_dim = 0
private

Definition at line 770 of file multiple_shooting_edges.h.

◆ _dynamics

SystemDynamicsInterface::Ptr corbo::MultipleShootingEdge::_dynamics
private

Definition at line 810 of file multiple_shooting_edges.h.

◆ _eval_intermediate_constr

bool corbo::MultipleShootingEdge::_eval_intermediate_constr = false
private

Definition at line 793 of file multiple_shooting_edges.h.

◆ _int_ineq_dim

int corbo::MultipleShootingEdge::_int_ineq_dim = 0
private

Definition at line 774 of file multiple_shooting_edges.h.

◆ _int_obj_dim

int corbo::MultipleShootingEdge::_int_obj_dim = 0
private

Definition at line 772 of file multiple_shooting_edges.h.

◆ _integrand

std::function<void(const Eigen::VectorXd&, Eigen::Ref<Eigen::VectorXd>)> corbo::MultipleShootingEdge::_integrand
private

Definition at line 804 of file multiple_shooting_edges.h.

◆ _integrator

NumericalIntegratorExplicitInterface::Ptr corbo::MultipleShootingEdge::_integrator
private

Definition at line 811 of file multiple_shooting_edges.h.

◆ _k

int corbo::MultipleShootingEdge::_k = 0
private

Definition at line 813 of file multiple_shooting_edges.h.

◆ _lb_ineq_values

Eigen::VectorXd corbo::MultipleShootingEdge::_lb_ineq_values
private

Definition at line 801 of file multiple_shooting_edges.h.

◆ _n_interval

int corbo::MultipleShootingEdge::_n_interval = 0
private

Definition at line 787 of file multiple_shooting_edges.h.

◆ _nc_interval

int corbo::MultipleShootingEdge::_nc_interval = 0
private

Definition at line 788 of file multiple_shooting_edges.h.

◆ _nonint_eq_dim

int corbo::MultipleShootingEdge::_nonint_eq_dim = 0
private

Definition at line 777 of file multiple_shooting_edges.h.

◆ _nonint_eq_values

Eigen::VectorXd corbo::MultipleShootingEdge::_nonint_eq_values
private

Definition at line 800 of file multiple_shooting_edges.h.

◆ _nonint_ineq_dim

int corbo::MultipleShootingEdge::_nonint_ineq_dim = 0
private

Definition at line 778 of file multiple_shooting_edges.h.

◆ _nonint_ineq_values

Eigen::VectorXd corbo::MultipleShootingEdge::_nonint_ineq_values
private

Definition at line 799 of file multiple_shooting_edges.h.

◆ _nonint_obj_dim

int corbo::MultipleShootingEdge::_nonint_obj_dim = 0
private

Definition at line 776 of file multiple_shooting_edges.h.

◆ _nonint_obj_values

Eigen::VectorXd corbo::MultipleShootingEdge::_nonint_obj_values
private

Definition at line 798 of file multiple_shooting_edges.h.

◆ _nt_interval

int corbo::MultipleShootingEdge::_nt_interval = 0
private

Definition at line 789 of file multiple_shooting_edges.h.

◆ _num_intermediate_states

int corbo::MultipleShootingEdge::_num_intermediate_states = 0
private

Definition at line 790 of file multiple_shooting_edges.h.

◆ _other_int_eq_dim

int corbo::MultipleShootingEdge::_other_int_eq_dim = 0
private

Definition at line 773 of file multiple_shooting_edges.h.

◆ _shooting_node

const VectorVertex* corbo::MultipleShootingEdge::_shooting_node = nullptr
private

Definition at line 766 of file multiple_shooting_edges.h.

◆ _stage_cost

StageCost::ConstPtr corbo::MultipleShootingEdge::_stage_cost
private

Definition at line 806 of file multiple_shooting_edges.h.

◆ _stage_eq

StageEqualityConstraint::ConstPtr corbo::MultipleShootingEdge::_stage_eq
private

Definition at line 807 of file multiple_shooting_edges.h.

◆ _stage_ineq

StageInequalityConstraint::ConstPtr corbo::MultipleShootingEdge::_stage_ineq
private

Definition at line 808 of file multiple_shooting_edges.h.

◆ _total_dim_eq

int corbo::MultipleShootingEdge::_total_dim_eq = 0
private

Definition at line 784 of file multiple_shooting_edges.h.

◆ _total_dim_ineq

int corbo::MultipleShootingEdge::_total_dim_ineq = 0
private

Definition at line 785 of file multiple_shooting_edges.h.

◆ _total_dim_obj

int corbo::MultipleShootingEdge::_total_dim_obj = 0
private

Definition at line 783 of file multiple_shooting_edges.h.

◆ _ub_ineq_values

Eigen::VectorXd corbo::MultipleShootingEdge::_ub_ineq_values
private

Definition at line 802 of file multiple_shooting_edges.h.

◆ _ukvert

VectorVertex* corbo::MultipleShootingEdge::_ukvert = nullptr
private

Definition at line 767 of file multiple_shooting_edges.h.

◆ _values

Eigen::VectorXd corbo::MultipleShootingEdge::_values
private

Definition at line 796 of file multiple_shooting_edges.h.


The documentation for this class was generated from the following file:


control_box_rst
Author(s): Christoph Rösmann
autogenerated on Mon Feb 28 2022 22:08:03