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

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:
  • problem[in] the MixedLinearComplementarityProblem structure which handles the problem (M,q)

  • options[in] 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:
  • problem[in] the MixedLinearComplementarityProblem structure which handles the problem (M,q)

  • options[in] structure used to define the solver(s) and their 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:
  • problem[in] structure that represents the MLCP (n,m,M, q…)

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

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

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

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

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:
  • problem[in] structure that represents the MLCP (n,m,M, q…)

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

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

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

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

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:
  • problem[in] structure that represents the MLCP (n,m,M, q…)

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

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

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

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

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:
  • problem[in] structure that represents the MLCP (n,m,M, q…)

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

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

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

  • options[inout] 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:
  • problem[in] structure that represents the MLCP (n,m,M, q…)

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

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

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

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

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

enum solver

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

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

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

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

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

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

direct solver

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

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

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

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

  • options[inout] 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:
  • problem[in] structure that represents the MLCP (n,mM, q…)

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

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

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

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

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

direct-simplex solver

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

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

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

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

  • options[inout] 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:
  • problem[in] structure that represents the MLCP (n,mM, q…)

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

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

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

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

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

simplex solver

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

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

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

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

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

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

Fischer Burmeister solver.

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

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

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

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

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

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

Direct Fischer Burmeister solver.

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

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

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

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

  • options[inout] 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:
  • problem[in] structure that represents the LCP (M, q…). M must be a SparseBlockStructuredMatrix

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

  • w[inout] 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

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

void mlcp_lcp_lemke(MixedLinearComplementarityProblem *problem, double *z, double *w, int *info, SolverOptions *options)#
void mlcp_lcp_lemke_default(SolverOptions *options)#
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.

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

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

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

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

  • error[inout]

Returns:

status: 0 : convergence, 1: error > tolerance

void mlcp_pgs_set_default(SolverOptions *options)#
void mlcp_pgs_sbm_set_default(SolverOptions *options)#
void mlcp_rpgs_set_default(SolverOptions *options)#
void mlcp_psor_set_default(SolverOptions *options)#
void mlcp_rpsor_set_default(SolverOptions *options)#
void mlcp_direct_set_default(SolverOptions *options)#
void mlcp_direct_enum_set_default(SolverOptions *options)#
void mlcp_enum_set_default(SolverOptions *options)#