File numerics/src/MLCP/MixedLinearComplementarityProblem.h#

Go to the source code of this file

Structure used to define a Mixed Linear Complementarity Problem.

Functions

void mixedLinearComplementarity_free(MixedLinearComplementarityProblem *problem)#

function to delete a MixedLinearComplementarityProblem

Parameters:

problem – pointer to a MixedLinearComplementarityProblem to delete

MixedLinearComplementarityProblem *mixedLinearComplementarity_new(void)#

create empty MLCP

Returns:

empy MLCP

void mixedLinearComplementarity_display(MixedLinearComplementarityProblem *p)#

display a MLCP

int mixedLinearComplementarity_printInFile(MixedLinearComplementarityProblem *problem, FILE *file)#

function to write in a file a MixedLinearComplementarityProblem

Parameters:
Returns:

0 if ok

int mixedLinearComplementarity_newFromFile(MixedLinearComplementarityProblem *problem, FILE *file)#

Function to read and create a MixedLinearComplementarityProblem from a file.

Parameters:
Returns:

0 if ok

int mixedLinearComplementarity_newFromFileOld(MixedLinearComplementarityProblem *problem, FILE *file)#

Function to read and create a MixedLinearComplementarityProblem from a file.

Parameters:
Returns:

0 if ok

int mixedLinearComplementarity_newFromFilename(MixedLinearComplementarityProblem *problem, const char *filename)#

Function to read and create a MixedLinearComplementarityProblem from a file.

Parameters:
Returns:

0 if ok

MixedLinearComplementarityProblem *mixedLinearComplementarity_fromMtoABCD(MixedLinearComplementarityProblem *problem)#

Function to create a MLCP with ABCD format from M formatted MLCP.

struct MixedLinearComplementarityProblem#
#include <MixedLinearComplementarityProblem.h>

The Structure that contains and defines MLCProblem.

Find \( (z,w) \) such that:

\[\begin{split} \left\{ \begin{array}{l} M \ z + q = w \\ w_1=0 \\ 0 \le w_{2} \perp v \ge 0 \end{array} \right. \text{ with } z= \left[ \begin{array}{c} u\\ v\\ \end{array} \right] \text{ and } w= \left[ \begin{array}{c} w_{1}\\ w_{2}\\ \end{array} \right] \end{split}\]

\( u, w_{1} \) are vectors of size n. \( v, w_{2} \) are vectors of size m.

ABCD format (see “R. W. {Cottle} and J. {Pang} and R. E. {Stone}”, “The Linear Complementarity Problem, Academic Press, Inc., 1992, Section 1.5 )

\[\begin{split} \left[ \begin{array}{cc} A & C \\ D & B \\ \end{array} \right] \end{split}\]

Public Members

int isStorageType1#

boolean for storageType1 1 if the problem is saved using (M,q), 0 otherwise

int isStorageType2#

boolean for storageType2 1 if the problem is saved using (A,B,C,D,a,b), 0 otherwise

int n#

number of equality constraints

int m#

number of complementarity constraints

int *blocksRows#

The rows from blocksRows[i] to blocksRows[i+1]-1 forms a block of equalities iif bloksIsComp[i]=0, else the block is a complementarity block.

The number of total blocks is given by NbBlocks such that blocksRows[NbBlocks] = n+m

int *blocksIsComp#

if bloksIsComp[i]=0, then block i formed by the rows from blocksRows[i] to blocksRows[i+1]-1 is an equality block else the block is a complementarity block.

NumericsMatrix *M#

M matrix of the MLCP.

double *q#

q vector of the MLCP

double *A#

A matrix of the MLCP.

double *B#

B matrix of the MLCP.

double *C#

C matrix of the MLCP.

double *D#

D matrix of the MLCP.

double *a#

a vector of the MLCP

double *b#

b vector of the MLCP