File numerics/src/SOCP/SOCLCP_Solvers.h

Go to the source code of this file

Subroutines for the resolution of Second Order Cone Linear Complementarity Problem (SOCLCP).

Typedefs

typedef void (*ComputeError_soclcp_Ptr)(SecondOrderConeLinearComplementarityProblem *, double *, double *, double, SolverOptions *, double *)

pointer to function used to update v and compute error

typedef void (*FreeSolver_soclcp_Ptr)()

pointer to function used to free memory for objects used in solvers

typedef void (*FreeSolverNSGS_soclcp_Ptr)(SecondOrderConeLinearComplementarityProblem *, SecondOrderConeLinearComplementarityProblem *, SolverOptions *)

pointer to function used to free memory for objects used in nsgs solvers

typedef void (*internalSolver_soclcp_Ptr)(SecondOrderConeLinearComplementarityProblem *, double *, double *, int *, SolverOptions *)

pointer to function used to call internal solver for proximal point solver

typedef void (*PostSolver_soclcp_Ptr)(int, double *)

pointer to function used to post-processed results after a call to the (local) solver

typedef int (*Solver_soclcp_Ptr)(SecondOrderConeLinearComplementarityProblem *, double *, SolverOptions *)

pointer to function used to call local solver

typedef void (*Update_soclcp_Ptr)(int, SecondOrderConeLinearComplementarityProblem *, SecondOrderConeLinearComplementarityProblem *, double *, SolverOptions *)

pointer to function used to update local problem

Functions

int soclcp_checkTrivialCase(SecondOrderConeLinearComplementarityProblem *problem, double *v, double *r, SolverOptions *options)

Check for trivial solution in the SOCLCP problem.

Return
info =0 if a trivial solution has been found, else = -1
Parameters
  • problem: SecondOrderConeLinearComplementarityProblem* the problem
  • v: global vector (n), in-out parameter
  • r: global vector (n), in-out parameters
  • options: the pointer to the array of options to set

void soclcp_nsgs(SecondOrderConeLinearComplementarityProblem *problem, double *r, double *v, int *info, SolverOptions *options)

Non-Smooth Gauss Seidel solver for SOCLCP problem.

[in] dparam[0] user tolerance on the loop [in] dparam[8] the relaxation parameter omega [out] dparam[1] reached error

Parameters
  • problem: the SOCLCP problem to solve
  • v: global vector (n), in-out parameter
  • r: global vector (n), in-out parameters
  • info: return 0 if the solution is found
  • options: the solver options : [in] iparam[0] : Maximum iteration number [in] iparam[1] : error computation method : 0 : Complete error computation with v computation 1: Light error computation with incremental values on r verification of absolute error at the end 2: only light error computation (v not computed) [out]iparam[7] = iter number of performed iterations [in] iparam[8] : method uses overrelaxation [in] iparam[9] : shuffle the contact indices in the loop

The internal (local) solver must set by the SolverOptions options[1]

void soclcp_nsgs_computeqLocal(SecondOrderConeLinearComplementarityProblem *problem, SecondOrderConeLinearComplementarityProblem *localproblem, double *r, int contact, SolverOptions *options)
void soclcp_nsgs_fillMLocal(SecondOrderConeLinearComplementarityProblem *problem, SecondOrderConeLinearComplementarityProblem *localproblem, int contact)
int soclcp_nsgs_setDefaultSolverOptions(SolverOptions *options)

set the default solver parameters and perform memory allocation for NSGS

Parameters
  • options: the pointer to the array of options to set

int soclcp_setDefaultSolverOptions(SolverOptions *options, int solverId)

set the default solver parameters and perform memory allocation for soclcp

Parameters
  • options: the pointer to the options to set
  • solverId: the identifier of the solver

void soclcp_VI_ExtraGradient(SecondOrderConeLinearComplementarityProblem *problem, double *r, double *v, int *info, SolverOptions *options)

Extra Gradient solver (VI_EG) for SOCLCP problem based on a VI reformulation.

Parameters
  • problem: the SOCLCP problem to solve
  • v: global vector (n), in-out parameter
  • r: global vector (n), in-out parameters
  • info: return 0 if the solution is found
  • options: the solver options : iparam[0] : Maximum iteration number dparam[3] : rho >0

int soclcp_VI_ExtraGradient_setDefaultSolverOptions(SolverOptions *options)

set the default solver parameters and perform memory allocation for VI_EG

Parameters
  • options: the pointer to the array of options to set

void soclcp_VI_FixedPointProjection(SecondOrderConeLinearComplementarityProblem *problem, double *r, double *v, int *info, SolverOptions *options)
int soclcp_VI_FixedPointProjection_setDefaultSolverOptions(SolverOptions *options)

set the default solver parameters and perform memory allocation for DSFP

Parameters
  • options: the pointer to the array of options to set