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

#include <collocation_edges.h>

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

Public Types

using Ptr = std::shared_ptr< QuadratureCollocationEdge >
 
using UPtr = std::unique_ptr< QuadratureCollocationEdge >
 
- 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...
 
void precompute () override
 
 QuadratureCollocationEdge (SystemDynamicsInterface::Ptr dynamics, QuadratureCollocationInterface::Ptr quadrature, StageCost::Ptr stage_cost, StageEqualityConstraint::Ptr stage_eq, StageInequalityConstraint::Ptr stage_ineq, bool eval_intermediate_constr, int k)
 
virtual ~QuadratureCollocationEdge ()=default
 
- 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 configureIntegrand ()
 

Private Attributes

QuadratureCollocationInterface::Ptr _collocation
 
int _dim_dyn = 0
 
int _dim_eq = 0
 
int _dim_ineq = 0
 
int _dim_int_eq = 0
 
int _dim_int_ineq = 0
 
int _dim_lb_x = 0
 
int _dim_nonint_eq = 0
 
int _dim_nonint_ineq = 0
 
int _dim_obj = 1
 
int _dim_ub_x = 0
 
const ScalarVertex_dt = nullptr
 
SystemDynamicsInterface::Ptr _dynamics
 
bool _eval_intermediate_constr = false
 
std::function< void(const Eigen::VectorXd &, const Eigen::VectorXd &, Eigen::Ref< Eigen::VectorXd >)> _integrand
 
int _k = 0
 
int _num_intermediate_u
 
int _num_intermediate_x
 
Eigen::VectorXd _quadrature_values
 
StageCost::Ptr _stage_cost
 
StageEqualityConstraint::Ptr _stage_eq
 
StageInequalityConstraint::Ptr _stage_ineq
 
std::vector< const Eigen::VectorXd * > _u1_points
 
const Eigen::VectorXd * _u2 = nullptr
 
const VectorVertex_x1 = nullptr
 
std::vector< const Eigen::VectorXd * > _x1_points
 
const Eigen::VectorXd * _x2 = nullptr
 

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 133 of file collocation_edges.h.

Member Typedef Documentation

◆ Ptr

Definition at line 136 of file collocation_edges.h.

◆ UPtr

Definition at line 137 of file collocation_edges.h.

Constructor & Destructor Documentation

◆ QuadratureCollocationEdge()

corbo::QuadratureCollocationEdge::QuadratureCollocationEdge ( SystemDynamicsInterface::Ptr  dynamics,
QuadratureCollocationInterface::Ptr  quadrature,
StageCost::Ptr  stage_cost,
StageEqualityConstraint::Ptr  stage_eq,
StageInequalityConstraint::Ptr  stage_ineq,
bool  eval_intermediate_constr,
int  k 
)
inlineexplicit

Definition at line 139 of file collocation_edges.h.

◆ ~QuadratureCollocationEdge()

virtual corbo::QuadratureCollocationEdge::~QuadratureCollocationEdge ( )
virtualdefault

Member Function Documentation

◆ computeEqualityValues()

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

Implements corbo::MixedEdge<>.

Definition at line 228 of file collocation_edges.h.

◆ computeInequalityValues()

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

Implements corbo::MixedEdge<>.

Definition at line 249 of file collocation_edges.h.

◆ computeObjectiveValues()

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

Implements corbo::MixedEdge<>.

Definition at line 226 of file collocation_edges.h.

◆ configureIntegrand()

void corbo::QuadratureCollocationEdge::configureIntegrand ( )
inlineprotected

Definition at line 321 of file collocation_edges.h.

◆ finalize()

void corbo::QuadratureCollocationEdge::finalize ( )
inline

Definition at line 156 of file collocation_edges.h.

◆ getEqualityDimension()

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

Implements corbo::MixedEdge<>.

Definition at line 199 of file collocation_edges.h.

◆ getInequalityDimension()

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

Implements corbo::MixedEdge<>.

Definition at line 200 of file collocation_edges.h.

◆ getObjectiveDimension()

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

Implements corbo::MixedEdge<>.

Definition at line 197 of file collocation_edges.h.

◆ isEqualityLinear()

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

Reimplemented from corbo::BaseMixedEdge.

Definition at line 204 of file collocation_edges.h.

◆ isInequalityLinear()

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

Reimplemented from corbo::BaseMixedEdge.

Definition at line 205 of file collocation_edges.h.

◆ isObjectiveLeastSquaresForm()

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

Implements corbo::BaseMixedEdge.

Definition at line 209 of file collocation_edges.h.

◆ isObjectiveLinear()

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

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

Reimplemented from corbo::BaseMixedEdge.

