File numerics/src/MLCP/MLCP_Solvers.h

Go to the source code of this file

Solvers for Mixed Linear Complementary Problems (MCLP)

See MLCP available solvers for a detailed documentation.

Functions

int mlcp_compute_error(MixedLinearComplementarityProblem *problem, double *z, double *w, double tolerance, double *error)

This function checks the validity of the vector z as a solution of the MLCP.

Return

status: 0 : convergence, 1: error > tolerance

Parameters
  • [in] problem: structure that represents the MLCP (n,m,M, q… or (A,B,C…))

  • [inout] z: a m+n-vector of doubles which contains the initial solution and returns the solution of the problem.

  • [inout] w: a m+n-vector of doubles which returns the solution of the problem.

  • [in] tolerance: threshold used to validate the solution: if the error is less than this value, the solution is accepted

  • [inout] error:

void mlcp_direct(MixedLinearComplementarityProblem *problem, double *z, double *w, int *info, SolverOptions *options)

direct solver

Parameters
  • [in] problem: MixedLinearComplementarityProblem* problem structure that represents the MLCP (n,mM, q…)

  • [out] z: a m+n-vector of doubles which contains the initial solution and returns the solution of the problem.

  • [out] w: a m+n-vector of doubles which returns the solution of the problem.

  • [out] info: an integer which returns the termination value: 0 : success,it found a solution 1 : failure,it did not find any solution

  • [inout] options: structure used to define the solver and its parameters.

void mlcp_direct_enum(MixedLinearComplementarityProblem *problem, double *z, double *w, int *info, SolverOptions *options)

direct-enum solver

Parameters
  • [in] problem: structure that represents the MLCP (n,mM, q…)

  • [out] z: a m+n-vector of doubles which contains the initial solution and returns the solution of the problem.

  • [out] w: a m+n-vector of doubles which returns the solution of the problem.

  • [out] info: an integer which returns the termination value: 0 : success,it found a solution 1 : failure,it did not find any solution

  • [inout] options: structure used to define the solver and its parameters.

void mlcp_direct_enum_set_default(SolverOptions *options)
void mlcp_direct_FB(MixedLinearComplementarityProblem *problem, double *z, double *w, int *info, SolverOptions *options)

Direct Fischer Burmeister solver.

Parameters
  • [in] problem: structure that represents the MLCP (n,mM, q…)

  • [out] z: a m+n-vector of doubles which contains the initial solution and returns the solution of the problem.

  • [out] w: a m+n-vector of doubles which returns the solution of the problem.

  • [out] info: an integer which returns the termination value: 0 : success,it found a solution 1 : failure,it did not find any solution

  • [inout] options: structure used to define the solver and its parameters.

void mlcp_direct_path(MixedLinearComplementarityProblem *problem, double *z, double *w, int *info, SolverOptions *options)

direct-path solver

Parameters
  • [in] problem: structure that represents the MLCP (n,mM, q…)

  • [out] z: a m+n-vector of doubles which contains the initial solution and returns the solution of the problem.

  • [out] w: a m+n-vector of doubles which returns the solution of the problem.

  • [out] info: an integer which returns the termination value: 0 : success,it found a solution 1 : failure,it did not find any solution

  • [inout] options: structure used to define the solver and its parameters.

void mlcp_direct_set_default(SolverOptions *options)
void mlcp_direct_simplex(MixedLinearComplementarityProblem *problem, double *z, double *w, int *info, SolverOptions *options)

direct-simplex solver

Parameters
  • [in] problem: structure that represents the MLCP (n,mM, q…)

  • [out] z: a m+n-vector of doubles which contains the initial solution and returns the solution of the problem.

  • [out] w: a m+n-vector of doubles which returns the solution of the problem.

  • [out] info: an integer which returns the termination value: 0 : success,it found a solution 1 : failure,it did not find any solution

  • [inout] options: structure used to define the solver and its parameters.

void mlcp_driver_init(MixedLinearComplementarityProblem *problem, SolverOptions *options)

General interface to initialize a solver.

Must be call for the following solvers:

  • mlcp_enum

  • mlcp_path

  • mlcp_simplex

  • mlcp_direct_enum

  • mlcp_direct_path

  • mlcp_direct_simplex

Parameters
  • [in] problem: the MixedLinearComplementarityProblem structure which handles the problem (M,q)

  • [in] options: structure used to define the solver(s) and their parameters

void mlcp_driver_reset(MixedLinearComplementarityProblem *problem, SolverOptions *options)

General interface to reset a solver.

Must be call for the following solvers:

  • mlcp_enum

  • mlcp_path

  • mlcp_simplex

  • mlcp_direct_enum

  • mlcp_direct_path

  • mlcp_direct_simplex

Parameters
  • [in] problem: the MixedLinearComplementarityProblem structure which handles the problem (M,q)

  • [in] options: structure used to define the solver(s) and their parameters

void mlcp_enum(MixedLinearComplementarityProblem *problem, double *z, double *w, int *info, SolverOptions *options)

enum solver

Parameters
  • [in] problem: structure that represents the MLCP (n,mM, q…)

  • [out] z: a m+n-vector of doubles which contains the initial solution and returns the solution of the problem.

  • [out] w: a m+n-vector of doubles which returns the solution of the problem.

  • [out] info: an integer which returns the termination value: 0 : success,it found a solution 1 : failure,it did not find any solution

  • [inout] options: structure used to define the solver and its parameters.

