Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes
SubjectTo Class Reference

Base class for managing working sets of bounds and constraints. More...

#include <SubjectTo.hpp>

Inheritance diagram for SubjectTo:
Inheritance graph
[legend]

List of all members.

Public Member Functions

int getNumberOfType (SubjectToType _type) const
SubjectToStatus getStatus (int i) const
SubjectToStatus getStatus (int i) const
SubjectToStatus getStatus (int i) const
SubjectToType getType (int i) const
SubjectToType getType (int i) const
SubjectToType getType (int i) const
BooleanType hasNoLower () const
BooleanType hasNoUpper () const
returnValue init (int n)
returnValue init (int n)
returnValue init (int _n=0)
BooleanType isNoLower () const
BooleanType isNoLower () const
BooleanType isNoUpper () const
BooleanType isNoUpper () const
SubjectTooperator= (const SubjectTo &rhs)
SubjectTooperator= (const SubjectTo &rhs)
SubjectTooperator= (const SubjectTo &rhs)
virtual returnValue rotate (int offset)=0
void setNoLower (BooleanType _status)
void setNoLower (BooleanType _status)
void setNoLower (BooleanType _status)
void setNoUpper (BooleanType _status)
void setNoUpper (BooleanType _status)
void setNoUpper (BooleanType _status)
returnValue setStatus (int i, SubjectToStatus value)
returnValue setStatus (int i, SubjectToStatus value)
returnValue setStatus (int i, SubjectToStatus value)
returnValue setType (int i, SubjectToType value)
returnValue setType (int i, SubjectToType value)
returnValue setType (int i, SubjectToType value)
virtual returnValue shift (int offset)=0
 SubjectTo ()
 SubjectTo ()
 SubjectTo (const SubjectTo &rhs)
 SubjectTo (const SubjectTo &rhs)
 SubjectTo ()
 SubjectTo (int _n)
 SubjectTo (const SubjectTo &rhs)
 ~SubjectTo ()
 ~SubjectTo ()
virtual ~SubjectTo ()

Protected Member Functions

returnValue addIndex (Indexlist *const indexlist, int newnumber, SubjectToStatus newstatus)
returnValue addIndex (Indexlist *const indexlist, int newnumber, SubjectToStatus newstatus)
returnValue addIndex (Indexlist *const indexlist, int newnumber, SubjectToStatus newstatus)
returnValue clear ()
returnValue copy (const SubjectTo &rhs)
returnValue removeIndex (Indexlist *const indexlist, int removenumber)
returnValue removeIndex (Indexlist *const indexlist, int removenumber)
returnValue removeIndex (Indexlist *const indexlist, int removenumber)
returnValue swapIndex (Indexlist *const indexlist, int number1, int number2)
returnValue swapIndex (Indexlist *const indexlist, int number1, int number2)
returnValue swapIndex (Indexlist *const indexlist, int number1, int number2)

Protected Attributes

int n
BooleanType noLower
BooleanType noUpper
SubjectToStatus status [NVMAX+NCMAX]
SubjectToStatusstatus
SubjectToType type [NVMAX+NCMAX]
SubjectToTypetype

Private Attributes

int size

Detailed Description

Base class for managing working sets of bounds and constraints.

This class manages working sets of constraints and bounds by storing index sets and other status information.

Author:
Hans Joachim Ferreau
Version:
1.3embedded
Date:
2007-2008

This class manages working sets of bounds and constraints by storing index sets and other status information.

Author:
Hans Joachim Ferreau
Version:
3.0beta
Date:
2007-2011

Definition at line 50 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/INCLUDE/SubjectTo.hpp.


Constructor & Destructor Documentation

SubjectTo::SubjectTo ( const SubjectTo rhs)

Copy constructor (deep copy).

Parameters:
rhsRhs object.

Definition at line 63 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/SRC/SubjectTo.cpp.

Default constructor.

SubjectTo::SubjectTo ( const SubjectTo rhs)

Copy constructor (deep copy).

Parameters:
rhsRhs object.

Destructor.

Default constructor.

SubjectTo::SubjectTo ( int  _n)

Constructor which takes the number of constraints or bounds.

Parameters:
_nNumber of constraints or bounds.

Definition at line 62 of file external_packages/qpOASES-3.0beta/src/SubjectTo.cpp.

SubjectTo::SubjectTo ( const SubjectTo rhs)

Copy constructor (deep copy).

Parameters:
rhsRhs object.
virtual SubjectTo::~SubjectTo ( ) [virtual]

Destructor.


Member Function Documentation

returnValue SubjectTo::addIndex ( Indexlist *const  indexlist,
int  newnumber,
SubjectToStatus  newstatus 
) [protected]

Adds the index of a new constraint or bound to index set.