Definition at line 203 of file collocation_edges.h.

◆ precompute()

void corbo::QuadratureCollocationEdge::precompute ( )
inlineoverridevirtual

Implements corbo::MixedEdge<>.

Definition at line 211 of file collocation_edges.h.

Member Data Documentation

◆ _collocation

QuadratureCollocationInterface::Ptr corbo::QuadratureCollocationEdge::_collocation
private

Definition at line 352 of file collocation_edges.h.

◆ _dim_dyn

int corbo::QuadratureCollocationEdge::_dim_dyn = 0
private

Definition at line 363 of file collocation_edges.h.

◆ _dim_eq

int corbo::QuadratureCollocationEdge::_dim_eq = 0
private

Definition at line 359 of file collocation_edges.h.

◆ _dim_ineq

int corbo::QuadratureCollocationEdge::_dim_ineq = 0
private

Definition at line 361 of file collocation_edges.h.

◆ _dim_int_eq

int corbo::QuadratureCollocationEdge::_dim_int_eq = 0
private

Definition at line 360 of file collocation_edges.h.

◆ _dim_int_ineq

int corbo::QuadratureCollocationEdge::_dim_int_ineq = 0
private

Definition at line 362 of file collocation_edges.h.

◆ _dim_lb_x

int corbo::QuadratureCollocationEdge::_dim_lb_x = 0
private

Definition at line 368 of file collocation_edges.h.

◆ _dim_nonint_eq

int corbo::QuadratureCollocationEdge::_dim_nonint_eq = 0
private

Definition at line 365 of file collocation_edges.h.

◆ _dim_nonint_ineq

int corbo::QuadratureCollocationEdge::_dim_nonint_ineq = 0
private

Definition at line 366 of file collocation_edges.h.

◆ _dim_obj

int corbo::QuadratureCollocationEdge::_dim_obj = 1
private

Definition at line 358 of file collocation_edges.h.

◆ _dim_ub_x

int corbo::QuadratureCollocationEdge::_dim_ub_x = 0
private

Definition at line 369 of file collocation_edges.h.

◆ _dt

const ScalarVertex* corbo::QuadratureCollocationEdge::_dt = nullptr
private

Definition at line 388 of file collocation_edges.h.

◆ _dynamics

SystemDynamicsInterface::Ptr corbo::QuadratureCollocationEdge::_dynamics
private

Definition at line 351 of file collocation_edges.h.

◆ _eval_intermediate_constr

bool corbo::QuadratureCollocationEdge::_eval_intermediate_constr = false
private

Definition at line 373 of file collocation_edges.h.

◆ _integrand

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

Definition at line 380 of file collocation_edges.h.

◆ _k

int corbo::QuadratureCollocationEdge::_k = 0
private

Definition at line 371 of file collocation_edges.h.

◆ _num_intermediate_u

int corbo::QuadratureCollocationEdge::_num_intermediate_u
private

Definition at line 376 of file collocation_edges.h.

◆ _num_intermediate_x

int corbo::QuadratureCollocationEdge::_num_intermediate_x
private

Definition at line 375 of file collocation_edges.h.

◆ _quadrature_values

Eigen::VectorXd corbo::QuadratureCollocationEdge::_quadrature_values
private

Definition at line 378 of file collocation_edges.h.

◆ _stage_cost

StageCost::Ptr corbo::QuadratureCollocationEdge::_stage_cost
private

Definition at line 354 of file collocation_edges.h.

◆ _stage_eq

StageEqualityConstraint::Ptr corbo::QuadratureCollocationEdge::_stage_eq
private

Definition at line 355 of file collocation_edges.h.

◆ _stage_ineq

StageInequalityConstraint::Ptr corbo::QuadratureCollocationEdge::_stage_ineq
private

Definition at line 356 of file collocation_edges.h.

◆ _u1_points

std::vector<const Eigen::VectorXd*> corbo::QuadratureCollocationEdge::_u1_points
private

Definition at line 384 of file collocation_edges.h.

◆ _u2

const Eigen::VectorXd* corbo::QuadratureCollocationEdge::_u2 = nullptr
private

Definition at line 386 of file collocation_edges.h.

◆ _x1

const VectorVertex* corbo::QuadratureCollocationEdge::_x1 = nullptr
private

Definition at line 382 of file collocation_edges.h.

◆ _x1_points

std::vector<const Eigen::VectorXd*> corbo::QuadratureCollocationEdge::_x1_points
private

Definition at line 383 of file collocation_edges.h.

◆ _x2

const Eigen::VectorXd* corbo::QuadratureCollocationEdge::_x2 = nullptr
private

Definition at line 385 of file collocation_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