Nonsmooth problems formulations and available solvers#
The core of a Siconos simulation consists in writing a formulation for a given problem and choose a solver to determine the unknowns.
The different problems and their features are described below, with the available solvers for each formulation.
Write and solve a problem with Siconos#
Create a problem#
Create and describe a solver#
Solver parameters are handled by the object SolverOptions
. It defines which solver will be used, its parameters, like tolerance, possibly
handles some internal work arrays or data.
The simplest way to create and use a solver is to select the corresponding id (check the list of avalaible solver for each problem and the corresponding numbers in the pages below) and initialize the solver with this id.
Kernel (high-level) interface:
// -- C++ API --
// use solver id as a parameter for the one-step nonsmooth problem constructor
SP::OneStepNSProblem problem(new LCP(SICONOS_LCP_LEMKE));
// get options :
SP::SolverOptions options = problem->numericsSolverOptions()
// -- Python API --
import siconos.kernel as sk
lcp = sk.LCP(sk.SICONOS_LCP_LEMKE)
Numerics (low-level) interface:
// -- C/C++ API --
int id = SICONOS_LCP_LEMKE;
SolverOptions * options = solver_options_create(id);
// -- Python API --
import siconos.numerics as sn
options = sn.SolverOptions(sn.SICONOS_LCP_LEMKE)
In any case, the id is the only required input. All the other parameters have default values.
To change/update these default values explicitely set the content of iparam or dparam
or use solver_options_update_internal()
to deal with internal solvers.
e.g.:
// -- C/C++ API --
options->dparam[SICONOS_DPARAM_TOL] = 1e-12;
// Set the first internal solver of options to :enumerative:`SICONOS_FRICTION_3D_NSN_AC`
// and change internal solver maximum number of iterations
int internal_solver_number = 0;
// Reset the internal solver to SICONOS_FRICTION_3D_NSN_AC with default values for its parameters ...
solver_options_update_internal(options, internal_solver_number, SICONOS_FRICTION_3D_NSN_AC);
// and modify the max number of iterations.
options->internalSolvers[internal_solver_number].iparam[SICONOS_IPARAM_MAX_ITER] = 1000;
// -- Python API --
options.dparam[sn.SICONOS_DPARAM_TOL] = 1e-12;
options.update_internal(0, sn.SICONOS_FRICTION_3D_NSN_AC);
options.internalSolvers[0].iparam[sn.SICONOS_IPARAM_MAX_ITER] = 1000
an id (int) that uniquely identifies the solver,
iparam, an array used to save integer type parameters,
dparam, an array used to save real (double) type parameters,
internalSolvers : array of SolverOptions used to describe (optional) internal solvers
dparam indices common to all solvers#
dparam[SICONOS_DPARAM_TOL] (in): solver tolerance
dparam[SICONOS_DPARAM_RESIDU] (out): computed error
iparam indices common to all solvers#
iparam[SICONOS_IPARAM_MAX_ITER] (in): maximum number of iterations allowed
iparam[SICONOS_IPARAM_PREALLOC] (in): keep work space across calls (?), 0 (false) by default.
iparam[SICONOS_IPARAM_ITER_DONE] (out): number of iterations done
Solve a problem#
Numerics (low-level) interface:
// -- C/C++ API --
// Create the solver
int id = SICONOS_LCP_LEMKE;
SolverOptions * options = solver_options_create(id);
// Call the driver
lcp_lexicolemke(problem, z, w, info, options);
// Clear memory
solver_options_delete(&options);
// -- Python API --
import siconos.numerics as sn
options = sn.SolverOptions(sn.SICONOS_LCP_LEMKE)
// ...
sn.lcp_lexicolemke(problem, z, w, info, options)
- Variational Inequality (VI)
- Quadratic Programming problems (QP)
- Convex Quadratic Programming (ConvexQP) problems
- Linear Complementarity Problems (LCP)
- Affine Variational Inequalities (AVI)
- Mixed (Non Linear) Complementarity problem (MCP)
- Mixed Linear Complementarity Problems (MLCP)
- Problem statement
- Implementation in numerics
- Error computation
- MLCP available solvers
- Projected Gauss-Seidel (
SICONOS_MLCP_PGS
) - Projected Gauss-Seidel, SBM (
SICONOS_MLCP_PGS_SBM
) - Regularized Projected Gauss-Seidel (
SICONOS_MLCP_RPGS
) - PSOR (
SICONOS_MLCP_PSOR
) - RPSOR (
SICONOS_MLCP_RPSOR
) - PATH (Ferris) solver (
SICONOS_MLCP_PATH
) - Enumerative solver (
SICONOS_MLCP_ENUM
) - PATH + enum solver (
SICONOS_MLCP_PATH_ENUM
) - Direct + enum solver (
SICONOS_MLCP_DIRECT_ENUM
) - Simplex solver (
SICONOS_MLCP_SIMPLEX
) - Direct/Simplex solver (
SICONOS_MLCP_DIRECT_SIMPLEX
) - Direct/Path solver (
SICONOS_MLCP_DIRECT_PATH
) - Direct/Path/enum solver (
SICONOS_MLCP_DIRECT_PATH_ENUM
) - Nonsmooth Newton solver, Fisher-Burmeister (
SICONOS_MLCP_FB
) - Direct + Nonsmooth Newton solver, Fisher-Burmeister (
SICONOS_MLCP_DIRECT_FB
)
- Projected Gauss-Seidel (
- Nonlinear Complementarity Problems (NCP)
- Relay or box-constrained AVI problems
- Second Order Cone Linear Complementarity Problem (SOCLCP)
- Friction-contact problems (2 or 3D)
- Problem statement
- Implementation in numerics
- Error strategy
- Friction 2D available solvers
- Friction 3D available solvers
- Nonsmooth Gauss-Seidel (
SICONOS_FRICTION_3D_NSGS
) - Nonsmooth Gauss-Seidel, velocity version (
SICONOS_FRICTION_3D_NSGSV
) - Proximal point solver (
SICONOS_FRICTION_3D_PROX
) - Fixed-point (Tresca) (
SICONOS_FRICTION_3D_TFP
) - Nonsmooth Newton/ Alart-Curnier (
SICONOS_FRICTION_3D_NSN_AC
) - Nonsmooth Newton/ Alart-Curnier (test) (
SICONOS_FRICTION_3D_NSN_AC_TEST
) - Fixed-Point (De Saxce formulation) (
SICONOS_FRICTION_3D_DSFP
) - Fixed-Point projection (VI reformulation) (
SICONOS_FRICTION_3D_VI_FPP
) - Fixed-Point projection on cylinder (VI reformulation) (
SICONOS_FRICTION_3D_VI_FPP_Cylinder
) - Extra Gradient (VI reformulation) (
SICONOS_FRICTION_3D_VI_EG
) - Hyperplane Projection (
SICONOS_FRICTION_3D_HP
) - Fixed-Point projection (
SICONOS_FRICTION_3D_FPP
) - Extra Gradient (
SICONOS_FRICTION_3D_EG
) - Nonsmooth Newton (Fischer-Burmeister formulation) (
SICONOS_FRICTION_3D_NSN_FB
) - PATH (via GAMS) + AVI reformulation (
SICONOS_FRICTION_3D_GAMS_PATH
) - PATHVI (via GAMS) + AVI reformulation
SICONOS_FRICTION_3D_GAMS_PATHVI
) - Nonsmooth Gauss-Seidel (
SICONOS_FRICTION_3D_SOCLCP
) - PATH (via GAMS) + LCP reformulation (
SICONOS_FRICTION_3D_GAMS_LCP_PATH
) - PATHVI (via GAMS) + LCP reformulation
SICONOS_FRICTION_3D_GAMS_LCP_PATHVI
) - Nonsmooth Newton, Natural Map (
SICONOS_FRICTION_3D_NSN_NM
) - Fixed point, Panagiotopoulos (
SICONOS_FRICTION_3D_PFP
) - ADMM (
SICONOS_FRICTION_3D_ADMM
) - Newton(
SICONOS_FRICTION_3D_ONECONTACT_NSN
, …) - Projection on cone or cylinder (
SICONOS_FRICTION_3D_ONECONTACT_ProjectionOnCone
, …) - NCP Fixed Point solver (
SICONOS_FRICTION_3D_NCPGlockerFBFixedPoint
, …) - Quartic (
SICONOS_FRICTION_3D_ONECONTACT_QUARTIC
, …) - As Convex QP (
SICONOS_FRICTION_3D_CONVEXQP_CYLINDER
)
- Nonsmooth Gauss-Seidel (
- Global-Friction-contact problems (2D or 3D)
- Problem statement
- Implementation in numerics
- Error strategy
- Global Friction 3D available solvers
- NSGS (
SICONOS_GLOBAL_FRICTION_3D_NSGS
) - Nonsmooth Newton, Alart-Curnier, (
SICONOS_GLOBAL_FRICTION_3D_NSN_AC
) - PATH (GAMS) (
SICONOS_GLOBAL_FRICTION_3D_GAMS_PATH
) - PATHVI (GAMS) (
SICONOS_GLOBAL_FRICTION_3D_GAMS_PATHVI
) - Fixed-Point projection (VI reformulation) (
SICONOS_GLOBAL_FRICTION_3D_VI_FPP
) - Extra-Gradient (VI reformulation) (
SICONOS_GLOBAL_FRICTION_3D_VI_EG
) - ACLM Fixed point (
SICONOS_GLOBAL_FRICTION_3D_ACLMFP
) - ADMM (
SICONOS_GLOBAL_FRICTION_3D_ADMM
) - NSGS, with reformulation (
SICONOS_GLOBAL_FRICTION_3D_NSGS_WR
) - NSGS, velocity, with reformulation (
SICONOS_GLOBAL_FRICTION_3D_NSGS_WR
) - Proximal point, with reformulation (
SICONOS_GLOBAL_FRICTION_3D_PROX_WR
) - DeSaxce FixedPoint, with reformulation (
SICONOS_GLOBAL_FRICTION_3D_DSFP_WR
) - Tresca FixedPoint, with reformulation (
SICONOS_GLOBAL_FRICTION_3D_TFP_WR
) - Nonsmooth Newton, Alart-Curnier, with reformulation (
SICONOS_GLOBAL_FRICTION_3D_NSN_AC_WR
) - ADMM, with reformulation (
SICONOS_GLOBAL_FRICTION_3D_ADMM_WR
)
- NSGS (
- Rolling friction-contact problems
- Generic mechanical problems