Diff eq parameter estimation

Dear DiffEq.jl users,
I have N-body parallel (independent) simulation. Roughly, after applying most important optimizations like non-allocating and avoiding globals, my simulation for N=1000 runs for 5mins. This is all after choosing the optimum algorithm (given the precision requirements) and saving very few datapoints. I need to optimize for one of the quantities after the simulation ends. It’s a function aggregating all N=1000 particles. Think like a total phase-space volume of all particles after some process.

I need to minimize this quantity (phase space volume at the end) by tuning some of parameters of the diff equation. Given the long computation time of the problem, running typical parameter optimization via https://diffeqparamestim.sciml.ai/dev/methods/recommended_methods does not work very well for me, as it does not shy on running the solver over and over again (I believe it assumes that running the diffeq should be fairly fast). I thought of using Surrogates.jl as it might handle high-cost optimizations better. I’m not so sure how to handle this issue properly.

Perhaps some of the more experienced members of the community could help out?

1 Like

As the question is fairly open ended I’m open to any ideas and suggestions.
Things I do not think are possible:

  1. Speeding the simulation significantly
  2. Running on GPU
  3. Reducing tolerances

Molly.jl has some functionality for differentiable physical simulations, which may help here. You can get the relevant gradients and use the optimiser of your choice.

See the specific docs here, I warn you though it is experimental and likely to change. I’m hoping to have more time to work on it in the next few months and link it with the SciML ecosystem, at which point this is exactly the kind of problem it should be suited to.

1 Like