Solver for complemetarity-based dynamics.
Author simon-lc
4 Stars
Updated Last
1 Year Ago
Started In
May 2022

CI codecov


A solver for cone-constrained feasibility problems. The main application for this solver is implicit integration of contact dynamics.

Standard form

Problems of the following form:

find         x = [y, z, s]

subject to   f(y,z,s; p) = 0,
             z ∘ s = κ
             z, s in K = R+ x Q^1 x ... x Q^k

can be optimized for

  • x = [y, z, s]: decision variables
  • y: primal variables
  • z: dual variables
  • s: slack variables
  • p: problem parameters
  • κ: central-path parameter
  • ∘: cone product
  • K: Cartesian product of convex cones; nonnegative orthant R+ and second-order cones Q are currently implemented

Solution gradients

The solver is differentiable, and gradients of the solution (including internal solver variables) with respect to the problem parameters are efficiently computed.

Quick start

using Mehrotra

Remaining tasks

  • @turbo loop vectorization
  • in-place addition to a vector using symbolics
  • sparse allocation-free linear solve
  • warm-starting strategy (add user-provided slacks initialization method s = F(z) in general)
  • consistency logic for efficient dynamics query
  • exploit structure of the symmetric problems
  • allocation-free implementation
  • experiment with different relaxation scheduling strategies
  • add documentation
  • register package