Manages working sets of constraints. More...
#include <Constraints.hpp>
Public Attributes | |
int | n |
BooleanType | noLower |
BooleanType | noUpper |
SubjectToStatus | status [NCMAX] |
SubjectToType | type [NCMAX] |
Protected Member Functions | |
returnValue | clear () |
returnValue | clear () |
returnValue | copy (const Constraints &rhs) |
returnValue | copy (const Constraints &rhs) |
returnValue | setupAll (SubjectToStatus _status) |
returnValue | setupAll (SubjectToStatus _status) |
Protected Member Functions inherited from SubjectTo | |
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 | addIndex (Indexlist *const indexlist, int_t newnumber, SubjectToStatus newstatus) |
returnValue | clear () |
returnValue | clear () |
returnValue | copy (const SubjectTo &rhs) |
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_t 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) |
returnValue | swapIndex (Indexlist *const indexlist, int_t number1, int_t number2) |
Protected Attributes | |
Indexlist | active |
Indexlist | inactive |
int | nC |
int | nEC |
int | nIC |
int | nUC |
Protected Attributes inherited from SubjectTo | |
int | n |
int_t | n |
BooleanType | noLower |
BooleanType | noUpper |
SubjectToStatus | status [NVMAX+NCMAX] |
SubjectToStatus * | status |
SubjectToType | type [NVMAX+NCMAX] |
SubjectToType * | type |
Manages working sets of constraints.
This class manages working sets of constraints by storing index sets and other status information.
This class manages working sets of constraints by storing index sets and other status information.
This class manages working sets of constraints by storing index sets and other status information.
This class manages working sets of constraints by storing index sets and other status information.
Definition at line 50 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/INCLUDE/Constraints.hpp.
BEGIN_NAMESPACE_QPOASES Constraints::Constraints | ( | ) |
Default constructor.
Definition at line 46 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/SRC/Constraints.cpp.
Constraints::Constraints | ( | const Constraints & | rhs | ) |
Copy constructor (deep copy).
rhs | Rhs object. |
Definition at line 58 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/SRC/Constraints.cpp.
Constraints::~Constraints | ( | ) |
Destructor.
Definition at line 72 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/SRC/Constraints.cpp.
Constraints::Constraints | ( | ) |
Default constructor.
Constraints::Constraints | ( | const Constraints & | rhs | ) |
Copy constructor (deep copy).
rhs | Rhs object. |
Constraints::~Constraints | ( | ) |
Destructor.
Constraints::Constraints | ( | ) |
Default constructor.
Constraints::Constraints | ( | int | _n | ) |
Constructor which takes the number of constraints.
_n | Number of constraints. |
Definition at line 58 of file external_packages/qpOASES-3.0beta/src/Constraints.cpp.
Constraints::Constraints | ( | const Constraints & | rhs | ) |
Copy constructor (deep copy).
rhs | Rhs object. |
|
virtual |
Destructor.
Constraints::Constraints | ( | ) |
Default constructor.
Constraints::Constraints | ( | int_t | _n | ) |
Constructor which takes the number of constraints.
_n | Number of constraints. |
Constraints::Constraints | ( | const Constraints & | rhs | ) |
Copy constructor (deep copy).
rhs | Rhs object. |
|
virtual |
Destructor.
|
protected |
Frees all allocated memory.
Definition at line 423 of file external_packages/qpOASES-3.0beta/src/Constraints.cpp.
|
protected |
Frees all allocated memory.
|
protected |
Copies all members from given rhs object.
rhs | Rhs object. |
|
protected |
Copies all members from given rhs object.
rhs | Rhs object. |
Definition at line 432 of file external_packages/qpOASES-3.0beta/src/Constraints.cpp.
returnValue Constraints::flipFixed | ( | int_t | number | ) |
Flip fixed constraint.
returnValue Constraints::flipFixed | ( | int | number | ) |
Flip fixed constraint.
Definition at line 227 of file external_packages/qpOASES-3.0beta/src/Constraints.cpp.
|
inline |
Returns a pointer to active constraints index list.
|
inline |
Returns a pointer to active constraints index list.
|
inline |
Returns a pointer to active constraints index list.
|
inline |
Returns a pointer to active constraints index list.
|
inline |
Returns a pointer to inactive constraints index list.
|
inline |
Returns a pointer to inactive constraints index list.
|
inline |
Returns a pointer to inactive constraints index list.
|
inline |
Returns a pointer to inactive constraints index list.
|
inline |
Returns the number of active constraints.
|
inline |
Returns the number of active constraints.
|
inline |
Returns the number of active constraints.
|
inline |
Returns the number of active constraints.
|
inline |
Returns the number of constraints.
|
inline |
Returns the number of constraints.
|
inline |
Returns the number of constraints.
|
inline |
Returns the number of constraints.
|
inline |
Returns the number of implicit equality constraints.
|
inline |
Returns the number of implicit equality constraints.
|
inline |
Returns the number of implicit equality constraints.
|
inline |
Returns the number of implicit equality constraints.
|
inline |
Returns the number of inactive constraints.
|
inline |
Returns the number of inactive constraints.
|
inline |
Returns the number of inactive constraints.
|
inline |
Returns the number of inactive constraints.
|
inline |
Returns the number of "real" inequality constraints.
|
inline |
Returns the number of "real" inequality constraints.
|
inline |
Returns the number of "real" inequality constraints.
|
inline |
Returns the number of "real" inequality constraints.
|
inline |
Returns the number of unbounded constraints (i.e. without any bounds).
|
inline |
Returns the number of unbounded constraints (i.e. without any bounds).
|
inline |
Returns the number of unbounded constraints (i.e. without any bounds).
|
inline |
Returns the number of unbounded constraints (i.e. without any bounds).
returnValue Constraints::init | ( | int | n | ) |
Pseudo-constructor takes the number of constraints.
n | Number of constraints. |
returnValue Constraints::init | ( | int | n | ) |
Pseudo-constructor takes the number of constraints.
n | Number of constraints. |
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.
_n | Number of constraints. |
returnValue Constraints::init | ( | int_t | _n = 0 | ) |
Initialises object with given number of constraints.
_n | Number of constraints. |
returnValue Constraints::moveActiveToInactive | ( | int | _number | ) |
Moves index of a constraint from index list of active to that of inactive constraints.
_number | Number of constraint to become inactive. |
Definition at line 207 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/SRC/Constraints.cpp.
returnValue Constraints::moveActiveToInactive | ( | int | _number | ) |
Moves index of a constraint from index list of active to that of inactive constraints.
_number | Number of constraint to become inactive. |
returnValue Constraints::moveActiveToInactive | ( | int_t | number | ) |
Moves index of a constraint from index list of active to that of inactive constraints.
number | Number of constraint to become inactive. |
returnValue Constraints::moveActiveToInactive | ( | int | number | ) |
Moves index of a constraint from index list of active to that of inactive constraints.
number | Number of constraint to become inactive. |
returnValue Constraints::moveInactiveToActive | ( | int | _number, |
SubjectToStatus | _status | ||
) |
Moves index of a constraint from index list of inactive to that of active constraints.
_number | Number of constraint to become active. |
_status | Status of constraint to become active. |
returnValue Constraints::moveInactiveToActive | ( | int | _number, |
SubjectToStatus | _status | ||
) |
Moves index of a constraint from index list of inactive to that of active constraints.
_number | Number of constraint to become active. |
_status | Status of constraint to become active. |
Definition at line 227 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/SRC/Constraints.cpp.
returnValue Constraints::moveInactiveToActive | ( | int_t | number, |
SubjectToStatus | _status | ||
) |
Moves index of a constraint from index list of inactive to that of active constraints.
number | Number of constraint to become active. |
_status | Status of constraint to become active. |
returnValue Constraints::moveInactiveToActive | ( | int | number, |
SubjectToStatus | _status | ||
) |
Moves index of a constraint from index list of inactive to that of active constraints.
number | Number of constraint to become active. |
_status | Status of constraint to become active. |
Constraints & Constraints::operator= | ( | const Constraints & | rhs | ) |
Assignment operator (deep copy).
rhs | Rhs 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).
rhs | Rhs object. |
Constraints& Constraints::operator= | ( | const Constraints & | rhs | ) |
Assignment operator (deep copy).
rhs | Rhs object. |
Constraints& Constraints::operator= | ( | const Constraints & | rhs | ) |
Assignment operator (deep copy).
rhs | Rhs object. |
returnValue Constraints::print | ( | ) |
Prints information on constraints object (in particular, lists of inactive and active constraints.
returnValue Constraints::print | ( | ) |
Prints information on constraints object (in particular, lists of inactive and active constraints.
Definition at line 384 of file external_packages/qpOASES-3.0beta/src/Constraints.cpp.
|
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( {c1,c2,c3,c4,c5,c6} ) = {c3,c4,c5,c6,c1,c2}
offset | Rotation offset within the range [0,n]. |
Implements SubjectTo.
|
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}
offset | Rotation offset within the range [0,n]. |
Implements SubjectTo.
Definition at line 309 of file external_packages/qpOASES-3.0beta/src/Constraints.cpp.
|
inline |
Sets number of implicit equality constraints.
n | Number of implicit equality constraints. |
|
inline |
Sets number of implicit equality constraints.
n | Number of implicit equality constraints. |
|
inline |
Sets number of "real" inequality constraints.
n | Number of "real" inequality constraints. |
|
inline |
Sets number of "real" inequality constraints.
n | Number of "real" inequality constraints. |
|
inline |
Sets number of unbounded constraints (i.e. without any bounds).
n | Number of unbounded constraints (i.e. without any bounds). |
|
inline |
Sets number of unbounded constraints (i.e. without any bounds).
n | Number of unbounded constraints (i.e. without any bounds). |
|
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.
_status | Desired initial status for all bounds. |
Definition at line 446 of file external_packages/qpOASES-3.0beta/src/Constraints.cpp.
|
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.
_status | Desired initial status for all bounds. |
returnValue Constraints::setupAllInactive | ( | ) |
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!
Definition at line 155 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/SRC/Constraints.cpp.
returnValue Constraints::setupAllInactive | ( | ) |
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!
returnValue Constraints::setupAllInactive | ( | ) |
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!
returnValue Constraints::setupAllInactive | ( | ) |
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!
returnValue Constraints::setupAllLower | ( | ) |
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!
Definition at line 168 of file external_packages/qpOASES-3.0beta/src/Constraints.cpp.
returnValue Constraints::setupAllLower | ( | ) |
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!
returnValue Constraints::setupAllUpper | ( | ) |
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!
Definition at line 177 of file external_packages/qpOASES-3.0beta/src/Constraints.cpp.
returnValue Constraints::setupAllUpper | ( | ) |
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!
returnValue Constraints::setupConstraint | ( | int | _number, |
SubjectToStatus | _status | ||
) |
Initially adds number of a new (i.e. not yet in the list) constraint to a given index set.
_number | Number of new constraint. |
_status | Status of new constraint. |
Definition at line 119 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/SRC/Constraints.cpp.
returnValue Constraints::setupConstraint | ( | int | _number, |
SubjectToStatus | _status | ||
) |
Initially adds number of a new (i.e. not yet in the list) constraint to a given index set.
_number | Number of new constraint. |
_status | Status of new constraint. |
returnValue Constraints::setupConstraint | ( | int | number, |
SubjectToStatus | _status | ||
) |
Initially adds number of a new (i.e. not yet in the list) constraint to a given index set.
number | Number of new constraint. |
_status | Status of new constraint. |
returnValue Constraints::setupConstraint | ( | int_t | number, |
SubjectToStatus | _status | ||
) |
Initially adds number of a new (i.e. not yet in the list) constraint to a given index set.
number | Number of new constraint. |
_status | Status of new constraint. |
|
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}
offset | Shift 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.
|
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 doubled, e.g. for offset = 2:
shift( {c1,c2,c3,c4,c5,c6} ) = {c3,c4,c5,c6,c5,c6}
offset | Shift offset within the range [0,n/2] and integer divisor of n. |
Implements SubjectTo.
|
protected |
Index list of active constraints.
Definition at line 169 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/INCLUDE/Constraints.hpp.
|
protected |
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::n |
Total number of constraints.
Definition at line 58 of file Constraints.h.
|
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.
|
protected |
Number of implicit equality constraints.
Definition at line 165 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/INCLUDE/Constraints.hpp.
|
protected |
Number of "real" inequality constraints.
Definition at line 166 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/INCLUDE/Constraints.hpp.
BooleanType Constraints::noLower |
This flag indicates if there is no lower bound on any variable.
Definition at line 63 of file Constraints.h.
BooleanType Constraints::noUpper |
This flag indicates if there is no upper bound on any variable.
Definition at line 64 of file Constraints.h.
|
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.
SubjectToStatus Constraints::status[NCMAX] |
Status of constraints.
Definition at line 61 of file Constraints.h.
SubjectToType Constraints::type[NCMAX] |
Type of constraints.
Definition at line 60 of file Constraints.h.