Public Member Functions | Private Member Functions | Private Attributes | List of all members
towr::NodeCost Class Reference

Assigns a cost to node values. More...

#include <node_cost.h>

Inheritance diagram for towr::NodeCost:
Inheritance graph
[legend]

Public Member Functions

double GetCost () const override
 
void InitVariableDependedQuantities (const VariablesPtr &x) override
 
 NodeCost (const std::string &nodes_id, Dx deriv, int dim, double weight)
 Constructs a cost term for the optimization problem. More...
 
virtual ~NodeCost ()=default
 
- Public Member Functions inherited from ifopt::CostTerm
 CostTerm (const std::string &name)
 
VecBound GetBounds () const final
 
VectorXd GetValues () const final
 
void Print (double tol, int &index) const final
 
virtual ~CostTerm ()=default
 
- Public Member Functions inherited from ifopt::ConstraintSet
 ConstraintSet (int n_constraints, const std::string &name)
 
Jacobian GetJacobian () const final
 
void LinkWithVariables (const VariablesPtr &x)
 
virtual ~ConstraintSet ()=default
 
- Public Member Functions inherited from ifopt::Component
 Component (int num_rows, const std::string &name)
 
std::string GetName () const
 
int GetRows () const
 
void SetRows (int num_rows)
 
virtual ~Component ()=default
 

Private Member Functions

void FillJacobianBlock (std::string var_set, Jacobian &) const override
 

Private Attributes

Dx deriv_
 
int dim_
 
std::string node_id_
 
std::shared_ptr< NodesVariablesnodes_
 
double weight_
 

Additional Inherited Members

- Public Types inherited from ifopt::ConstraintSet
typedef std::shared_ptr< ConstraintSetPtr
 
typedef Composite::Ptr VariablesPtr
 
- Public Types inherited from ifopt::Component
typedef Eigen::SparseMatrix< double, Eigen::RowMajor > Jacobian
 
typedef std::shared_ptr< ComponentPtr
 
typedef std::vector< BoundsVecBound
 
typedef Eigen::VectorXd VectorXd
 
- Static Public Attributes inherited from ifopt::Component
static const int kSpecifyLater
 
- Protected Member Functions inherited from ifopt::ConstraintSet
const VariablesPtr GetVariables () const
 

Detailed Description

Assigns a cost to node values.

Definition at line 48 of file node_cost.h.

Constructor & Destructor Documentation

◆ NodeCost()

towr::NodeCost::NodeCost ( const std::string &  nodes_id,
Dx  deriv,
int  dim,
double  weight 
)

Constructs a cost term for the optimization problem.

Parameters
nodes_idThe name of the node variables.
derivThe node derivative (pos, vel) which should be penalized.
dimThe node dimension which should be penalized.

Definition at line 36 of file node_cost.cc.

◆ ~NodeCost()

virtual towr::NodeCost::~NodeCost ( )
virtualdefault

Member Function Documentation

◆ FillJacobianBlock()

void towr::NodeCost::FillJacobianBlock ( std::string  var_set,
Jacobian jac 
) const
overrideprivatevirtual

Implements ifopt::ConstraintSet.

Definition at line 66 of file node_cost.cc.

◆ GetCost()

double towr::NodeCost::GetCost ( ) const
overridevirtual

Implements ifopt::CostTerm.

Definition at line 54 of file node_cost.cc.

◆ InitVariableDependedQuantities()

void towr::NodeCost::InitVariableDependedQuantities ( const VariablesPtr x)
override

Definition at line 48 of file node_cost.cc.

Member Data Documentation

◆ deriv_

Dx towr::NodeCost::deriv_
private

Definition at line 67 of file node_cost.h.

◆ dim_

int towr::NodeCost::dim_
private

Definition at line 68 of file node_cost.h.

◆ node_id_

std::string towr::NodeCost::node_id_
private

Definition at line 66 of file node_cost.h.

◆ nodes_

std::shared_ptr<NodesVariables> towr::NodeCost::nodes_
private

Definition at line 64 of file node_cost.h.

◆ weight_

double towr::NodeCost::weight_
private

Definition at line 69 of file node_cost.h.


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


towr
Author(s): Alexander W. Winkler
autogenerated on Mon Feb 28 2022 23:54:22