Base class for managing working sets of bounds and constraints. More...
#include <SubjectTo.hpp>
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.
This class manages working sets of bounds and 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/SubjectTo.hpp.
Default constructor.
Definition at line 46 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/SRC/SubjectTo.cpp.
SubjectTo::SubjectTo | ( | const SubjectTo & | rhs | ) |
Copy constructor (deep copy).
rhs | Rhs object. |
Definition at line 63 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/SRC/SubjectTo.cpp.
Destructor.
Definition at line 80 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).
rhs | Rhs object. |
Destructor.
Default constructor.
SubjectTo::SubjectTo | ( | int | _n | ) |
Constructor which takes the number of constraints or bounds.
_n | Number 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).
rhs | Rhs object. |
virtual SubjectTo::~SubjectTo | ( | ) | [virtual] |
Destructor.
returnValue SubjectTo::addIndex | ( | Indexlist *const | indexlist, |
int | newnumber, | ||
SubjectToStatus | newstatus | ||
) | [protected] |
Adds the index of a new constraint or bound to index set.
indexlist | Index list to which the new index shall be added. |
newnumber | Number of new constraint or bound. |
newstatus | Status 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.
indexlist | Index list to which the new index shall be added. |
newnumber | Number of new constraint or bound. |
newstatus | Status 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.
indexlist | Index list to which the new index shall be added. |
newnumber | Number of new constraint or bound. |
newstatus | Status of new constraint or bound. |
returnValue SubjectTo::clear | ( | ) | [protected] |
Frees all allocated memory.
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.
rhs | Rhs 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.
_type | Type of (constraints') bound. |
SubjectToStatus SubjectTo::getStatus | ( | int | i | ) | const [inline] |
Returns status of (constraints') bound.
i | Number of (constraints') bound. |
SubjectToStatus SubjectTo::getStatus | ( | int | i | ) | const [inline] |
Returns status of (constraints') bound.
i | Number of (constraints') bound. |
SubjectToStatus SubjectTo::getStatus | ( | int | i | ) | const [inline] |
Returns status of (constraints') bound.
i | Number of (constraints') bound. |
SubjectToType SubjectTo::getType | ( | int | i | ) | const [inline] |
Returns type of (constraints') bound.
i | Number of (constraints') bound. |
SubjectToType SubjectTo::getType | ( | int | i | ) | const [inline] |
Returns type of (constraints') bound.
i | Number of (constraints') bound. |
SubjectToType SubjectTo::getType | ( | int | i | ) | const [inline] |
Returns type of (constraints') bound.
i | Number of (constraints') bound. |
BooleanType SubjectTo::hasNoLower | ( | ) | const [inline] |
Returns status of lower (constraints') bounds.
BooleanType SubjectTo::hasNoUpper | ( | ) | const [inline] |
Returns status of upper bounds.
returnValue SubjectTo::init | ( | int | n | ) |
Pseudo-constructor takes the number of constraints or bounds.
n | Number 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.
returnValue SubjectTo::init | ( | int | n | ) |
Pseudo-constructor takes the number of constraints or bounds.
n | Number 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.
_n | Number of constraints or bounds. |
Reimplemented in Bounds, Constraints, Bounds, Constraints, Bounds, and Constraints.
BooleanType SubjectTo::isNoLower | ( | ) | const [inline] |
Returns status of lower (constraints') bounds.
BooleanType SubjectTo::isNoLower | ( | ) | const [inline] |
Returns status of lower (constraints') bounds.
BooleanType SubjectTo::isNoUpper | ( | ) | const [inline] |
Returns status of upper bounds.
BooleanType SubjectTo::isNoUpper | ( | ) | const [inline] |
Returns status of upper bounds.
Assignment operator (deep copy).
rhs | Rhs object. |
Definition at line 88 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/SRC/SubjectTo.cpp.
Assignment operator (deep copy).
rhs | Rhs object. |
Assignment operator (deep copy).
rhs | Rhs object. |
returnValue SubjectTo::removeIndex | ( | Indexlist *const | indexlist, |
int | removenumber | ||
) | [protected] |
Removes the index of a constraint or bound from index set.
indexlist | Index list from which the new index shall be removed. |
removenumber | Number 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.
indexlist | Index list from which the new index shall be removed. |
removenumber | Number 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.
indexlist | Index list from which the new index shall be removed. |
removenumber | Number 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}
offset | Rotation offset within the range [0,n]. |
Implemented in Bounds, and Constraints.
void SubjectTo::setNoLower | ( | BooleanType | _status | ) | [inline] |
Sets status of lower (constraints') bounds.
_status | Status of lower (constraints') bounds. |
void SubjectTo::setNoLower | ( | BooleanType | _status | ) | [inline] |
Sets status of lower (constraints') bounds.
_status | Status of lower (constraints') bounds. |
void SubjectTo::setNoLower | ( | BooleanType | _status | ) | [inline] |
Sets status of lower (constraints') bounds.
_status | Status of lower (constraints') bounds. |
void SubjectTo::setNoUpper | ( | BooleanType | _status | ) | [inline] |
Sets status of upper (constraints') bounds.
_status | Status of upper (constraints') bounds. |
void SubjectTo::setNoUpper | ( | BooleanType | _status | ) | [inline] |
Sets status of upper (constraints') bounds.
_status | Status of upper (constraints') bounds. |
void SubjectTo::setNoUpper | ( | BooleanType | _status | ) | [inline] |
Sets status of upper (constraints') bounds.
_status | Status of upper (constraints') bounds. |
returnValue SubjectTo::setStatus | ( | int | i, |
SubjectToStatus | value | ||
) | [inline] |
Sets status of (constraints') bound.
i | Number of (constraints') bound. |
value | Status of (constraints') bound. |
returnValue SubjectTo::setStatus | ( | int | i, |
SubjectToStatus | value | ||
) | [inline] |
Sets status of (constraints') bound.
i | Number of (constraints') bound. |
value | Status of (constraints') bound. |
returnValue SubjectTo::setStatus | ( | int | i, |
SubjectToStatus | value | ||
) | [inline] |
Sets status of (constraints') bound.
i | Number of (constraints') bound. |
value | Status of (constraints') bound. |
returnValue SubjectTo::setType | ( | int | i, |
SubjectToType | value | ||
) | [inline] |
Sets type of (constraints') bound.
i | Number of (constraints') bound. |
value | Type of (constraints') bound. |
returnValue SubjectTo::setType | ( | int | i, |
SubjectToType | value | ||
) | [inline] |
Sets type of (constraints') bound.
i | Number of (constraints') bound. |
value | Type of (constraints') bound. |
returnValue SubjectTo::setType | ( | int | i, |
SubjectToType | value | ||
) | [inline] |
Sets type of (constraints') bound.
i | Number of (constraints') bound. |
value | Type 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}
offset | Shift 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.
indexlist | Index list in which the indices shold be swapped. |
number1 | Number of first constraint or bound. |
number2 | Number 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.
indexlist | Index list in which the indices shold be swapped. |
number1 | Number of first constraint or bound. |
number2 | Number 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.
indexlist | Index list in which the indices shold be swapped. |
number1 | Number of first constraint or bound. |
number2 | Number of second constraint or bound. |
int SubjectTo::n [protected] |
Total number of constraints/bounds.
Definition at line 210 of file external_packages/qpOASES-3.0beta/include/qpOASES/SubjectTo.hpp.
BooleanType SubjectTo::noLower [protected] |
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.
BooleanType SubjectTo::noUpper [protected] |
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] |
Definition at line 166 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/INCLUDE/SubjectTo.hpp.
SubjectToStatus SubjectTo::status [protected] |
Status of constraints/bounds.
Definition at line 156 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/INCLUDE/SubjectTo.hpp.
SubjectToStatus* SubjectTo::status [protected] |
Status of constraints/bounds.
Definition at line 213 of file external_packages/qpOASES-3.0beta/include/qpOASES/SubjectTo.hpp.
SubjectToType SubjectTo::type [protected] |
Type of constraints/bounds.
Definition at line 155 of file examples/code_generation/mpc_mhe/getting_started_export/qpoases/INCLUDE/SubjectTo.hpp.
SubjectToType* SubjectTo::type [protected] |
Type of constraints/bounds.
Definition at line 212 of file external_packages/qpOASES-3.0beta/include/qpOASES/SubjectTo.hpp.