Public Member Functions | Protected Member Functions | Protected Attributes
Constraints Class Reference

Manages working sets of constraints. More...

#include <Constraints.hpp>

Inheritance diagram for Constraints:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 Constraints ()
 Constraints ()
 Constraints (const Constraints &rhs)
 Constraints (const Constraints &rhs)
 Constraints ()
 Constraints (int _n)
 Constraints (const Constraints &rhs)
returnValue flipFixed (int number)
IndexlistgetActive ()
IndexlistgetActive ()
IndexlistgetActive ()
IndexlistgetInactive ()
IndexlistgetInactive ()
IndexlistgetInactive ()
int getNAC ()
int getNAC ()
int getNAC () const
int getNC () const
int getNC () const
int getNC () const
int getNEC () const
int getNEC () const
int getNEC () const
int getNIAC ()
int getNIAC ()
int getNIAC () const
int getNIC () const
int getNIC () const
int getNIC () const
int getNUC () const
int getNUC () const
int getNUC () const
returnValue init (int n)
returnValue init (int n)
returnValue init (int _n=0)
returnValue moveActiveToInactive (int _number)
returnValue moveActiveToInactive (int _number)
returnValue moveActiveToInactive (int number)
returnValue moveInactiveToActive (int _number, SubjectToStatus _status)
returnValue moveInactiveToActive (int _number, SubjectToStatus _status)
returnValue moveInactiveToActive (int number, SubjectToStatus _status)
Constraintsoperator= (const Constraints &rhs)
Constraintsoperator= (const Constraints &rhs)
Constraintsoperator= (const Constraints &rhs)
returnValue print ()
virtual returnValue rotate (int offset)
returnValue setNEC (int n)
returnValue setNEC (int n)
returnValue setNIC (int n)
returnValue setNIC (int n)
returnValue setNUC (int n)
returnValue setNUC (int n)
returnValue setupAllInactive ()
returnValue setupAllInactive ()
returnValue setupAllInactive ()
returnValue setupAllLower ()
returnValue setupAllUpper ()
returnValue setupConstraint (int _number, SubjectToStatus _status)
returnValue setupConstraint (int _number, SubjectToStatus _status)
returnValue setupConstraint (int number, SubjectToStatus _status)
virtual returnValue shift (int offset)
 ~Constraints ()
 ~Constraints ()
virtual ~Constraints ()

Protected Member Functions

returnValue clear ()
returnValue copy (const Constraints &rhs)
returnValue setupAll (SubjectToStatus _status)

Protected Attributes

Indexlist active
Indexlist inactive
int nC
int nEC
int nIC
int nUC

Detailed Description

Manages working sets of constraints.

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

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

This class manages working sets of 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/Constraints.hpp.


Constructor & Destructor Documentation

Copy constructor (deep copy).

Parameters:
rhsRhs object.

Definition at line 58 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/SRC/Constraints.cpp.

Default constructor.

Copy constructor (deep copy).

Parameters:
rhsRhs object.

Destructor.

Default constructor.

Constructor which takes the number of constraints.

Parameters:
_nNumber of constraints.

Definition at line 58 of file external_packages/qpOASES-3.0beta/src/Constraints.cpp.

Copy constructor (deep copy).

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

Destructor.


Member Function Documentation

Frees all allocated memory.

Returns:
SUCCESSFUL_RETURN

Reimplemented from SubjectTo.

Definition at line 423 of file external_packages/qpOASES-3.0beta/src/Constraints.cpp.

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

Copies all members from given rhs object.

Returns:
SUCCESSFUL_RETURN
Parameters:
rhsRhs object.

Definition at line 432 of file external_packages/qpOASES-3.0beta/src/Constraints.cpp.

Flip fixed constraint.

Returns:
SUCCESSFUL_RETURN
RET_MOVING_CONSTRAINT_FAILED
RET_INDEX_OUT_OF_BOUNDS

Definition at line 227 of file external_packages/qpOASES-3.0beta/src/Constraints.cpp.

