Classes | Functions
Constraints.h File Reference
#include <qpOASES_e/Indexlist.h>
Include dependency graph for Constraints.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Constraints
 Manages working sets of constraints. More...
 

Functions

returnValue Constraints_addIndex (Constraints *_THIS, Indexlist *const indexlist, int newnumber, SubjectToStatus newstatus)
 
returnValue Constraints_flipFixed (Constraints *_THIS, int number)
 
static IndexlistConstraints_getActive (Constraints *_THIS)
 
static IndexlistConstraints_getInactive (Constraints *_THIS)
 
static int Constraints_getNAC (Constraints *_THIS)
 
static int Constraints_getNC (Constraints *_THIS)
 
static int Constraints_getNEC (Constraints *_THIS)
 
static int Constraints_getNIAC (Constraints *_THIS)
 
static int Constraints_getNIC (Constraints *_THIS)
 
static int Constraints_getNUC (Constraints *_THIS)
 
static int Constraints_getNumberOfType (Constraints *_THIS, SubjectToType _type)
 
static SubjectToStatus Constraints_getStatus (Constraints *_THIS, int i)
 
static SubjectToType Constraints_getType (Constraints *_THIS, int i)
 
static BooleanType Constraints_hasNoLower (Constraints *_THIS)
 
static BooleanType Constraints_hasNoUpper (Constraints *_THIS)
 
returnValue Constraints_init (Constraints *_THIS, int _n)
 
returnValue Constraints_moveActiveToInactive (Constraints *_THIS, int number)
 
returnValue Constraints_moveInactiveToActive (Constraints *_THIS, int number, SubjectToStatus _status)
 
returnValue Constraints_print (Constraints *_THIS)
 
returnValue Constraints_removeIndex (Constraints *_THIS, Indexlist *const indexlist, int removenumber)
 
returnValue Constraints_rotate (Constraints *_THIS, int offset)
 
static void Constraints_setNoLower (Constraints *_THIS, BooleanType _status)
 
static void Constraints_setNoUpper (Constraints *_THIS, BooleanType _status)
 
static returnValue Constraints_setStatus (Constraints *_THIS, int i, SubjectToStatus value)
 
static returnValue Constraints_setType (Constraints *_THIS, int i, SubjectToType value)
 
returnValue Constraints_setupAll (Constraints *_THIS, SubjectToStatus _status)
 
returnValue Constraints_setupAllInactive (Constraints *_THIS)
 
returnValue Constraints_setupAllLower (Constraints *_THIS)
 
returnValue Constraints_setupAllUpper (Constraints *_THIS)
 
returnValue Constraints_setupConstraint (Constraints *_THIS, int number, SubjectToStatus _status)
 
returnValue Constraints_shift (Constraints *_THIS, int offset)
 
returnValue Constraints_swapIndex (Constraints *_THIS, Indexlist *const indexlist, int number1, int number2)
 
void ConstraintsCON (Constraints *_THIS, int _n)
 
void ConstraintsCPY (Constraints *FROM, Constraints *TO)
 

Detailed Description

Author
Hans Joachim Ferreau, Andreas Potschka, Christian Kirches
Version
3.1embedded
Date
2007-2015

Declaration of the Constraints class designed to manage working sets of constraints within a QProblem.

Definition in file Constraints.h.

Function Documentation

returnValue Constraints_addIndex ( Constraints _THIS,
Indexlist *const  indexlist,
int  newnumber,
SubjectToStatus  newstatus 
)

Adds the index of a new constraint 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.
newstatusStatus of new constraint.

Definition at line 486 of file Constraints.c.

returnValue Constraints_flipFixed ( Constraints _THIS,
int  number 
)

Flip fixed constraint.

Returns
SUCCESSFUL_RETURN
RET_MOVING_CONSTRAINT_FAILED
RET_INDEX_OUT_OF_BOUNDS

Definition at line 238 of file Constraints.c.

static Indexlist * Constraints_getActive ( Constraints _THIS)
inlinestatic

Returns a pointer to active constraints index list.

Returns
Pointer to active constraints index list.

Definition at line 499 of file Constraints.h.

static Indexlist * Constraints_getInactive ( Constraints _THIS)
inlinestatic

Returns a pointer to inactive constraints index list.

Returns
Pointer to inactive constraints index list.

Definition at line 508 of file Constraints.h.

static int Constraints_getNAC ( Constraints _THIS)
inlinestatic

Returns the number of active constraints.

Returns
Number of active constraints.

Definition at line 480 of file Constraints.h.

static int Constraints_getNC ( Constraints _THIS)
inlinestatic

Returns the number of constraints.

Returns
Number of constraints.

Definition at line 444 of file Constraints.h.

static int Constraints_getNEC ( Constraints _THIS)
inlinestatic

Returns the number of implicit equality constraints.

Returns
Number of implicit equality constraints.

Definition at line 453 of file Constraints.h.

static int Constraints_getNIAC ( Constraints _THIS)
inlinestatic

Returns the number of inactive constraints.

Returns
Number of inactive constraints.

Definition at line 489 of file Constraints.h.

static int Constraints_getNIC ( Constraints _THIS)
inlinestatic

Returns the number of "real" inequality constraints.

Returns
Number of "real" inequality constraints.

Definition at line 462 of file Constraints.h.

