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

Manages working sets of bounds (= box constraints). More...

#include <Bounds.hpp>

Inheritance diagram for Bounds:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 Bounds ()
 Bounds ()
 Bounds (const Bounds &rhs)
 Bounds (const Bounds &rhs)
 Bounds ()
 Bounds (int _n)
 Bounds (const Bounds &rhs)
returnValue flipFixed (int number)
IndexlistgetFixed ()
IndexlistgetFixed ()
IndexlistgetFixed ()
IndexlistgetFree ()
IndexlistgetFree ()
IndexlistgetFree ()
int getNBV () const
int getNBV () const
int getNBV () const
int getNFR ()
int getNFR ()
int getNFR () const
int getNFV () const
int getNFV () const
int getNFV () const
int getNFX ()
int getNFX ()
int getNFX () const
int getNUV () const
int getNUV () const
int getNUV () const
int getNV () const
int getNV () const
int getNV () const
returnValue init (int n)
returnValue init (int n)
returnValue init (int _n=0)
returnValue moveFixedToFree (int _number)
returnValue moveFixedToFree (int _number)
returnValue moveFixedToFree (int number)
returnValue moveFreeToFixed (int _number, SubjectToStatus _status)
returnValue moveFreeToFixed (int _number, SubjectToStatus _status)
returnValue moveFreeToFixed (int number, SubjectToStatus _status)
Boundsoperator= (const Bounds &rhs)
Boundsoperator= (const Bounds &rhs)
Boundsoperator= (const Bounds &rhs)
returnValue print ()
virtual returnValue rotate (int offset)
returnValue setNBV (int n)
returnValue setNBV (int n)
returnValue setNFV (int n)
returnValue setNFV (int n)
returnValue setNUV (int n)
returnValue setNUV (int n)
returnValue setupAllFree ()
returnValue setupAllFree ()
returnValue setupAllFree ()
returnValue setupAllLower ()
returnValue setupAllUpper ()
returnValue setupBound (int _number, SubjectToStatus _status)
returnValue setupBound (int _number, SubjectToStatus _status)
returnValue setupBound (int number, SubjectToStatus _status)
virtual returnValue shift (int offset)
returnValue swapFree (int number1, int number2)
returnValue swapFree (int number1, int number2)
returnValue swapFree (int number1, int number2)
 ~Bounds ()
 ~Bounds ()
virtual ~Bounds ()

Protected Member Functions

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

Protected Attributes

Indexlist fixed
Indexlist free
Indexlist freee
int nBV
int nFV
int nUV
int nV

Detailed Description

Manages working sets of bounds (= box constraints).