Returns a pointer to active constraints index list.

Returns:
Pointer to active constraints index list.

Returns a pointer to active constraints index list.

Returns:
Pointer to active constraints index list.

Returns a pointer to active constraints index list.

Returns:
Pointer to active constraints index list.

Returns a pointer to inactive constraints index list.

Returns:
Pointer to inactive constraints index list.

Returns a pointer to inactive constraints index list.

Returns:
Pointer to inactive constraints index list.

Returns a pointer to inactive constraints index list.

Returns:
Pointer to inactive constraints index list.
int Constraints::getNAC ( ) [inline]

Returns the number of active constraints.

Returns:
Number of constraints.
int Constraints::getNAC ( ) [inline]

Returns the number of active constraints.

Returns:
Number of constraints.
int Constraints::getNAC ( ) const [inline]

Returns the number of active constraints.

Returns:
Number of active constraints.
int Constraints::getNC ( ) const [inline]

Returns the number of constraints.

Returns:
Number of constraints.
int Constraints::getNC ( ) const [inline]

Returns the number of constraints.

Returns:
Number of constraints.
int Constraints::getNC ( ) const [inline]

Returns the number of constraints.

Returns:
Number of constraints.
int Constraints::getNEC ( ) const [inline]

Returns the number of implicit equality constraints.

Returns:
Number of implicit equality constraints.
int Constraints::getNEC ( ) const [inline]

Returns the number of implicit equality constraints.

Returns:
Number of implicit equality constraints.
int Constraints::getNEC ( ) const [inline]

Returns the number of implicit equality constraints.

Returns:
Number of implicit equality constraints.
int Constraints::getNIAC ( ) [inline]

Returns the number of inactive constraints.

Returns:
Number of constraints.
int Constraints::getNIAC ( ) [inline]

Returns the number of inactive constraints.

Returns:
Number of constraints.
int Constraints::getNIAC ( ) const [inline]

Returns the number of inactive constraints.

Returns:
Number of inactive constraints.
int Constraints::getNIC ( ) const [inline]

Returns the number of "real" inequality constraints.

Returns:
Number of "real" inequality constraints.
int Constraints::getNIC ( ) const [inline]

Returns the number of "real" inequality constraints.

Returns:
Number of "real" inequality constraints.
int Constraints::getNIC ( ) const [inline]

Returns the number of "real" inequality constraints.

Returns:
Number of "real" inequality constraints.
int Constraints::getNUC ( ) const [inline]

Returns the number of unbounded constraints (i.e. without any bounds).

Returns:
Number of unbounded constraints (i.e. without any bounds).
int Constraints::getNUC ( ) const [inline]

Returns the number of unbounded constraints (i.e. without any bounds).

Returns:
Number of unbounded constraints (i.e. without any bounds).
int Constraints::getNUC ( ) const [inline]

Returns the number of unbounded constraints (i.e. without any bounds).

Returns:
Number of unbounded constraints (i.e. without any bounds).

Pseudo-constructor takes the number of constraints.

Returns:
SUCCESSFUL_RETURN
Parameters:
nNumber of constraints.

Reimplemented from SubjectTo.

Pseudo-constructor takes the number of constraints.

Returns:
SUCCESSFUL_RETURN
Parameters:
nNumber of constraints.

Reimplemented from SubjectTo.

Definition at line 102 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/SRC/Constraints.cpp.

returnValue Constraints::init ( int  _n = 0)

Initialises object with given number of constraints.

Returns:
SUCCESSFUL_RETURN
RET_INVALID_ARGUMENTS
Parameters:
_nNumber of constraints.

Reimplemented from SubjectTo.

Moves index of a constraint from index list of active to that of inactive constraints.

Returns:
SUCCESSFUL_RETURN
RET_MOVING_CONSTRAINT_FAILED
Parameters:
_numberNumber of constraint to become inactive.

Definition at line 207 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/SRC/Constraints.cpp.