static int Constraints_getNUC ( Constraints _THIS)
inlinestatic

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

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

Definition at line 471 of file Constraints.h.

static int Constraints_getNumberOfType ( Constraints _THIS,
SubjectToType  _type 
)
inlinestatic

Returns number of constraints with given SubjectTo type.

Returns
Number of constraints with given type.
Parameters
_typeType of constraints' bound.

Definition at line 334 of file Constraints.h.

static SubjectToStatus Constraints_getStatus ( Constraints _THIS,
int  i 
)
inlinestatic

Returns status of constraints' bound.

Returns
Status of constraints' bound
ST_UNDEFINED
Parameters
iNumber of constraints' bound.

Definition at line 365 of file Constraints.h.

static SubjectToType Constraints_getType ( Constraints _THIS,
int  i 
)
inlinestatic

Returns type of constraints' bound.

Returns
Type of constraints' bound
RET_INDEX_OUT_OF_BOUNDS
Parameters
iNumber of constraints' bound.

Definition at line 353 of file Constraints.h.

static BooleanType Constraints_hasNoLower ( Constraints _THIS)
inlinestatic

Returns status of lower constraints' bounds.

Returns
BT_TRUE if there is no lower constraints' bound on any variable.

Definition at line 425 of file Constraints.h.

static BooleanType Constraints_hasNoUpper ( Constraints _THIS)
inlinestatic

Returns status of upper bounds.

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

Definition at line 434 of file Constraints.h.

returnValue Constraints_init ( Constraints _THIS,
int  _n 
)

Initialises object with given number of constraints.

Returns
SUCCESSFUL_RETURN
RET_INVALID_ARGUMENTS
Parameters
_nNumber of constraints.

Definition at line 89 of file Constraints.c.

returnValue Constraints_moveActiveToInactive ( Constraints _THIS,
int  number 
)

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 194 of file Constraints.c.

returnValue Constraints_moveInactiveToActive ( Constraints _THIS,
int  number,
SubjectToStatus  _status 
)

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 216 of file Constraints.c.

returnValue Constraints_print ( Constraints _THIS)

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

Returns
SUCCESSFUL_RETURN
RET_INDEXLIST_CORRUPTED

Definition at line 397 of file Constraints.c.

returnValue Constraints_removeIndex ( Constraints _THIS,
Indexlist *const  indexlist,
int  removenumber 
)

Removes the index of a constraint 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 to be removed.

Definition at line 517 of file Constraints.c.

returnValue Constraints_rotate ( Constraints _THIS,
int  offset 
)

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}

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

Definition at line 322 of file Constraints.c.

static void Constraints_setNoLower ( Constraints _THIS,
BooleanType  _status 
)
inlinestatic

Sets status of lower constraints' bounds.

Parameters
_statusStatus of lower constraints' bounds.

Definition at line 407 of file Constraints.h.

static void Constraints_setNoUpper ( Constraints _THIS,
BooleanType  _status 
)
inlinestatic

Sets status of upper constraints' bounds.

Parameters
_statusStatus of upper constraints' bounds.

Definition at line 416 of file Constraints.h.

static returnValue Constraints_setStatus ( Constraints _THIS,
int  i,
SubjectToStatus  value 
)
inlinestatic

Sets status of constraints' bound.

Returns
SUCCESSFUL_RETURN
RET_INDEX_OUT_OF_BOUNDS
Parameters
iNumber of constraints' bound.
valueStatus of constraints' bound.

Definition at line 392 of file Constraints.h.

static returnValue Constraints_setType ( Constraints _THIS,
int  i,
SubjectToType  value 
)
inlinestatic

Sets type of constraints' bound.

Returns
SUCCESSFUL_RETURN
RET_INDEX_OUT_OF_BOUNDS
Parameters
iNumber of constraints' bound.
valueType of constraints' bound.

Definition at line 377 of file Constraints.h.

returnValue Constraints_setupAll ( Constraints _THIS,
SubjectToStatus  _status 
)

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 434 of file Constraints.c.

returnValue Constraints_setupAllInactive ( Constraints _THIS)

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 164 of file Constraints.c.

returnValue Constraints_setupAllLower ( Constraints _THIS)

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 174 of file Constraints.c.

returnValue Constraints_setupAllUpper ( Constraints _THIS)

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 184 of file Constraints.c.

returnValue Constraints_setupConstraint ( Constraints _THIS,
int  number,
SubjectToStatus  _status 
)

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 127 of file Constraints.c.

returnValue Constraints_shift ( Constraints _THIS,
int  offset 
)

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( {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.

Definition at line 259 of file Constraints.c.

returnValue Constraints_swapIndex ( Constraints _THIS,
Indexlist *const  indexlist,
int  number1,
int  number2 
)

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.
number2Number of second constraint.

Definition at line 542 of file Constraints.c.

void ConstraintsCON ( Constraints _THIS,
int  _n 
)

Constructor which takes the number of constraints.

Parameters
_nNumber of constraints.

Definition at line 50 of file Constraints.c.

void ConstraintsCPY ( Constraints FROM,
Constraints TO 
)

Copies all members from given rhs object.

Returns
SUCCESSFUL_RETURN

Definition at line 61 of file Constraints.c.



acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Mon Jun 10 2019 12:35:17