Public Member Functions | List of all members
ifopt::VariableSet Class Reference

A container holding a set of related optimization variables. More...

#include <variable_set.h>

Inheritance diagram for ifopt::VariableSet:
Inheritance graph
[legend]

Public Member Functions

Jacobian GetJacobian () const final
 Returns derivatives of each row w.r.t. the variables. More...
 
 VariableSet (int n_var, const std::string &name)
 Creates a set of variables representing a single concept. More...
 
virtual ~VariableSet ()=default
 
- Public Member Functions inherited from ifopt::Component
 Component (int num_rows, const std::string &name)
 Creates a component. More...
 
virtual VecBound GetBounds () const =0
 Returns the "bounds" of this component. More...
 
std::string GetName () const
 Returns the name (id) of this component. More...
 
int GetRows () const
 Returns the number of rows of this component. More...
 
virtual VectorXd GetValues () const =0
 Returns the "values" of whatever this component represents. More...
 
virtual void Print (double tolerance, int &index_start) const
 Prints the relevant information (name, rows, values) of this component. More...
 
void SetRows (int num_rows)
 Sets the number of rows of this component. More...
 
virtual void SetVariables (const VectorXd &x)=0
 Sets the optimization variables from an Eigen vector. More...
 
virtual ~Component ()=default
 

Additional Inherited Members

- Public Types inherited from ifopt::Component
using Jacobian = Eigen::SparseMatrix< double, Eigen::RowMajor >
 
using Ptr = std::shared_ptr< Component >
 
using VecBound = std::vector< Bounds >
 
using VectorXd = Eigen::VectorXd
 
- Static Public Attributes inherited from ifopt::Component
static const int kSpecifyLater = -1
 

Detailed Description

A container holding a set of related optimization variables.

This is a single set of variables representing a single concept, e.g "spline coefficients" or "step durations".

See also
Component

Definition at line 46 of file variable_set.h.

Constructor & Destructor Documentation

ifopt::VariableSet::VariableSet ( int  n_var,
const std::string &  name 
)

Creates a set of variables representing a single concept.

Parameters
n_varNumber of variables.
nameWhat the variables represent to (e.g. "spline coefficients").

Definition at line 40 of file leaves.cc.

virtual ifopt::VariableSet::~VariableSet ( )
virtualdefault

Member Function Documentation

Jacobian ifopt::VariableSet::GetJacobian ( ) const
inlinefinalvirtual

Returns derivatives of each row w.r.t. the variables.

  • For Constraint this is a matrix with one row per constraint.
  • For a Cost this is a row vector (gradient transpose).
  • Not sensible for Variable.

Implements ifopt::Component.

Definition at line 57 of file variable_set.h.


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


ifopt
Author(s): Alexander W. Winkler
autogenerated on Fri Jan 22 2021 03:47:32