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

Go to the source code of this file.

Classes

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

Functions

returnValue Bounds_addIndex (Bounds *_THIS, Indexlist *const indexlist, int newnumber, SubjectToStatus newstatus)
 
returnValue Bounds_flipFixed (Bounds *_THIS, int number)
 
static IndexlistBounds_getFixed (Bounds *_THIS)
 
static IndexlistBounds_getFree (Bounds *_THIS)
 
static int Bounds_getNBV (Bounds *_THIS)
 
static int Bounds_getNFR (Bounds *_THIS)
 
static int Bounds_getNFV (Bounds *_THIS)
 
static int Bounds_getNFX (Bounds *_THIS)
 
static int Bounds_getNumberOfType (Bounds *_THIS, SubjectToType _type)
 
static int Bounds_getNUV (Bounds *_THIS)
 
static int Bounds_getNV (Bounds *_THIS)
 
static SubjectToStatus Bounds_getStatus (Bounds *_THIS, int i)
 
static SubjectToType Bounds_getType (Bounds *_THIS, int i)
 
static BooleanType Bounds_hasNoLower (Bounds *_THIS)
 
static BooleanType Bounds_hasNoUpper (Bounds *_THIS)
 
returnValue Bounds_init (Bounds *_THIS, int _n)
 
returnValue Bounds_moveFixedToFree (Bounds *_THIS, int number)
 
returnValue Bounds_moveFreeToFixed (Bounds *_THIS, int number, SubjectToStatus _status)
 
returnValue Bounds_print (Bounds *_THIS)
 
returnValue Bounds_removeIndex (Bounds *_THIS, Indexlist *const indexlist, int removenumber)
 
returnValue Bounds_rotate (Bounds *_THIS, int offset)
 
static void Bounds_setNoLower (Bounds *_THIS, BooleanType _status)
 
static void Bounds_setNoUpper (Bounds *_THIS, BooleanType _status)
 
static returnValue Bounds_setStatus (Bounds *_THIS, int i, SubjectToStatus value)
 
static returnValue Bounds_setType (Bounds *_THIS, int i, SubjectToType value)
 
returnValue Bounds_setupAll (Bounds *_THIS, SubjectToStatus _status)
 
returnValue Bounds_setupAllFree (Bounds *_THIS)
 
returnValue Bounds_setupAllLower (Bounds *_THIS)
 
returnValue Bounds_setupAllUpper (Bounds *_THIS)
 
returnValue Bounds_setupBound (Bounds *_THIS, int number, SubjectToStatus _status)
 
returnValue Bounds_shift (Bounds *_THIS, int offset)
 
returnValue Bounds_swapFree (Bounds *_THIS, int number1, int number2)
 
returnValue Bounds_swapIndex (Bounds *_THIS, Indexlist *const indexlist, int number1, int number2)
 
void BoundsCON (Bounds *_THIS, int _n)
 
void BoundsCPY (Bounds *FROM, Bounds *TO)
 

Detailed Description

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

Declaration of the Bounds class designed to manage working sets of bounds within a QProblem.

Definition in file Bounds.h.

Function Documentation

returnValue Bounds_addIndex ( Bounds _THIS,
Indexlist *const  indexlist,
int  newnumber,
SubjectToStatus  newstatus 
)

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

Definition at line 492 of file Bounds.c.

returnValue Bounds_flipFixed ( Bounds _THIS,
int  number 
)

Flip fixed bound.

Returns
SUCCESSFUL_RETURN
RET_MOVING_BOUND_FAILED
RET_INDEX_OUT_OF_BOUNDS

Definition at line 229 of file Bounds.c.

static Indexlist * Bounds_getFixed ( Bounds _THIS)
inlinestatic

Returns a pointer to fixed variables index list.

Returns
Pointer to fixed variables index list.

Definition at line 517 of file Bounds.h.

static Indexlist * Bounds_getFree ( Bounds _THIS)
inlinestatic

Returns a pointer to free variables index list.

Returns
Pointer to free variables index list.

Definition at line 508 of file Bounds.h.

static int Bounds_getNBV ( Bounds _THIS)
inlinestatic

Returns number of bounded (but possibly free) variables.

Returns
Number of bounded (but possibly free) variables.

Definition at line 472 of file Bounds.h.

static int Bounds_getNFR ( Bounds _THIS)
inlinestatic

Returns number of free variables.

Returns
Number of free variables.

Definition at line 490 of file Bounds.h.

static int Bounds_getNFV ( Bounds _THIS)
inlinestatic

Returns number of implicitly fixed variables.

Returns
Number of implicitly fixed variables.

Definition at line 463 of file Bounds.h.

static int Bounds_getNFX ( Bounds _THIS)
inlinestatic

Returns number of fixed variables.

Returns
Number of fixed variables.

Definition at line 499 of file Bounds.h.

static int Bounds_getNumberOfType ( Bounds _THIS,
SubjectToType  _type 
)
inlinestatic

