This is a very very early announcement (please let me know if I’m doing bullshit )
I’m working on a package for non-smooth dynamical systems, aka differential inclusions, aka dynamical complementarity problems.
Current state (almost trivial):
Right now, the package is just a few lines of code and has only one feature:
- It can solve a first-order dynamic complementarity problem of this form
with a numerical method that approximates Moreau’s catch-up scheme
With a suitable approximation of the projections P_S. That is related to solving linear complementarity problems.
Next steps:
I’m planning on extending the package to provide:
- first: more solvers (first: classical linear complementarity solvers, then, interfaces to other Julia packages)
- sparse interfaces for constraints (e.g., for non-overlap between objects in contact mechanics)
- later: better, more general interface
Small demo:
using DifferentialInclusions, OrdinaryDiffEq
cons = (
u -> u[1],
u -> 2.0 - u[2],
u -> abs(u[1] - u[2]) - 1.0
)
ode = ODEProblem( (u, p, t) -> -p[1] * u, [0.0, 2.0], (0.0,1.0), [10.0])
prob = DIProblem(ode, cons)
# OSPJ: one-step projected Jacobi method
alg = ProjectiveMethod(OSPJ(),Euler())
sol = solve(prob, alg, dt = 0.001)
Questions:
If there are related Julia packages, or, if you are interested in such problems, let me know
Related github issue: Differential inclusions/Dynamic complementary problems · Issue #958 · SciML/DifferentialEquations.jl · GitHub
Note: I’m preparing the package mainly for a publication where I want to compare a few numerical methods.