← Back
Home › Systems › Simulation and scientific computing

epidemic-model

epidemic simulation

agent-based SEIR

SystemTechniques · 5Primitives · 15 epidemic-model Random graph modelsgraphs · medium: Erdos-Renyi, configuration model, small-world and stochastic block models for synthetic networksAgent based modelingnumerics · medium: Simulate individual agents with local rules on a grid or graph; SoA layout and parallel steppingDiscrete event simulationnumerics · medium: Simulation driven by a time-ordered event queue with deterministic, reproducible replayGillespie algorithmnumerics · medium: Exact stochastic simulation of reaction networks; next-reaction and tau-leaping variantsMarkov chain monte carlonumerics · medium: Metropolis-Hastings and Gibbs sampling: proposals, burn-in, thinning, convergenceAlias method samplingnumerics · low: Vose alias tables: O(1) sampling from a discrete distribution after O(n) setupPRNGs (PCG, xoshiro)numerics · low: Small, fast, statistically strong non-cryptographic generators: PCG32 and xoshiro256**, with seeding, parallel streams and unbiased ranges.›Structure of arrays and hot/cold sp…hardware-os · low: Store each field in its own array and keep rarely used fields apart, so a loop reads only the bytes it needs and the compiler can vectorize it.›d-ary heapdata-structures · low: Array heap with d children per node (d = 4 typical): half the binary heap's depth, siblings in one cache line, faster priority queues.›Adaptive Runge-Kutta (Dormand-Princ…numerics · low: An embedded 5(4) Runge-Kutta pair estimates each step's error for free and resizes the step to meet a tolerance; the default non-stiff solver.›Monte Carlo integrationnumerics · low: Estimate an expectation by averaging random samples; error falls as σ/√N in any dimension, and variance reduction (antithetic, control variates, importance sampling) shrinks σ.›Runge-Kutta 4numerics · low: The classic four-stage, fourth-order ODE step; error drops 16× when the step halves, with no derivatives or past steps needed.›Sparse matrices (CSR)numerics · low: Compressed sparse row stores only nonzeros as row pointers, column indices and values; SpMV streams them once, so it is memory-bandwidth bound.›Spatial hashingphysics · low: Uniform grid stored in a hash table: bucket objects by cell, test only neighbouring cells; O(n) neighbour search for many similar-sized objects such as particles.›Fenwick treedata-structures · low: Binary indexed tree for prefix sums and rank queries in O(log n) with n wordsConstrained parameter transformsnumerics · low: Map constrained parameters to unconstrained space (log, logit, simplex, Cholesky) with Jacobian correctionsMcmc convergence diagnosticsnumerics · low: R-hat, effective sample size and divergence checks for MCMC runsFast hash functionsdata-structures · low: Non-cryptographic hashes built from 64×64→128-bit multiplies and xor-shifts; pick by key size, trust level and whether the hash is persisted.›Rejection samplingml-training · low: Best-of-n and filtered sampling: generate many candidates, keep those passing a verifier or reward thresholdParallel prefix sumsearch-sort · low: Work-efficient scan (Blelloch, decoupled look-back) on CPU SIMD and GPUs; stream compaction

Similar systems

Share the most building blocks with this one.