ACADO Toolkit  1.2.0beta
Toolkit for Automatic Control and Dynamic Optimization
Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends

Implements an integer-valued parameter. More...

#include <integer_parameter.hpp>

Inheritance diagram for IntegerParameter:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 IntegerParameter ()
 Default constructor.
 IntegerParameter (uint nRows_, uint nCols_=1, String name_="")
 Default constructor.
 IntegerParameter (const IntegerParameter &arg)
 Copy constructor (deep copy).
virtual ~IntegerParameter ()
 Default destructor.
IntegerParameteroperator= (const IntegerParameter &arg)
 Assignment Operator (deep copy).
virtual Expressionclone () const
 Provides a deep copy of the expression.
returnValue clearStaticCounters ()
 This function clears all static counters.
Expressionoperator<< (const double &arg)
Expressionoperator<< (const Vector &arg)
Expressionoperator<< (const Matrix &arg)
Expressionoperator<< (const Expression &arg)
ExpressionappendRows (const Expression &arg)
 Appends an Expression matrix (n x m) with an argument matrix (s x m) in the row direction, such that the result is ( (n + s) x m).
ExpressionappendCols (const Expression &arg)
 Appends an Expression matrix (n x m) with an argument matrix (n x s) in the column direction, such that the result is ( n x (m + s) ).
Expression operator() (uint idx) const
Expression operator() (uint rowIdx, uint colIdx) const
Operatoroperator() (uint idx)
Operatoroperator() (uint rowIdx, uint colIdx)
Expression operator+ (const double &arg) const
Expression operator+ (const Vector &arg) const
Expression operator+ (const Matrix &arg) const
Expression operator+ (const Expression &arg) const
Expression operator- (const double &arg) const
Expression operator- (const Vector &arg) const
Expression operator- (const Matrix &arg) const
Expression operator- (const Expression &arg) const
Expression operator- () const
Expression operator* (const double &arg) const
Expression operator* (const Vector &arg) const
Expression operator* (const Matrix &arg) const
Expression operator* (const Expression &arg) const
Expression operator/ (const double &arg) const
Expression operator/ (const Expression &arg) const
Stream print (Stream &stream) const
Expression getInverse () const
 Returns the symbolic inverse of a matrix (only for square matrices)
Expression getRow (const uint &rowIdx) const
Expression getCol (const uint &colIdx) const
Matrix getDependencyPattern (const Expression &arg) const
 When operated on an n x 1 Expression, returns an m x n Matrix.
Expression getSin () const
Expression getCos () const
Expression getTan () const
Expression getAsin () const
Expression getAcos () const
Expression getAtan () const
Expression getExp () const
Expression getSqrt () const
Expression getLn () const
Expression getPow (const Expression &arg) const
Expression getPowInt (const int &arg) const
Expression getSumSquare () const
Expression getLogSumExp () const
Expression getEuclideanNorm () const
Expression getEntropy () const
Expression getDot () const
Expression getNext () const
Expression ADforward (const Expression &arg) const
Expression ADforward (const VariableType &varType_, const int *arg, int nV) const
Expression ADforward (const Expression &arg, const Expression &seed) const
Expression ADforward (const VariableType &varType_, const int *arg, const Expression &seed) const
Expression ADforward (const VariableType *varType_, const int *arg, const Expression &seed) const
Expression ADbackward (const Expression &arg) const
Expression ADbackward (const Expression &arg, const Expression &seed) const
Expression getODEexpansion (const int &order, const int *arg) const
ConstraintComponent operator<= (const double &ub) const
ConstraintComponent operator<= (const Vector &ub) const
ConstraintComponent operator<= (const VariablesGrid &ub) const
ConstraintComponent operator>= (const double &lb) const
ConstraintComponent operator>= (const Vector &lb) const
ConstraintComponent operator>= (const VariablesGrid &lb) const
ConstraintComponent operator== (const double &b) const
ConstraintComponent operator== (const Vector &b) const
ConstraintComponent operator== (const VariablesGrid &b) const
Expression transpose () const
 Returns the transpose of this expression.
