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 freeMixedLinearComplementarityProblem(MixedLinearComplementarityProblem *problem)

function to delete a MixedLinearComplementarityProblem

Parameters

void mixedLinearComplementarity_display(MixedLinearComplementarityProblem *p)
int mixedLinearComplementarity_newFromFile(MixedLinearComplementarityProblem *problem, FILE *file)

function to read and create a MixedLinearComplementarityProblem from a file

Return
0 if ok
Parameters

int mixedLinearComplementarity_newFromFilename(MixedLinearComplementarityProblem *problem, char *filename)
int mixedLinearComplementarity_newFromFileOld(MixedLinearComplementarityProblem *problem, FILE *file)

function to read and create a MixedLinearComplementarityProblem from a file

Return
0 if ok
Parameters

int mixedLinearComplementarity_printInFile(MixedLinearComplementarityProblem *problem, FILE *file)

function to write in a file a MixedLinearComplementarityProblem

Return
0 if ok
Parameters

MixedLinearComplementarityProblem *newMLCP(void)

create empty MLCP

Return
empy MLCP

struct MixedLinearComplementarityProblem
#include <MixedLinearComplementarityProblem.h>

The Structure that contains and defines MLCProblem.

Find \((z,w)\) such that: \( \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] \) \( u, w_{1}\) are vectors of size n. \( v, w_{2}\) are vectors of size m.

Public Members

double *A

NumericsMatrix* Bblock;.

< Bblock ? A matrix of the MLCP

double *a

a vector of the MLCP

double *B

B matrix of the MLCP.

double *b

b vector of the MLCP

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.

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

double *C

C matrix of the MLCP.

double *D

D matrix of the MLCP.

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 m

number of complementarity constraints

NumericsMatrix *M

M matrix of the MLCP.

int n

number of equality constraints

double *q

q vector of the MLCP