Public Member Functions | List of all members
towr::NodesVariablesAll Class Reference

Node variables used to construct the base motion spline. More...

#include <nodes_variables_all.h>

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

Public Member Functions

std::vector< NodeValueInfoGetNodeValuesInfo (int idx) const override
 Node values affected by one specific optimization variable. More...
 
 NodesVariablesAll (int n_nodes, int n_dim, std::string variable_id)
 
virtual ~NodesVariablesAll ()=default
 
- Public Member Functions inherited from towr::NodesVariables
void AddFinalBound (Dx deriv, const std::vector< int > &dimensions, const VectorXd &val)
 Restricts the last node in the spline. More...
 
void AddObserver (ObserverPtr const spline)
 Adds a dependent observer that gets notified when the nodes change. More...
 
void AddStartBound (Dx deriv, const std::vector< int > &dimensions, const VectorXd &val)
 Restricts the first node in the spline. More...
 
const std::vector< NodeGetBoundaryNodes (int poly_id) const
 
VecBound GetBounds () const override
 
int GetDim () const
 
const std::vector< NodeGetNodes () const
 
int GetOptIndex (const NodeValueInfo &nvi) const
 Index in the optimization vector for a specific nodes' pos/vel. More...
 
int GetPolynomialCount () const
 
VectorXd GetValues () const override
 Pure optimization variables that define the nodes. More...
 
void SetByLinearInterpolation (const VectorXd &initial_val, const VectorXd &final_val, double t_total)
 Sets nodes pos/vel equally spaced from initial to final position. More...
 
void SetVariables (const VectorXd &x) override
 Sets some node positions and velocity from the optimization variables. More...
 
- Public Member Functions inherited from ifopt::VariableSet
Jacobian GetJacobian () const final
 
 VariableSet (int n_var, const std::string &name)
 
virtual ~VariableSet ()=default
 
- Public Member Functions inherited from ifopt::Component
 Component (int num_rows, const std::string &name)
 
std::string GetName () const
 
int GetRows () const
 
virtual void Print (double tolerance, int &index_start) const
 
void SetRows (int num_rows)
 
virtual ~Component ()=default
 

Additional Inherited Members

- Public Types inherited from towr::NodesVariables
using ObserverPtr = NodesObserver *
 
using Ptr = std::shared_ptr< NodesVariables >
 
enum  Side { Start =0, End }
 
using VecDurations = std::vector< double >
 
- 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 Member Functions inherited from towr::NodesVariables
static int GetNodeId (int poly_id, Side side)
 The node ID that belongs to a specific side of a specific polynomial. More...
 
- Static Public Attributes inherited from towr::NodesVariables
static const int NodeValueNotOptimized = -1
 
- Static Public Attributes inherited from ifopt::Component
static const int kSpecifyLater
 
- Protected Member Functions inherited from towr::NodesVariables
 NodesVariables (const std::string &variable_name)
 
virtual ~NodesVariables ()=default
 
- Protected Attributes inherited from towr::NodesVariables
VecBound bounds_
 the bounds on the node values. More...
 
int n_dim_
 
std::vector< Nodenodes_
 

Detailed Description

Node variables used to construct the base motion spline.

Every node is optimized over, in contrast to PhaseNodes, where multiple nodes in the spline are represented by the same optimization variables.

Definition at line 45 of file nodes_variables_all.h.

Constructor & Destructor Documentation

towr::NodesVariablesAll::NodesVariablesAll ( int  n_nodes,
int  n_dim,
std::string  variable_id 
)
Parameters
n_nodesNumber of nodes to construct the spline.
n_dimNumber of dimensions of each node.
variable_idName of this variables set in the optimization.

Definition at line 34 of file nodes_variables_all.cc.

virtual towr::NodesVariablesAll::~NodesVariablesAll ( )
virtualdefault

Member Function Documentation

std::vector< NodesVariablesAll::NodeValueInfo > towr::NodesVariablesAll::GetNodeValuesInfo ( int  opt_idx) const
overridevirtual

Node values affected by one specific optimization variable.

Parameters
opt_idxThe index (=row) of the optimization variable.
Returns
All node values affected by this optimization variable.

This function determines which node values are optimized over, and which nodes values are set by the same optimization variable.

Reverse of GetOptIndex().

Implements towr::NodesVariables.

Definition at line 46 of file nodes_variables_all.cc.


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


towr
Author(s): Alexander W. Winkler
autogenerated on Fri Apr 2 2021 02:14:16