uint getDim () const
 Returns dimension of vector space.
uint getNumRows () const
 Returns the number of rows.
uint getNumCols () const
 Returns the number of columns.
uint getComponent (const unsigned int idx) const
 Returns the global type idea of the idx-component.
BooleanType isVariable () const
 Returns the number of columns.
OperatorgetOperatorClone (uint idx) const
 Returns a clone of the operator with index idx.
VariableType getVariableType () const
 Returns the variable type.
BooleanType isDependingOn (VariableType type) const
BooleanType isDependingOn (const Expression &e) const
returnValue substitute (int idx, const Expression &arg) const
 Substitutes a given variable with an expression.
Expression convert (const double &arg) const
Expression convert (const Vector &arg) const
Expression convert (const Matrix &arg) const
TreeProjection getTreeProjection (const uint &idx, String name_="") const
 Returns a tree projection with respect to the specified index.

Protected Member Functions

void construct (VariableType variableType_, uint globalTypeID_, uint nRows_, uint nCols_, const String &name_)
 Generic constructor (protected, only for internal use).
void copy (const Expression &rhs)
 Generic copy routine (protected, only for internal use).
void deleteAll ()
 Generic destructor (protected, only for internal use).
ExpressionassignmentSetup (const Expression &arg)
 Generic copy routine (protected, only for internal use).
Operatorproduct (const Operator *a, const Operator *b) const
 Internal product routine (protected, only for internal use).

Protected Attributes

Operator ** element
 Element of vector space.
uint dim
 Vector space dimension.
uint nRows
uint nCols
 Matrix dimension.
VariableType variableType
 Variable type.
uint component
 The expression component.
String name
 The name of the expression.

Static Protected Attributes

static int count = 0

Friends

Stream operator<< (Stream &stream, const Expression &arg)
Expression operator+ (const double &arg1, const Expression &arg2)
Expression operator+ (const Vector &arg1, const Expression &arg2)
Expression operator+ (const Matrix &arg1, const Expression &arg2)
Expression operator- (const double &arg1, const Expression &arg2)
Expression operator- (const Vector &arg1, const Expression &arg2)
Expression operator- (const Matrix &arg1, const Expression &arg2)
Expression operator* (const double &arg1, const Expression &arg2)
Expression operator* (const Vector &arg1, const Expression &arg2)
Expression operator* (const Matrix &arg1, const Expression &arg2)
Expression operator/ (const double &arg1, const Expression &arg2)
Expression operator/ (const Vector &arg1, const Expression &arg2)
Expression operator/ (const Matrix &arg1, const Expression &arg2)
ConstraintComponent operator<= (double lb, const Expression &arg)
ConstraintComponent operator<= (Vector lb, const Expression &arg)
ConstraintComponent operator<= (VariablesGrid lb, const Expression &arg)
ConstraintComponent operator>= (double ub, const Expression &arg)
ConstraintComponent operator>= (Vector ub, const Expression &arg)
ConstraintComponent operator>= (VariablesGrid ub, const Expression &arg)
ConstraintComponent operator== (double b, const Expression &arg)
ConstraintComponent operator== (Vector b, const Expression &arg)
ConstraintComponent operator== (VariablesGrid b, const Expression &arg)

Detailed Description

The class IntegerParameter implements an integer-valued parameter within the family of Expressions.

Author:
Boris Houska, Hans Joachim Ferreau

Constructor & Destructor Documentation

References count.

Referenced by clone().

IntegerParameter::IntegerParameter ( uint  nRows_,
uint  nCols_ = 1,
String  name_ = "" 
)

References count.


Member Function Documentation