Moves index of a constraint from index list of active to that of inactive constraints.

Returns:
SUCCESSFUL_RETURN
RET_MOVING_CONSTRAINT_FAILED
Parameters:
_numberNumber of constraint to become inactive.

Moves index of a constraint from index list of active to that of inactive constraints.

Returns:
SUCCESSFUL_RETURN
RET_MOVING_CONSTRAINT_FAILED
Parameters:
numberNumber of constraint to become inactive.

Moves index of a constraint from index list of inactive to that of active constraints.

Returns:
SUCCESSFUL_RETURN
RET_MOVING_CONSTRAINT_FAILED
Parameters:
_numberNumber of constraint to become active.
_statusStatus of constraint to become active.

Definition at line 227 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/SRC/Constraints.cpp.

Moves index of a constraint from index list of inactive to that of active constraints.

Returns:
SUCCESSFUL_RETURN
RET_MOVING_CONSTRAINT_FAILED
Parameters:
_numberNumber of constraint to become active.
_statusStatus of constraint to become active.

Moves index of a constraint from index list of inactive to that of active constraints.

Returns:
SUCCESSFUL_RETURN
RET_MOVING_CONSTRAINT_FAILED
Parameters:
numberNumber of constraint to become active.
_statusStatus of constraint to become active.
Constraints& Constraints::operator= ( const Constraints rhs)

Assignment operator (deep copy).

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

Assignment operator (deep copy).

Parameters:
rhsRhs object.

Definition at line 80 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/SRC/Constraints.cpp.

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

Assignment operator (deep copy).

Parameters:
rhsRhs object.

Prints information on constraints object (in particular, lists of inactive and active constraints.

Returns:
SUCCESSFUL_RETURN
RET_INDEXLIST_CORRUPTED

Definition at line 384 of file external_packages/qpOASES-3.0beta/src/Constraints.cpp.

returnValue Constraints::rotate ( int  offset) [virtual]

Rotates forward type and status of all constraints 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].

Implements SubjectTo.

Definition at line 309 of file external_packages/qpOASES-3.0beta/src/Constraints.cpp.

returnValue Constraints::setNEC ( int  n) [inline]

Sets number of implicit equality constraints.

Returns:
SUCCESSFUL_RETURN
Parameters:
nNumber of implicit equality constraints.
returnValue Constraints::setNEC ( int  n) [inline]

Sets number of implicit equality constraints.

Returns:
SUCCESSFUL_RETURN
Parameters:
nNumber of implicit equality constraints.
returnValue Constraints::setNIC ( int  n) [inline]

Sets number of "real" inequality constraints.

Returns:
SUCCESSFUL_RETURN
Parameters:
nNumber of "real" inequality constraints.
returnValue Constraints::setNIC ( int  n) [inline]

Sets number of "real" inequality constraints.

Returns:
SUCCESSFUL_RETURN
Parameters:
nNumber of "real" inequality constraints.
returnValue Constraints::setNUC ( int  n) [inline]

Sets number of unbounded constraints (i.e. without any bounds).

Returns:
SUCCESSFUL_RETURN
Parameters:
nNumber of unbounded constraints (i.e. without any bounds).
returnValue Constraints::setNUC ( int  n) [inline]

Sets number of unbounded constraints (i.e. without any bounds).

Returns:
SUCCESSFUL_RETURN
Parameters:
nNumber of unbounded constraints (i.e. without any bounds).

Initially adds all numbers of new (i.e. not yet in the list) bounds to to the index set corresponding to the desired status; the order depends on the SujectToType of each index.

Returns:
SUCCESSFUL_RETURN
RET_SETUP_CONSTRAINT_FAILED
Parameters:
_statusDesired initial status for all bounds.

Definition at line 446 of file external_packages/qpOASES-3.0beta/src/Constraints.cpp.

Initially adds all enabled numbers of new (i.e. not yet in the list) constraints to to the index set of inactive constraints; the order depends on the SujectToType of each index. Only disabled constraints are added to index set of disabled constraints!

