A hybrid framework for compartmental models enabling simulation-based inference | Synapse