Expression Expression::ADbackward ( const Expression arg) const [inherited]
Expression Expression::ADbackward ( const Expression arg,
const Expression seed 
) const [inherited]
Expression Expression::ADforward ( const Expression arg) const [inherited]
Expression Expression::ADforward ( const VariableType varType_,
const int *  arg,
int  nV 
) const [inherited]
Expression Expression::ADforward ( const Expression arg,
const Expression seed 
) const [inherited]
Expression Expression::ADforward ( const VariableType varType_,
const int *  arg,
const Expression seed 
) const [inherited]
Expression Expression::ADforward ( const VariableType varType_,
const int *  arg,
const Expression seed 
) const [inherited]
Expression & Expression::appendCols ( const Expression arg) [inherited]

As a special case, when applied on an empty Expression, the Expression will be assigned the argument.

References ASSERT, Expression::getDim(), Expression::getNumRows(), Expression::operator=(), and Expression::transpose().

Expression & Expression::appendRows ( const Expression arg) [inherited]
Expression & Expression::assignmentSetup ( const Expression arg) [protected, inherited]

Although this
function is public it should never be used in C-code.
It is necessary for some Matlab-specific interfaces.
Please have a look into the header file
include/global/utils/matlab_acado_utils.hpp
for more details.

References count, and SUCCESSFUL_RETURN.

Referenced by clearAllStaticCounters().

Expression * IntegerParameter::clone ( ) const [virtual]


Returns:
a clone of the expression.

References IntegerParameter().

void Expression::construct ( VariableType  variableType_,
uint  globalTypeID_,
uint  nRows_,
uint  nCols_,
const String name_ 
) [protected, inherited]
Parameters:
variableType_The variable type.
globalTypeID_the global type ID
nRows_The number of rows.
nCols_The number of columns.
name_The name

References Expression::component, Expression::dim, Expression::element, Expression::name, Expression::nCols, NE_ZERO, Expression::nRows, uint, Expression::variableType, VT_INTERMEDIATE_STATE, and VT_UNKNOWN.

Referenced by Expression::Expression().

Expression Expression::convert ( const double &  arg) const [inherited]
Expression Expression::convert ( const Vector arg) const [inherited]
Expression Expression::convert ( const Matrix arg) const [inherited]
void Expression::copy ( const Expression rhs) [protected, inherited]
void Expression::deleteAll ( ) [protected, inherited]
Expression Expression::getAcos ( ) const [inherited]
Expression Expression::getAsin ( ) const [inherited]
Expression Expression::getAtan ( ) const [inherited]
Expression Expression::getCol ( const uint colIdx) const [inherited]
unsigned int Expression::getComponent ( const unsigned int  idx) const [inline, inherited]
Expression Expression::getCos ( ) const [inherited]
Matrix Expression::getDependencyPattern ( const Expression arg) const [inherited]

The element (i,j) of this matrix is zero when this(i) does not depend on arg(j)

Parameters:
argm x 1 Expression

References backwardDerivative(), Function::evaluate(), Function::getDim(), Expression::getDim(), and Function::getNumberOfVariables().

Referenced by Expression::isDependingOn().

BEGIN_NAMESPACE_ACADO unsigned int Expression::getDim ( ) const [inline, inherited]
Returns:
Dimension of vector space.

References Expression::dim.

Referenced by COperator::AD_forward(), COperator::AD_forward2(), Expression::ADbackward(), ModelData::addOutput(), PlotWindow::addSubplot(), Expression::ADforward(), Expression::appendCols(), Expression::appendRows(), Frame::chain(), COperator::COperator(), COperator::copy(), DifferentialEquation::DifferentialEquation(), COperator::enumerateVariables(), COperator::evaluate(), KinVec::explicitize(), Expression::getComponent(), Expression::getDependencyPattern(), ConstraintComponent::getDim(), Expression::getEuclideanNorm(), Expression::getLogSumExp(), Expression::getOperatorClone(), Expression::getPow(), getRiccatiODE(), Expression::getSumSquare(), COperator::isDependingOn(), FunctionEvaluationTree::isDependingOn(), Expression::isDependingOn(), Lyapunov::isEmpty(), FunctionEvaluationTree::isLinearIn(), FunctionEvaluationTree::isPolynomialIn(), FunctionEvaluationTree::isRationalIn(), COperator::loadIndices(), CFunction::operator()(), Expression::operator()(), Expression::operator*(), KinVec::operator+(), Expression::operator/(), Transition::operator<<(), DifferentialEquation::operator<<(), Expression::operator<=(), TreeProjection::operator=(), Expression::operator==(), Expression::operator>=(), ImplicitRungeKuttaExport::setDifferentialEquation(), DiscreteTimeExport::setDifferentialEquation(), ConstraintComponent::setLB(), IntegratorExport::setLinearOutput(), NARXExport::setLinearOutput(), ModelData::setModel(), ConstraintComponent::setUB(), and Expression::substitute().