Returns number of bounds with given SubjectTo type.

Returns
Number of bounds with given type.
Parameters
_typeType of bound.

Definition at line 344 of file Bounds.h.

static int Bounds_getNUV ( Bounds _THIS)
inlinestatic

Returns number of unbounded variables.

Returns
Number of unbounded variables.

Definition at line 481 of file Bounds.h.

static int Bounds_getNV ( Bounds _THIS)
inlinestatic

Returns number of variables.

Returns
Number of variables.

Definition at line 454 of file Bounds.h.

static SubjectToStatus Bounds_getStatus ( Bounds _THIS,
int  i 
)
inlinestatic

Returns status of bound.

Returns
Status of bound
ST_UNDEFINED
Parameters
iNumber of bound.

Definition at line 375 of file Bounds.h.

static SubjectToType Bounds_getType ( Bounds _THIS,
int  i 
)
inlinestatic

Returns type of bound.

Returns
Type of bound
RET_INDEX_OUT_OF_BOUNDS
Parameters
iNumber of bound.

Definition at line 363 of file Bounds.h.

static BooleanType Bounds_hasNoLower ( Bounds _THIS)
inlinestatic

Returns status of lower bounds.

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

Definition at line 435 of file Bounds.h.

static BooleanType Bounds_hasNoUpper ( Bounds _THIS)
inlinestatic

Returns status of upper bounds.

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

Definition at line 444 of file Bounds.h.

returnValue Bounds_init ( Bounds _THIS,
int  _n 
)

Initialises object with given number of bounds.

Returns
SUCCESSFUL_RETURN
RET_INVALID_ARGUMENTS
Parameters
_nNumber of bounds.

Definition at line 87 of file Bounds.c.

returnValue Bounds_moveFixedToFree ( Bounds _THIS,
int  number 
)

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 188 of file Bounds.c.

returnValue Bounds_moveFreeToFixed ( Bounds _THIS,
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 208 of file Bounds.c.

returnValue Bounds_print ( Bounds _THIS)

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

Returns
SUCCESSFUL_RETURN
RET_INDEXLIST_CORRUPTED

Definition at line 404 of file Bounds.c.

returnValue Bounds_removeIndex ( Bounds _THIS,
Indexlist *const  indexlist,
int  removenumber 
)

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

Definition at line 522 of file Bounds.c.

returnValue Bounds_rotate ( Bounds _THIS,
int  offset 
)

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( {b1,b2,b3,b4,b5,b6} ) = {b3,b4,b5,b6,b1,b2}

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

Definition at line 329 of file Bounds.c.

static void Bounds_setNoLower ( Bounds _THIS,
BooleanType  _status 
)
inlinestatic

Sets status of lower bounds.

Parameters
_statusStatus of lower bounds.

Definition at line 417 of file Bounds.h.

static void Bounds_setNoUpper ( Bounds _THIS,
BooleanType  _status 
)
inlinestatic

Sets status of upper bounds.

Parameters
_statusStatus of upper bounds.

Definition at line 426 of file Bounds.h.

static returnValue Bounds_setStatus ( Bounds _THIS,
int  i,
SubjectToStatus  value 
)
inlinestatic

Sets status of bound.

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

Definition at line 402 of file Bounds.h.

static returnValue Bounds_setType ( Bounds _THIS,
int  i,
SubjectToType  value 
)
inlinestatic

Sets type of bound.

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

Definition at line 387 of file Bounds.h.

returnValue Bounds_setupAll ( Bounds _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_BOUND_FAILED
Parameters
_statusDesired initial status for all bounds.

Definition at line 441 of file Bounds.c.

returnValue Bounds_setupAllFree ( Bounds _THIS)

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 161 of file Bounds.c.

returnValue Bounds_setupAllLower ( Bounds _THIS)

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 170 of file Bounds.c.

returnValue Bounds_setupAllUpper ( Bounds _THIS)

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 179 of file Bounds.c.

returnValue Bounds_setupBound ( Bounds _THIS,
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 125 of file Bounds.c.

returnValue Bounds_shift ( Bounds _THIS,
int  offset 
)

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 doubled, e.g. for offset = 2:
shift( {b1,b2,b3,b4,b5,b6} ) = {b3,b4,b5,b6,b5,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 265 of file Bounds.c.

returnValue Bounds_swapFree ( Bounds _THIS,
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 bound.
number2Number of second bound.

Definition at line 250 of file Bounds.c.

returnValue Bounds_swapIndex ( Bounds _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 bound.
number2Number of second bound.

Definition at line 546 of file Bounds.c.

void BoundsCON ( Bounds _THIS,
int  _n 
)

Constructor which takes the number of bounds.

Parameters
_nNumber of bounds.

Definition at line 50 of file Bounds.c.

void BoundsCPY ( Bounds FROM,
Bounds TO 
)

Copies all members from given rhs object.

Returns
SUCCESSFUL_RETURN

Definition at line 59 of file Bounds.c.



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