Skip to content

SciML/ComplementaritySolve.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

154 Commits
 
 
 
 
 
 
 
 
 
 
 
 

ComplementaritySolve.jl

A package for solving complementarity problems in Julia with scalable gradients compatible with ChainRules.

Installation

import Pkg
Pkg.add("https://github.com:avik-pal/ComplementaritySolve.jl.git")

Implemented Problems & Algorithms

LCP Solvers

Solver Native Batching CPU CUDA1 Details
NonlinearReformulation ✔️ ✔️ ✔️
RPGS ✔️
PGS ✔️
PSOR ✔️
BokhovenIterativeAlgorithm ✔️ ✔️ ✔️ Assumes PSD M
InteriorPointMethod ✔️ ✔️ ✔️ Assumes PSD M

Solvers that don't natively support batching, use threads to solve multiple problems in parallel.

MCP Solvers

Solver CPU CUDA1 Details
NonlinearReformulation ✔️ ✔️
PATHSolver ✔️
  • Provides an uniform API to access path.c
  • Only Float64 is supported, all inputs will be cast to Float64.

All LCPs, MLCPs, and NCPs can be converted to MCPs, and these solvers can be used directly.

Adjoint Methods

Method Problem Type Native Batching CPU CUDA1 Details
LinearComplementarityAdjoint LCP ✔️ ✔️ ✔️
MixedComplementarityAdjoint MCP ✔️ ✔️

Usage

More details are WIP. Examples can be found in test directory.

Current Unique Features of ComplementaritySolve.jl:

  • Supports batched problems for LCPs.
  • Can use any arbitrary forward solver. If Siconos is faster, we can use that solver, and we will still be able to give gradients to the end user.
  • Most solvers should work on GPUs OOTB.
  • Scalable Adjoint computation using Linear Solve trick rather than computing explicit Jacobians like ParametricMCPs.jl.
    • If solver thinks problem is small enough, we still construct the Jacobian.

Footnotes

  1. Solvers internally using NonlinearSolve.jl need to use a CUDA compatible solver (like SimpleNewtonRaphson()). 2 3

About

No description, website, or topics provided.

Resources

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

 
 
 

Contributors

Languages