Drake
DecisionVariable Class Reference

DecisionVariable. More...

#include <drake/solvers/Optimization.h>

Public Types

enum  VarType { CONTINUOUS, INTEGER, BINARY }
 

Public Member Functions

 DecisionVariable (VarType type, const std::string &name, size_t num_vars, size_t start_index)
 
size_t index () const
 index() More...
 
size_t size () const
 size() More...
 
const std::string & name () const
 name() More...
 
const Eigen::VectorXd & value () const
 value() More...
 
void set_value (const Eigen::VectorXd &new_data)
 

Detailed Description

DecisionVariable.

Provides storage for a decision variable inside an OptimizationProblem.

Member Enumeration Documentation

enum VarType
strong
Enumerator
CONTINUOUS 
INTEGER 
BINARY 

Constructor & Destructor Documentation

DecisionVariable ( VarType  type,
const std::string &  name,
size_t  num_vars,
size_t  start_index 
)
inline

Member Function Documentation

size_t index ( ) const
inline

index()

returns the first index of this variable in the entire variable vector for the program

Here is the caller graph for this function:

const std::string& name ( ) const
inline

name()

Returns
the name of the DecisionVariable

Here is the caller graph for this function:

void set_value ( const Eigen::VectorXd &  new_data)
inline
size_t size ( ) const
inline

size()

returns the number of elements in the decision variable vector

const Eigen::VectorXd& value ( ) const
inline

value()

returns the actual stored value; which is only meaningful after calling solve() in the program.

Here is the caller graph for this function:


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