Returns:
SUCCESSFUL_RETURN
RET_SETUP_CONSTRAINT_FAILED

Initially adds all enabled numbers of new (i.e. not yet in the list) constraints to to the index set of inactive constraints; the order depends on the SujectToType of each index. Only disabled constraints are added to index set of disabled constraints!

Returns:
SUCCESSFUL_RETURN
RET_SETUP_CONSTRAINT_FAILED

Definition at line 155 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/SRC/Constraints.cpp.

Initially adds all enabled numbers of new (i.e. not yet in the list) constraints to to the index set of inactive constraints; the order depends on the SujectToType of each index. Only disabled constraints are added to index set of disabled constraints!

Returns:
SUCCESSFUL_RETURN
RET_SETUP_CONSTRAINT_FAILED

Initially adds all enabled numbers of new (i.e. not yet in the list) constraints to to the index set of active constraints (on their lower bounds); the order depends on the SujectToType of each index. Only disabled constraints are added to index set of disabled constraints!

Returns:
SUCCESSFUL_RETURN
RET_SETUP_CONSTRAINT_FAILED

Definition at line 168 of file external_packages/qpOASES-3.0beta/src/Constraints.cpp.

Initially adds all enabled numbers of new (i.e. not yet in the list) constraints to to the index set of active constraints (on their upper bounds); the order depends on the SujectToType of each index. Only disabled constraints are added to index set of disabled constraints!

Returns:
SUCCESSFUL_RETURN
RET_SETUP_CONSTRAINT_FAILED

Definition at line 177 of file external_packages/qpOASES-3.0beta/src/Constraints.cpp.

Initially adds number of a new (i.e. not yet in the list) constraint to a given index set.

Returns:
SUCCESSFUL_RETURN
RET_SETUP_CONSTRAINT_FAILED
RET_INDEX_OUT_OF_BOUNDS
RET_INVALID_ARGUMENTS
Parameters:
_numberNumber of new constraint.
_statusStatus of new constraint.

Initially adds number of a new (i.e. not yet in the list) constraint to a given index set.

Returns:
SUCCESSFUL_RETURN
RET_SETUP_CONSTRAINT_FAILED
RET_INDEX_OUT_OF_BOUNDS
RET_INVALID_ARGUMENTS
Parameters:
_numberNumber of new constraint.
_statusStatus of new constraint.

Definition at line 119 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/SRC/Constraints.cpp.

Initially adds number of a new (i.e. not yet in the list) constraint to a given index set.

Returns:
SUCCESSFUL_RETURN
RET_SETUP_CONSTRAINT_FAILED
RET_INDEX_OUT_OF_BOUNDS
RET_INVALID_ARGUMENTS
Parameters:
numberNumber of new constraint.
_statusStatus of new constraint.
returnValue Constraints::shift ( int  offset) [virtual]

Shifts forward type and status of all constraints 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 n. Type and status of the first <offset> constraints is thrown away, type and status of the last <offset> constraints 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.

Implements SubjectTo.

Definition at line 248 of file external_packages/qpOASES-3.0beta/src/Constraints.cpp.


Member Data Documentation

Index list of active constraints.

Definition at line 169 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/INCLUDE/Constraints.hpp.

Index list of inactive constraints.

Definition at line 170 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/INCLUDE/Constraints.hpp.

int Constraints::nC [protected]

Number of constraints (nC = nEC + nIC + nUC).

Definition at line 164 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/INCLUDE/Constraints.hpp.

int Constraints::nEC [protected]

Number of implicit equality constraints.

Definition at line 165 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/INCLUDE/Constraints.hpp.

int Constraints::nIC [protected]

Number of "real" inequality constraints.

Definition at line 166 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/INCLUDE/Constraints.hpp.

int Constraints::nUC [protected]

Number of unbounded constraints (i.e. without any bounds).

Definition at line 167 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/INCLUDE/Constraints.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:23