Returns:
SUCCESSFUL_RETURN
RET_ADDINDEX_FAILED
Parameters:
indexlistIndex list to which the new index shall be added.
newnumberNumber of new constraint or bound.
newstatusStatus of new constraint or bound.

Definition at line 141 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/SRC/SubjectTo.cpp.

returnValue SubjectTo::addIndex ( Indexlist *const  indexlist,
int  newnumber,
SubjectToStatus  newstatus 
) [protected]

Adds the index of a new constraint or bound to index set.

Returns:
SUCCESSFUL_RETURN
RET_ADDINDEX_FAILED
Parameters:
indexlistIndex list to which the new index shall be added.
newnumberNumber of new constraint or bound.
newstatusStatus of new constraint or bound.
returnValue SubjectTo::addIndex ( Indexlist *const  indexlist,
int  newnumber,
SubjectToStatus  newstatus 
) [protected]

Adds the index of a new constraint or bound to index set.

Returns:
SUCCESSFUL_RETURN
RET_ADDINDEX_FAILED
RET_INVALID_ARGUMENTS
Parameters:
indexlistIndex list to which the new index shall be added.
newnumberNumber of new constraint or bound.
newstatusStatus of new constraint or bound.
returnValue SubjectTo::clear ( ) [protected]

Frees all allocated memory.

Returns:
SUCCESSFUL_RETURN

Reimplemented in Bounds, and Constraints.

Definition at line 145 of file external_packages/qpOASES-3.0beta/src/SubjectTo.cpp.

returnValue SubjectTo::copy ( const SubjectTo rhs) [protected]

Copies all members from given rhs object.

Returns:
SUCCESSFUL_RETURN
Parameters:
rhsRhs object.

Definition at line 166 of file external_packages/qpOASES-3.0beta/src/SubjectTo.cpp.

int SubjectTo::getNumberOfType ( SubjectToType  _type) const [inline]

Returns number of constraints/bounds with given SubjectTo type.