Expression Expression::getDot ( ) const [inherited]
Expression Expression::getEntropy ( ) const [inherited]

References ACADOWARNING, and RET_NOT_IMPLEMENTED_YET.

Referenced by entropy().

Expression Expression::getExp ( ) const [inherited]
Expression Expression::getInverse ( ) const [inherited]
Expression Expression::getLn ( ) const [inherited]
Expression Expression::getLogSumExp ( ) const [inherited]
Expression Expression::getNext ( ) const [inherited]

References Expression::getDot().

Referenced by next().

unsigned int Expression::getNumCols ( ) const [inline, inherited]
unsigned int Expression::getNumRows ( ) const [inline, inherited]
Expression Expression::getODEexpansion ( const int &  order,
const int *  arg 
) const [inherited]
Operator * Expression::getOperatorClone ( uint  idx) const [inline, inherited]
Returns:
A clone of the requested operator.

References ASSERT, Operator::clone(), Expression::element, Expression::getDim(), and Operator::passArgument().

Referenced by TreeProjection::operator=().

Expression Expression::getPow ( const Expression arg) const [inherited]
Expression Expression::getPowInt ( const int &  arg) const [inherited]
Expression Expression::getRow ( const uint rowIdx) const [inherited]
Expression Expression::getSin ( ) const [inherited]
Expression Expression::getSqrt ( ) const [inherited]
Expression Expression::getSumSquare ( ) const [inherited]
Expression Expression::getTan ( ) const [inherited]
TreeProjection Expression::getTreeProjection ( const uint idx,
String  name_ = "" 
) const [inline, inherited]
VariableType Expression::getVariableType ( ) const [inline, inherited]
BooleanType Expression::isDependingOn ( VariableType  type) const [inherited]
BooleanType Expression::isDependingOn ( const Expression e) const [inherited]
BooleanType Expression::isVariable ( ) const [inline, inherited]
Expression Expression::operator() ( uint  idx) const [inherited]
Expression Expression::operator() ( uint  rowIdx,
uint  colIdx 
) const [inherited]
Operator & Expression::operator() ( uint  idx) [inherited]
Operator & Expression::operator() ( uint  rowIdx,
uint  colIdx 
) [inherited]
Expression Expression::operator* ( const double &  arg) const [inherited]

References Expression::convert().

Referenced by Expression::operator*().

Expression Expression::operator* ( const Vector arg) const [inherited]
Expression Expression::operator* ( const Matrix arg) const [inherited]
Expression Expression::operator* ( const Expression arg) const [inherited]
Expression Expression::operator+ ( const double &  arg) const [inherited]

References Expression::convert().

Referenced by Expression::operator+().

Expression Expression::operator+ ( const Vector arg) const [inherited]
Expression Expression::operator+ ( const Matrix arg) const [inherited]
Expression Expression::operator+ ( const Expression arg) const [inherited]
Expression Expression::operator- ( const double &  arg) const [inherited]
Expression Expression::operator- ( const Vector arg) const [inherited]
Expression Expression::operator- ( const Matrix arg) const [inherited]
Expression Expression::operator- ( const Expression arg) const [inherited]
Expression Expression::operator- ( ) const [inherited]
Expression Expression::operator/ ( const double &  arg) const [inherited]

References Expression::convert().

Expression Expression::operator/ ( const Expression arg) const [inherited]
Expression & Expression::operator<< ( const double &  arg) [inherited]

References Expression::convert().

