Public Member Functions | List of all members
ifopt::ExComponent Class Reference
Inheritance diagram for ifopt::ExComponent:
Inheritance graph
[legend]

Public Member Functions

 ExComponent (int n_var, const std::string &name)
 
virtual VecBound GetBounds () const
 Returns the "bounds" of this component. More...
 
virtual Jacobian GetJacobian () const
 Returns derivatives of each row w.r.t. the variables. More...
 
virtual VectorXd GetValues () const
 Returns the "values" of whatever this component represents. More...
 
virtual void SetVariables (const VectorXd &x)
 Sets the optimization variables from an Eigen vector. More...
 
- Public Member Functions inherited from ifopt::Component
 Component (int num_rows, const std::string &name)
 Creates a 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 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 ~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

Definition at line 63 of file composite_test.cc.

Constructor & Destructor Documentation

◆ ExComponent()

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

Definition at line 92 of file composite_test.cc.

Member Function Documentation

◆ GetBounds()

virtual VecBound ifopt::ExComponent::GetBounds ( ) const
inlinevirtual

Returns the "bounds" of this component.

  • For Variable these are the upper and lower variable bound.
  • For Constraint this represents the constraint bounds.
  • For Cost these done't exists (set to infinity).

Implements ifopt::Component.

Definition at line 95 of file composite_test.cc.

◆ GetJacobian()

virtual Jacobian ifopt::ExComponent::GetJacobian ( ) const
inlinevirtual

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 96 of file composite_test.cc.

◆ GetValues()

virtual VectorXd ifopt::ExComponent::GetValues ( ) const
inlinevirtual

Returns the "values" of whatever this component represents.

  • For Variable this represents the actual optimization values.
  • For Constraint this represents the constraint value g.
  • For Cost this represents the cost value.

Implements ifopt::Component.

Definition at line 94 of file composite_test.cc.

◆ SetVariables()

virtual void ifopt::ExComponent::SetVariables ( const VectorXd x)
inlinevirtual

Sets the optimization variables from an Eigen vector.

This is only done for Variable, where these are set from the current values of the solvers.

Implements ifopt::Component.

Definition at line 97 of file composite_test.cc.


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


ifopt
Author(s): Alexander W. Winkler
autogenerated on Thu Sep 15 2022 02:14:55