This class manages working sets of 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 (= box 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/Bounds.hpp.


Constructor & Destructor Documentation

Bounds::Bounds ( const Bounds rhs)

Copy constructor (deep copy).

Parameters:
rhsRhs object.

Definition at line 59 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/SRC/Bounds.cpp.

Default constructor.

Bounds::Bounds ( const Bounds rhs)

Copy constructor (deep copy).

Parameters:
rhsRhs object.

Destructor.

Default constructor.

Bounds::Bounds ( int  _n)

Constructor which takes the number of bounds.

Parameters:
_nNumber of bounds.

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

Bounds::Bounds ( const Bounds rhs)

Copy constructor (deep copy).

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

Destructor.


Member Function Documentation

returnValue Bounds::clear ( ) [protected]

Frees all allocated memory.

Returns:
SUCCESSFUL_RETURN

Reimplemented from SubjectTo.

Definition at line 439 of file external_packages/qpOASES-3.0beta/src/Bounds.cpp.

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

Copies all members from given rhs object.

Returns:
SUCCESSFUL_RETURN
Parameters:
rhsRhs object.

Definition at line 448 of file external_packages/qpOASES-3.0beta/src/Bounds.cpp.

returnValue Bounds::flipFixed ( int  number)

Flip fixed bound.

Returns:
SUCCESSFUL_RETURN
RET_MOVING_BOUND_FAILED
RET_INDEX_OUT_OF_BOUNDS

Definition at line 228 of file external_packages/qpOASES-3.0beta/src/Bounds.cpp.

Indexlist* Bounds::getFixed ( ) [inline]

Returns a pointer to fixed variables index list.

Returns:
Pointer to fixed variables index list.
Indexlist* Bounds::getFixed ( ) [inline]

Returns a pointer to fixed variables index list.

Returns:
Pointer to fixed variables index list.
Indexlist* Bounds::getFixed ( ) [inline]

Returns a pointer to fixed variables index list.

Returns:
Pointer to fixed variables index list.
Indexlist* Bounds::getFree ( ) [inline]

Returns a pointer to free variables index list.

Returns:
Pointer to free variables index list.
Indexlist* Bounds::getFree ( ) [inline]

Returns a pointer to free variables index list.

Returns:
Pointer to free variables index list.
Indexlist* Bounds::getFree ( ) [inline]

Returns a pointer to free variables index list.

Returns:
Pointer to free variables index list.
int Bounds::getNBV ( ) const [inline]

Returns number of bounded (but possibly free) variables.

Returns:
Number of bounded (but possibly free) variables.
int Bounds::getNBV ( ) const [inline]

Returns number of bounded (but possibly free) variables.

Returns:
Number of bounded (but possibly free) variables.
int Bounds::getNBV ( ) const [inline]

Returns number of bounded (but possibly free) variables.

Returns:
Number of bounded (but possibly free) variables.
int Bounds::getNFR ( ) [inline]

Returns number of free variables.

Returns:
Number of free variables.
int Bounds::getNFR ( ) [inline]

Returns number of free variables.

Returns:
Number of free variables.
int Bounds::getNFR ( ) const [inline]

Returns number of free variables.

Returns:
Number of free variables.
int Bounds::getNFV ( ) const [inline]

Returns number of implicitly fixed variables.

Returns:
Number of implicitly fixed variables.
int Bounds::getNFV ( ) const [inline]

Returns number of implicitly fixed variables.

Returns:
Number of implicitly fixed variables.
int Bounds::getNFV ( ) const [inline]

Returns number of implicitly fixed variables.

Returns:
Number of implicitly fixed variables.
int Bounds::getNFX ( ) [inline]

Returns number of fixed variables.

Returns:
Number of fixed variables.
int Bounds::getNFX ( ) [inline]

Returns number of fixed variables.

Returns:
Number of fixed variables.
int Bounds::getNFX ( ) const [inline]

Returns number of fixed variables.

Returns:
Number of fixed variables.
int Bounds::getNUV ( ) const [inline]

Returns number of unbounded variables.

Returns:
Number of unbounded variables.
int Bounds::getNUV ( ) const [inline]

Returns number of unbounded variables.

Returns:
Number of unbounded variables.
int Bounds::getNUV ( ) const [inline]

Returns number of unbounded variables.

Returns:
Number of unbounded variables.
int Bounds::getNV ( ) const [inline]

Returns number of variables.

Returns:
Number of variables.
int Bounds::getNV ( ) const [inline]

Returns number of variables.

Returns:
Number of variables.
int Bounds::getNV ( ) const [inline]

Returns number of variables.

Returns:
Number of variables.

Pseudo-constructor takes the number of bounds.

Returns:
SUCCESSFUL_RETURN
Parameters:
nNumber of bounds.

Reimplemented from SubjectTo.

Definition at line 103 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/SRC/Bounds.cpp.

Pseudo-constructor takes the number of bounds.

Returns:
SUCCESSFUL_RETURN
Parameters:
nNumber of bounds.

Reimplemented from SubjectTo.

returnValue Bounds::init ( int  _n = 0)

Initialises object with given number of bounds.

Returns:
SUCCESSFUL_RETURN
RET_INVALID_ARGUMENTS
Parameters:
_nNumber of bounds.

Reimplemented from SubjectTo.

Moves index of a bound from index list of fixed to that of free bounds.

Returns:
SUCCESSFUL_RETURN
RET_MOVING_BOUND_FAILED
RET_INDEX_OUT_OF_BOUNDS
Parameters:
_numberNumber of bound to be freed.

Definition at line 197 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/SRC/Bounds.cpp.

Moves index of a bound from index list of fixed to that of free bounds.

Returns:
SUCCESSFUL_RETURN
RET_MOVING_BOUND_FAILED
RET_INDEX_OUT_OF_BOUNDS
Parameters:
_numberNumber of bound to be freed.

Moves index of a bound from index list of fixed to that of free bounds.

Returns:
SUCCESSFUL_RETURN
RET_MOVING_BOUND_FAILED
RET_INDEX_OUT_OF_BOUNDS
Parameters:
numberNumber of bound to be freed.
returnValue Bounds::moveFreeToFixed ( int  _number,
SubjectToStatus  _status 
)

Moves index of a bound from index list of free to that of fixed bounds.

Returns:
SUCCESSFUL_RETURN
RET_MOVING_BOUND_FAILED
RET_INDEX_OUT_OF_BOUNDS
Parameters:
_numberNumber of bound to be fixed.
_statusStatus of bound to be fixed.
returnValue Bounds::moveFreeToFixed ( int  _number,
SubjectToStatus  _status 
)

Moves index of a bound from index list of free to that of fixed bounds.

Returns:
SUCCESSFUL_RETURN
RET_MOVING_BOUND_FAILED
RET_INDEX_OUT_OF_BOUNDS
Parameters:
_numberNumber of bound to be fixed.
_statusStatus of bound to be fixed.

Definition at line 217 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/SRC/Bounds.cpp.

returnValue Bounds::moveFreeToFixed ( int  number,
SubjectToStatus  _status 
)

Moves index of a bound from index list of free to that of fixed bounds.

Returns:
SUCCESSFUL_RETURN
RET_MOVING_BOUND_FAILED
RET_INDEX_OUT_OF_BOUNDS
Parameters:
numberNumber of bound to be fixed.
_statusStatus of bound to be fixed.
Bounds& Bounds::operator= ( const Bounds rhs)

Assignment operator (deep copy).

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

Assignment operator (deep copy).

Parameters:
rhsRhs object.

Definition at line 81 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/SRC/Bounds.cpp.

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

Assignment operator (deep copy).

Parameters:
rhsRhs object.

Prints information on bounds object (in particular, lists of free and fixed bounds.

Returns:
SUCCESSFUL_RETURN
RET_INDEXLIST_CORRUPTED

Definition at line 400 of file external_packages/qpOASES-3.0beta/src/Bounds.cpp.

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

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

Implements SubjectTo.

Definition at line 325 of file external_packages/qpOASES-3.0beta/src/Bounds.cpp.

returnValue Bounds::setNBV ( int  n) [inline]

Sets number of bounded (but possibly free) variables.

Returns:
SUCCESSFUL_RETURN
Parameters:
nNumber of bounded (but possibly free) variables.
returnValue Bounds::setNBV ( int  n) [inline]

Sets number of bounded (but possibly free) variables.

Returns:
SUCCESSFUL_RETURN
Parameters:
nNumber of bounded (but possibly free) variables.
returnValue Bounds::setNFV ( int  n) [inline]

Sets number of implicitly fixed variables.

Returns:
SUCCESSFUL_RETURN
Parameters:
nNumber of implicitly fixed variables.
returnValue Bounds::setNFV ( int  n) [inline]

Sets number of implicitly fixed variables.

Returns:
SUCCESSFUL_RETURN
Parameters:
nNumber of implicitly fixed variables.
returnValue Bounds::setNUV ( int  n) [inline]

Sets number of unbounded variables.

Returns:
SUCCESSFUL_RETURN
Parameters:
nNumber of unbounded variables
returnValue Bounds::setNUV ( int  n) [inline]

Sets number of unbounded variables.

Returns:
SUCCESSFUL_RETURN
Parameters:
nNumber of unbounded variables
returnValue Bounds::setupAll ( SubjectToStatus  _status) [protected]

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_BOUND_FAILED
Parameters:
_statusDesired initial status for all bounds.

Definition at line 462 of file external_packages/qpOASES-3.0beta/src/Bounds.cpp.

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

Returns:
SUCCESSFUL_RETURN
RET_SETUP_BOUND_FAILED

Definition at line 156 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/SRC/Bounds.cpp.

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

Returns:
SUCCESSFUL_RETURN
RET_SETUP_BOUND_FAILED

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

Returns:
SUCCESSFUL_RETURN
RET_SETUP_BOUND_FAILED

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

Returns:
SUCCESSFUL_RETURN
RET_SETUP_BOUND_FAILED

Definition at line 169 of file external_packages/qpOASES-3.0beta/src/Bounds.cpp.

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

Returns:
SUCCESSFUL_RETURN
RET_SETUP_BOUND_FAILED

Definition at line 178 of file external_packages/qpOASES-3.0beta/src/Bounds.cpp.

returnValue Bounds::setupBound ( int  _number,
SubjectToStatus  _status 
)

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

Returns:
SUCCESSFUL_RETURN
RET_SETUP_BOUND_FAILED
RET_INDEX_OUT_OF_BOUNDS
RET_INVALID_ARGUMENTS
Parameters:
_numberNumber of new bound.
_statusStatus of new bound.
returnValue Bounds::setupBound ( int  _number,
SubjectToStatus  _status 
)

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

Returns:
SUCCESSFUL_RETURN
RET_SETUP_BOUND_FAILED
RET_INDEX_OUT_OF_BOUNDS
RET_INVALID_ARGUMENTS
Parameters:
_numberNumber of new bound.
_statusStatus of new bound.

Definition at line 120 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/SRC/Bounds.cpp.

returnValue Bounds::setupBound ( int  number,
SubjectToStatus  _status 
)

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

Returns:
SUCCESSFUL_RETURN
RET_SETUP_BOUND_FAILED
RET_INDEX_OUT_OF_BOUNDS
RET_INVALID_ARGUMENTS
Parameters:
numberNumber of new bound.
_statusStatus of new bound.
returnValue Bounds::shift ( int  offset) [virtual]

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

Implements SubjectTo.

Definition at line 264 of file external_packages/qpOASES-3.0beta/src/Bounds.cpp.

returnValue Bounds::swapFree ( int  number1,
int  number2 
)

Swaps the indices of two free bounds within the index set.

Returns:
SUCCESSFUL_RETURN
RET_SWAPINDEX_FAILED
Parameters:
number1Number of first constraint or bound.
number2Number of second constraint or bound.

Definition at line 238 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/SRC/Bounds.cpp.

returnValue Bounds::swapFree ( int  number1,
int  number2 
)

Swaps the indices of two free bounds within the index set.

Returns:
SUCCESSFUL_RETURN
RET_SWAPINDEX_FAILED
Parameters:
number1Number of first constraint or bound.
number2Number of second constraint or bound.
returnValue Bounds::swapFree ( int  number1,
int  number2 
)

Swaps the indices of two free bounds within the index set.

Returns:
SUCCESSFUL_RETURN
RET_SWAPINDEX_FAILED
Parameters:
number1Number of first constraint or bound.
number2Number of second constraint or bound.

Member Data Documentation

Indexlist Bounds::fixed [protected]

Index list of fixed variables.

Definition at line 179 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/INCLUDE/Bounds.hpp.

Indexlist Bounds::free [protected]

Index list of free variables.

Definition at line 178 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/INCLUDE/Bounds.hpp.

Indexlist Bounds::freee [protected]

Index list of free variables.

Definition at line 242 of file external_packages/qpOASES-3.0beta/include/qpOASES/Bounds.hpp.

int Bounds::nBV [protected]

Number of bounded (but possibly free) variables.

Definition at line 175 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/INCLUDE/Bounds.hpp.

int Bounds::nFV [protected]

Number of implicitly fixed variables.

Definition at line 174 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/INCLUDE/Bounds.hpp.

int Bounds::nUV [protected]

Number of unbounded variables.

Definition at line 176 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/INCLUDE/Bounds.hpp.

int Bounds::nV [protected]

Number of variables (nV = nFV + nBV + nUV).

Definition at line 173 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/INCLUDE/Bounds.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