void mlcp_enum_set_default(SolverOptions *options)
void mlcp_FB(MixedLinearComplementarityProblem *problem, double *z, double *w, int *info, SolverOptions *options)

Fischer Burmeister solver.

Parameters
  • [in] problem: structure that represents the MLCP (n,mM, q…)

  • [out] z: a m+n-vector of doubles which contains the initial solution and returns the solution of the problem.

  • [out] w: a m+n-vector of doubles which returns the solution of the problem.

  • [out] info: an integer which returns the termination value: 0 : success,it found a solution 1 : failure,it did not find any solution

  • [inout] options: structure used to define the solver and its parameters.

void mlcp_path(MixedLinearComplementarityProblem *problem, double *z, double *w, int *info, SolverOptions *options)

path solver

Parameters
  • [in] problem: structure that represents the MLCP (n,m,M, q…)

  • [inout] z: a m+n-vector of doubles which contains the initial solution and returns the solution of the problem.

  • [inout] w: a m+n-vector of doubles which returns the solution of the problem.

  • [out] info: an integer which returns the termination value: 0 : convergence 1 : iter = itermax 2 : negative diagonal term

  • [inout] options: structure used to define the solver and its parameters.

void mlcp_pgs(MixedLinearComplementarityProblem *problem, double *z, double *w, int *info, SolverOptions *options)

mlcp_pgs (Projected Gauss-Seidel) is a basic Projected Gauss-Seidel solver for MLCP.

Parameters
  • [in] problem: structure that represents the MLCP (n,m,M, q…)

  • [inout] z: a m+n-vector of doubles which contains the initial solution and returns the solution of the problem.

  • [inout] w: a m+n-vector of doubles which returns the solution of the problem.

  • [out] info: an integer which returns the termination value: 0 : convergence 1 : iter = itermax 2 : negative diagonal term

  • [inout] options: structure used to define the solver and its parameters.

void mlcp_pgs_SBM(MixedLinearComplementarityProblem *problem, double *z, double *w, int *info, SolverOptions *options)

generic interface used to call any MLCP solver applied on a Sparse-Block structured matrix M, with a Gauss-Seidel process to solve the global problem (formulation/solving of local problems for each row of blocks)

Parameters
  • [in] problem: structure that represents the LCP (M, q…). M must be a SparseBlockStructuredMatrix

  • [inout] z: a n-vector of doubles which contains the initial solution and returns the solution of the problem.

  • [inout] w: a n-vector of doubles which returns the solution of the problem.

  • info: an integer which returns the termination value: 0 : convergence >0 : failed, depends on local solver

  • [inout] options: structure used to define the solver and its parameters.

void mlcp_pgs_sbm_set_default(SolverOptions *options)
void mlcp_pgs_set_default(SolverOptions *options)
void mlcp_psor(MixedLinearComplementarityProblem *problem, double *z, double *w, int *info, SolverOptions *options)

mlcp_psor (projected successive overrelaxation method) is a solver for MLCP.

Parameters
  • [in] problem: structure that represents the MLCP (n,m,M, q…)

  • [inout] z: a m+n-vector of doubles which contains the initial solution and returns the solution of the problem.

  • [inout] w: a m+n-vector of doubles which returns the solution of the problem.

  • [out] info: an integer which returns the termination value: 0 : convergence 1 : iter = itermax 2 : negative diagonal term

  • [inout] options: structure used to define the solver and its parameters.

void mlcp_psor_set_default(SolverOptions *options)
void mlcp_rpgs(MixedLinearComplementarityProblem *problem, double *z, double *w, int *info, SolverOptions *options)

mlcp_rpgs (Projected Gauss-Seidel) is a basic Projected Gauss-Seidel solver for MLCP.

Parameters
  • [in] problem: structure that represents the MLCP (n,m,M, q…)

  • [inout] z: a m+n-vector of doubles which contains the initial solution and returns the solution of the problem.

  • [inout] w: a m+n-vector of doubles which returns the solution of the problem.

  • [out] info: an integer which returns the termination value: 0 : convergence 1 : iter = itermax 2 : negative diagonal term

  • [inout] options: structure used to define the solver and its parameters.

void mlcp_rpgs_set_default(SolverOptions *options)
void mlcp_rpsor(MixedLinearComplementarityProblem *problem, double *z, double *w, int *info, SolverOptions *options)

mlcp_rpsor (regularized projected successive overrelaxation method) is a solver for MLCP.

Parameters
  • [in] problem: structure that represents the MLCP (n,m,M, q…)

  • [inout] z: a m+n-vector of doubles which contains the initial solution and returns the solution of the problem.

  • [inout] w: a m+n-vector of doubles which returns the solution of the problem.

  • [out] info: an integer which returns the termination value: 0 : convergence 1 : iter = itermax 2 : negative diagonal term

  • [inout] options: structure used to define the solver and its parameters.

void mlcp_rpsor_set_default(SolverOptions *options)
void mlcp_simplex(MixedLinearComplementarityProblem *problem, double *z, double *w, int *info, SolverOptions *options)

simplex solver

Parameters
  • [in] problem: structure that represents the MLCP (n,mM, q…)

  • [out] z: a m+n-vector of doubles which contains the initial solution and returns the solution of the problem.

  • [out] w: a m+n-vector of doubles which returns the solution of the problem.

  • [out] info: an integer which returns the termination value: 0 : success,it found a solution 1 : failure,it did not find any solution

  • [inout] options: structure used to define the solver and its parameters.