Go to the source code of this file
Subroutines for the resolution of relay problems.
Functions
dr_latin
(RelayProblem *problem, double *z, double *w, int *info, SolverOptions *options)¶dr_latin is a specific latin (LArge Time INcrement)solver for dual relay problems.
problem
: structure that represents the Relay (M, q…) z
: a n-vector of doubles which contains the initial solution and returns the solution of the problem. w
: a n-vector of doubles which returns the solution of the problem. info
: an integer which returns the termination value: 0 = convergence, 1 = no convergence, 2 = Cholesky factorization failed, 3 = Nul diagonal term options
: struct used to define the solver(s) and its (their) parameters dr_nlgs
(RelayProblem *problem, double *z, double *w, int *info, SolverOptions *options)¶dr_nlgs is a specific nlgs (Non Linear Gauss Seidel) solver for dual relay problems.
problem
: structure that represents the Relay (M, q…) z
: a n-vector of doubles which contains the initial solution and returns the solution of the problem. w
: a n-vector of doubles which returns the solution of the problem. info
: an integer which returns the termination value: 0 = convergence, 1 = no convergence, 2 = Nul diagonal term options
: struct used to define the solver(s) and its (their) parameters void project_on_box(int n, double *restrict z, double *restrict lb, double *restrict ub)
This function computes the projection on the boxr \( [lb,ub]\) of the vector \(z\).
z
: a n-vector of doubles which returns the projection ub
: a n-vector of doubles which contains the upper bounds lb
: a n-vector of doubles which contains the lower bounds n
: size of the a n-vector void relay_avi_caoferris(RelayProblem * problem, double *restrict z, double *restrict w, int * info, SolverOptions * options)
Solve a Relay problem using the AVI framework and the solver by Cao and Ferris.
problem
: structure that represents the Relay (M, q, …) z
: vector which on call is the initial point and on exit is the solution of the problem. w
: vector for computations options
: struct used to define the solver(s) and its (their) parameters info
: an integer which returns the termination value: 0 = convergence, 1 = no convergence, relay_avi_caoferris_setDefaultSolverOptions
(SolverOptions *options)¶set the default solver parameters and perform memory allocation for AVI_CAOFERRIS
options
: struct used to define the solver(s) and its (their) parameters void relay_avi_caoferris_test(RelayProblem * problem, double *restrict z, double *restrict w, int * info, SolverOptions * options)
Solve a Relay problem using the AVI framework and the solver by Cao and Ferris.
problem
: structure that represents the Relay (M, q, …) z
: vector which on call is the initial point and on exit is the solution of the problem. w
: vector for computations options
: struct used to define the solver(s) and its (their) parameters info
: an integer which returns the termination value: 0 = convergence, 1 = no convergence, relay_avi_caoferris_test_setDefaultSolverOptions
(SolverOptions *options)¶set the default solver parameters and perform memory allocation for AVI_CAOFERRIS
options
: struct used to define the solver(s) and its (their) parameters int relay_compute_error(RelayProblem * problem, double *restrict z, double *restrict w, double tolerance, double *restrict error)
This function computes the input vector \( w = Mz + q \) and checks the validity of the vector z as a solution of the LCP : \( -(Mz + q) \in N_{[lb,ub]}(z) \) The criterion is based on \( error = \|z- proj_{[lb,ub]}(z - \rho * (M*z+q)) \|, \rho >0\) This error is divided by \( \|q\| \) and then compared to tol.
problem
: structure that represents the Relay (M, q…) z
: a n-vector of doubles which contains the initial solution and returns the solution of the problem. w
: a n-vector of doubles which returns the solution of the problem. tolerance
: threshold used to validate the solution: if the error is less than this value, the solution is accepted error
: the actual error of the solution with respect to the problem relay_enum
(RelayProblem *problem, double *z, double *w, int *info, SolverOptions *options)¶relay_enum is enum solver for relay problems.
problem
: structure that represents the Relay (M, q…) z
: a n-vector of doubles which contains the initial solution and returns the solution of the problem. w
: a n-vector of doubles which returns the solution of the problem. options
: struct used to define the solver(s) and its (their) parameters info
: an integer which returns the termination value: 0 = convergence, 1 = no convergence, 2 = Null diagonal term relay_enum_setDefaultSolverOptions
(RelayProblem *problem, SolverOptions *options)¶set the default solver parameters and perform memory allocation for ENUM
problem
: structure that represents the Relay (M, q…) options
: SolverOptions * the pointer to options to set relay_lexicolemke
(RelayProblem *problem, double *z, double *w, int *info, SolverOptions *options)¶relay_lexicolemke is a Lemke solver for relay problems.
problem
: structure that represents the Relay (M, q…) z
: a n-vector of doubles which contains the initial solution and returns the solution of the problem. w
: a n-vector of doubles which returns the solution of the problem. options
: struct used to define the solver(s) and its (their) parameters info
: an integer which returns the termination value: 0 = convergence, 1 = no convergence, relay_lexicolemke_setDefaultSolverOptions
(SolverOptions *options)¶set the default solver parameters and perform memory allocation for Lemke
options
: the pointer to options to set relay_path
(RelayProblem *problem, double *z, double *w, int *info, SolverOptions *options)¶relay_path is a resolution of the Relay with its inherent MCP formulation and using path.
problem
: structure that represents the Relay (M, q…) z
: a n-vector of doubles which contains the initial solution and returns the solution of the problem. w
: a n-vector of doubles which returns the solution of the problem. options
: struct used to define the solver(s) and its (their) parameters info
: an integer which returns the termination value: 0 = convergence, 1 = no convergence, 2 = Nul diagonal term relay_path_setDefaultSolverOptions
(SolverOptions *options)¶set the default solver parameters and perform memory allocation for PATH
options
: the pointer to options to set relay_pgs
(RelayProblem *problem, double *z, double *w, int *info, SolverOptions *options)¶relay_pgs is a projected Gauss-Seidel solver for relay problems.
problem
: structure that represents the Relay (M, q…) z
: a n-vector of doubles which contains the initial solution and returns the solution of the problem. w
: a n-vector of doubles which returns the solution of the problem. options
: the pointer to options to set info
: an integer which returns the termination value: 0 = convergence, 1 = no convergence, 2 = Null diagonal term relay_pgs_setDefaultSolverOptions
(SolverOptions *options)¶set the default solver parameters and perform memory allocation for PGS
options
: SolverOptions * the pointer to options to set relay_setDefaultSolverOptions
(RelayProblem *problem, SolverOptions *options, int solverId)¶set the default solver parameters and perform memory allocation for Relay
problem
: the RelayProblem structure which handles the problem (M,q) options
: the pointer to options to set solverId
: the identifier of the solver relay_to_lcp
(RelayProblem *problem, LinearComplementarityProblem *lcp_problem)¶This function transform a RelayProblem into a LinearComplementarityProblem.
problem
: A pointer to a Relay_problem to transform lcp_problem
: A pointer to a LinearComplementarity_problem resulting from the reformulation