Referenced by Expression::operator<<().

Expression & Expression::operator<< ( const Vector arg) [inherited]
Expression & Expression::operator<< ( const Matrix arg) [inherited]
Expression & Expression::operator<< ( const Expression arg) [inherited]
ConstraintComponent Expression::operator<= ( const double &  ub) const [inherited]
ConstraintComponent Expression::operator<= ( const Vector ub) const [inherited]
ConstraintComponent Expression::operator<= ( const VariablesGrid ub) const [inherited]
IntegerParameter & IntegerParameter::operator= ( const IntegerParameter arg)
ConstraintComponent Expression::operator== ( const double &  b) const [inherited]
ConstraintComponent Expression::operator== ( const Vector b) const [inherited]
ConstraintComponent Expression::operator== ( const VariablesGrid b) const [inherited]
ConstraintComponent Expression::operator>= ( const double &  lb) const [inherited]
ConstraintComponent Expression::operator>= ( const Vector lb) const [inherited]
ConstraintComponent Expression::operator>= ( const VariablesGrid lb) const [inherited]
Stream Expression::print ( Stream stream) const [inherited]

References Expression::dim, Expression::element, and uint.

Referenced by operator<<().

Operator * Expression::product ( const Operator a,
const Operator b 
) const [protected, inherited]
returnValue Expression::substitute ( int  idx,
const Expression arg 
) const [inherited]
Expression Expression::transpose ( ) const [inherited]

Friends And Related Function Documentation

Expression operator* ( const double &  arg1,
const Expression arg2 
) [friend, inherited]
Expression operator* ( const Vector arg1,
const Expression arg2 
) [friend, inherited]
Expression operator* ( const Matrix arg1,
const Expression arg2 
) [friend, inherited]
Expression operator+ ( const double &  arg1,
const Expression arg2 
) [friend, inherited]
Expression operator+ ( const Vector arg1,
const Expression arg2 
) [friend, inherited]
Expression operator+ ( const Matrix arg1,
const Expression arg2 
) [friend, inherited]
Expression operator- ( const double &  arg1,
const Expression arg2 
) [friend, inherited]
Expression operator- ( const Vector arg1,
const Expression arg2 
) [friend, inherited]
Expression operator- ( const Matrix arg1,
const Expression arg2 
) [friend, inherited]
Expression operator/ ( const double &  arg1,
const Expression arg2 
) [friend, inherited]
Expression operator/ ( const Vector arg1,
const Expression arg2 
) [friend, inherited]
Expression operator/ ( const Matrix arg1,
const Expression arg2 
) [friend, inherited]
Stream operator<< ( Stream stream,
const Expression arg 
) [friend, inherited]
ConstraintComponent operator<= ( double  lb,
const Expression arg 
) [friend, inherited]
ConstraintComponent operator<= ( Vector  lb,
const Expression arg 
) [friend, inherited]
ConstraintComponent operator<= ( VariablesGrid  lb,
const Expression arg 
) [friend, inherited]
ConstraintComponent operator== ( double  b,
const Expression arg 
) [friend, inherited]
ConstraintComponent operator== ( Vector  b,
const Expression arg 
) [friend, inherited]
ConstraintComponent operator== ( VariablesGrid  b,
const Expression arg 
) [friend, inherited]
ConstraintComponent operator>= ( double  ub,
const Expression arg 
) [friend, inherited]
ConstraintComponent operator>= ( Vector  ub,
const Expression arg 
) [friend, inherited]
ConstraintComponent operator>= ( VariablesGrid  ub,
const Expression arg 
) [friend, inherited]

Member Data Documentation

uint Expression::component [protected, inherited]
BEGIN_NAMESPACE_ACADO int IntegerParameter::count = 0 [static, protected]
uint Expression::dim [protected, inherited]
Operator** Expression::element [protected, inherited]
String Expression::name [protected, inherited]
uint Expression::nCols [protected, inherited]
uint Expression::nRows [protected, inherited]
VariableType Expression::variableType [protected, inherited]

The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines