KarrLab / wc_sim

A multi-algorithmic simulator for whole-cell models
MIT License
6 stars 2 forks source link

Improve ODE submodels #38

Open artgoldberg opened 5 years ago

artgoldberg commented 5 years ago
  1. Get multiple ODE submodels working concurrently. see: https://stackoverflow.com/q/34291639 If this can be achieved, remove locking from odes.py. Alternatively, just merge them mathematically.

  2. Tune performance: a) exchange arrays with LocalSpeciesPopulation b) Make self.time_step dynamic, with longer time steps when the ODE solver uses larger internal steps and shorter ones when it uses shorter internal steps; tune self.time_step so the number of internal steps per time step approximates a pre-determined optimum. c) In compute_population_change_rates, calculate each rate law only once. Possible approach: i) make a static, sparse stoichiometric matrix Srs of the reactions integrated by ODE submodel ii) Ar = [r.eval() for r in all_rate_laws] iii) get rate(species) = sum over species s(Ar * Srs)

  3. Use UniformSequence to schedule event times