Returns:
Number of constraints/bounds with given type.
Parameters:
_typeType of (constraints') bound.
SubjectToStatus SubjectTo::getStatus ( int  i) const [inline]

Returns status of (constraints') bound.

Returns:
Status of (constraints') bound
ST_UNDEFINED
Parameters:
iNumber of (constraints') bound.
SubjectToStatus SubjectTo::getStatus ( int  i) const [inline]

Returns status of (constraints') bound.

Returns:
Status of (constraints') bound
ST_UNDEFINED
Parameters:
iNumber of (constraints') bound.
SubjectToStatus SubjectTo::getStatus ( int  i) const [inline]

Returns status of (constraints') bound.

Returns:
Status of (constraints') bound
ST_UNDEFINED
Parameters:
iNumber of (constraints') bound.
SubjectToType SubjectTo::getType ( int  i) const [inline]

Returns type of (constraints') bound.

Returns:
Type of (constraints') bound
RET_INDEX_OUT_OF_BOUNDS
Parameters:
iNumber of (constraints') bound.
SubjectToType SubjectTo::getType ( int  i) const [inline]

Returns type of (constraints') bound.

Returns:
Type of (constraints') bound
RET_INDEX_OUT_OF_BOUNDS
Parameters:
iNumber of (constraints') bound.
SubjectToType SubjectTo::getType ( int  i) const [inline]

Returns type of (constraints') bound.

Returns:
Type of (constraints') bound
RET_INDEX_OUT_OF_BOUNDS
Parameters:
iNumber of (constraints') bound.
BooleanType SubjectTo::hasNoLower ( ) const [inline]

Returns status of lower (constraints') bounds.

Returns:
BT_TRUE if there is no lower (constraints') bound on any variable.
BooleanType SubjectTo::hasNoUpper ( ) const [inline]

Returns status of upper bounds.

Returns:
BT_TRUE if there is no upper (constraints') bound on any variable.

Pseudo-constructor takes the number of constraints or bounds.

Returns:
SUCCESSFUL_RETURN
Parameters:
nNumber of constraints or bounds.

Reimplemented in Bounds, Constraints, Bounds, Constraints, Bounds, and Constraints.

Definition at line 114 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/SRC/SubjectTo.cpp.

Pseudo-constructor takes the number of constraints or bounds.

Returns:
SUCCESSFUL_RETURN
Parameters:
nNumber of constraints or bounds.

Reimplemented in Bounds, Constraints, Bounds, Constraints, Bounds, and Constraints.

returnValue SubjectTo::init ( int  _n = 0)

Initialises object with given number of constraints or bounds.

Returns:
SUCCESSFUL_RETURN
RET_INVALID_ARGUMENTS
Parameters:
_nNumber of constraints or bounds.

Reimplemented in Bounds, Constraints, Bounds, Constraints, Bounds, and Constraints.

BooleanType SubjectTo::isNoLower ( ) const [inline]

Returns status of lower (constraints') bounds.

Returns:
BT_TRUE if there is no lower (constraints') bound on any variable.
BooleanType SubjectTo::isNoLower ( ) const [inline]

Returns status of lower (constraints') bounds.

Returns:
BT_TRUE if there is no lower (constraints') bound on any variable.
BooleanType SubjectTo::isNoUpper ( ) const [inline]

Returns status of upper bounds.

Returns:
BT_TRUE if there is no upper (constraints') bound on any variable.
BooleanType SubjectTo::isNoUpper ( ) const [inline]

Returns status of upper bounds.

Returns:
BT_TRUE if there is no upper (constraints') bound on any variable.
SubjectTo & SubjectTo::operator= ( const SubjectTo rhs)

Assignment operator (deep copy).

Parameters:
rhsRhs object.

Definition at line 88 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/SRC/SubjectTo.cpp.

SubjectTo& SubjectTo::operator= ( const SubjectTo rhs)

Assignment operator (deep copy).

Parameters:
rhsRhs object.
SubjectTo& SubjectTo::operator= ( const SubjectTo rhs)

Assignment operator (deep copy).

Parameters:
rhsRhs object.
returnValue SubjectTo::removeIndex ( Indexlist *const  indexlist,
int  removenumber 
) [protected]

Removes the index of a constraint or bound from index set.

Returns:
SUCCESSFUL_RETURN
RET_UNKNOWN_BUG
Parameters:
indexlistIndex list from which the new index shall be removed.
removenumberNumber of constraint or bound to be removed.
returnValue SubjectTo::removeIndex ( Indexlist *const  indexlist,
int  removenumber 
) [protected]

Removes the index of a constraint or bound from index set.

Returns:
SUCCESSFUL_RETURN
RET_UNKNOWN_BUG
Parameters:
indexlistIndex list from which the new index shall be removed.
removenumberNumber of constraint or bound to be removed.

Definition at line 161 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/SRC/SubjectTo.cpp.

returnValue SubjectTo::removeIndex ( Indexlist *const  indexlist,
int  removenumber 
) [protected]

Removes the index of a constraint or bound from index set.

Returns:
SUCCESSFUL_RETURN
RET_REMOVEINDEX_FAILED
RET_INVALID_ARGUMENTS
Parameters:
indexlistIndex list from which the new index shall be removed.
removenumberNumber of constraint or bound to be removed.
virtual returnValue SubjectTo::rotate ( int  offset) [pure virtual]

Rotates forward type and status of all constraints/bounds by a given offset. This offset has to lie within the range [0,n]. Example for offset = 2:
rotate( {c/b1,c/b2,c/b3,c/b4,c/b5,c/b6} ) = {c/b3,c/b4,c/b5,c/b6,c/b1,c/b2}

Returns:
SUCCESSFUL_RETURN
RET_INDEX_OUT_OF_BOUNDS
RET_ROTATING_FAILED
Parameters:
offsetRotation offset within the range [0,n].

Implemented in Bounds, and Constraints.

void SubjectTo::setNoLower ( BooleanType  _status) [inline]

Sets status of lower (constraints') bounds.

Parameters:
_statusStatus of lower (constraints') bounds.
void SubjectTo::setNoLower ( BooleanType  _status) [inline]

Sets status of lower (constraints') bounds.

Parameters:
_statusStatus of lower (constraints') bounds.
void SubjectTo::setNoLower ( BooleanType  _status) [inline]

Sets status of lower (constraints') bounds.

Parameters:
_statusStatus of lower (constraints') bounds.
void SubjectTo::setNoUpper ( BooleanType  _status) [inline]

Sets status of upper (constraints') bounds.

Parameters:
_statusStatus of upper (constraints') bounds.
void SubjectTo::setNoUpper ( BooleanType  _status) [inline]

Sets status of upper (constraints') bounds.

Parameters:
_statusStatus of upper (constraints') bounds.
void SubjectTo::setNoUpper ( BooleanType  _status) [inline]

Sets status of upper (constraints') bounds.

Parameters:
_statusStatus of upper (constraints') bounds.
returnValue SubjectTo::setStatus ( int  i,
SubjectToStatus  value 
) [inline]

Sets status of (constraints') bound.

Returns:
SUCCESSFUL_RETURN
RET_INDEX_OUT_OF_BOUNDS
Parameters:
iNumber of (constraints') bound.
valueStatus of (constraints') bound.
returnValue SubjectTo::setStatus ( int  i,
SubjectToStatus  value 
) [inline]

Sets status of (constraints') bound.

Returns:
SUCCESSFUL_RETURN
RET_INDEX_OUT_OF_BOUNDS
Parameters:
iNumber of (constraints') bound.
valueStatus of (constraints') bound.
returnValue SubjectTo::setStatus ( int  i,
SubjectToStatus  value 
) [inline]

Sets status of (constraints') bound.

Returns:
SUCCESSFUL_RETURN
RET_INDEX_OUT_OF_BOUNDS
Parameters:
iNumber of (constraints') bound.
valueStatus of (constraints') bound.
returnValue SubjectTo::setType ( int  i,
SubjectToType  value 
) [inline]

Sets type of (constraints') bound.

Returns:
SUCCESSFUL_RETURN
RET_INDEX_OUT_OF_BOUNDS
Parameters:
iNumber of (constraints') bound.
valueType of (constraints') bound.
returnValue SubjectTo::setType ( int  i,
SubjectToType  value 
) [inline]

Sets type of (constraints') bound.

Returns:
SUCCESSFUL_RETURN
RET_INDEX_OUT_OF_BOUNDS
Parameters:
iNumber of (constraints') bound.
valueType of (constraints') bound.
returnValue SubjectTo::setType ( int  i,
SubjectToType  value 
) [inline]

Sets type of (constraints') bound.

Returns:
SUCCESSFUL_RETURN
RET_INDEX_OUT_OF_BOUNDS
Parameters:
iNumber of (constraints') bound.
valueType of (constraints') bound.
virtual returnValue SubjectTo::shift ( int  offset) [pure virtual]

Shifts forward type and status of all constraints/bounds by a given offset. This offset has to lie within the range [0,n/2] and has to be an integer divisor of the total number of constraints/bounds n. Type and status of the first <offset> constraints/bounds is thrown away, type and status of the last <offset> constraints/bounds is real_td, e.g. for offset = 2:
shift( {c/b1,c/b2,c/b3,c/b4,c/b5,c/b6} ) = {c/b3,c/b4,c/b5,c/b6,c/b5,c/b6}

Returns:
SUCCESSFUL_RETURN
RET_INDEX_OUT_OF_BOUNDS
RET_INVALID_ARGUMENTS
RET_SHIFTING_FAILED
Parameters:
offsetShift offset within the range [0,n/2] and integer divisor of n.

Implemented in Bounds, and Constraints.

returnValue SubjectTo::swapIndex ( Indexlist *const  indexlist,
int  number1,
int  number2 
) [protected]

Swaps the indices of two constraints or bounds within the index set.

Returns:
SUCCESSFUL_RETURN
RET_SWAPINDEX_FAILED
Parameters:
indexlistIndex list in which the indices shold be swapped.
number1Number of first constraint or bound.
number2Number of second constraint or bound.
returnValue SubjectTo::swapIndex ( Indexlist *const  indexlist,
int  number1,
int  number2 
) [protected]

Swaps the indices of two constraints or bounds within the index set.

Returns:
SUCCESSFUL_RETURN
RET_SWAPINDEX_FAILED
Parameters:
indexlistIndex list in which the indices shold be swapped.
number1Number of first constraint or bound.
number2Number of second constraint or bound.

Definition at line 177 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/SRC/SubjectTo.cpp.

returnValue SubjectTo::swapIndex ( Indexlist *const  indexlist,
int  number1,
int  number2 
) [protected]

Swaps the indices of two constraints or bounds within the index set.

Returns:
SUCCESSFUL_RETURN
RET_SWAPINDEX_FAILED
RET_INVALID_ARGUMENTS
Parameters:
indexlistIndex list in which the indices shold be swapped.
number1Number of first constraint or bound.
number2Number of second constraint or bound.

Member Data Documentation

int SubjectTo::n [protected]

Total number of constraints/bounds.

Definition at line 210 of file external_packages/qpOASES-3.0beta/include/qpOASES/SubjectTo.hpp.

This flag indicates if there is no lower bound on any variable.

Definition at line 158 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/INCLUDE/SubjectTo.hpp.

This flag indicates if there is no upper bound on any variable.

Definition at line 159 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/INCLUDE/SubjectTo.hpp.

int SubjectTo::size [private]

Status of constraints/bounds.

Definition at line 156 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/INCLUDE/SubjectTo.hpp.

Status of constraints/bounds.

Definition at line 213 of file external_packages/qpOASES-3.0beta/include/qpOASES/SubjectTo.hpp.

Type of constraints/bounds.

Definition at line 155 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/INCLUDE/SubjectTo.hpp.

Type of constraints/bounds.

Definition at line 212 of file external_packages/qpOASES-3.0beta/include/qpOASES/SubjectTo.hpp.


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


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Sat Jun 8 2019 19:40:26