Simulation#
Every simulator returns a SimulationResult (ag.sim).
Results#
Frames of a simulation on a graph. |
Result types#
Counts of each state across runs, on a common time grid. |
Schedule results#
A simulated schedule: frames at every event time plus the task log. |
|
Distribution of the makespan over many simulated schedules. |
|
One attempt of a task: which worker ran it, when, and how it ended ( |
Compartmental models#
A network compartmental model. |
|
Susceptible → Infected at |
|
SI plus recovery back to susceptible at |
|
Susceptible → Infected ( |
|
SIR with a latent Exposed state left at rate |
|
SIR whose immunity wanes at rate |
|
SEIR where infected nodes recover at |
One-call shortcuts#
- aryagraph.sim.compartmental.si(g: Any, beta: float, **kwargs: Any) SimulationResult[source]#
Simulate
SI()on g; keyword arguments go toCompartmentalModel.simulate().
- aryagraph.sim.compartmental.sis(g: Any, beta: float, gamma: float, **kwargs: Any) SimulationResult[source]#
Simulate
SIS()on g (seeCompartmentalModel.simulate()).
- aryagraph.sim.compartmental.sir(g: Any, beta: float, gamma: float, **kwargs: Any) SimulationResult[source]#
Simulate
SIR()on g (seeCompartmentalModel.simulate()).
- aryagraph.sim.compartmental.seir(g: Any, beta: float, sigma: float, gamma: float, **kwargs: Any) SimulationResult[source]#
Simulate
SEIR()on g (seeCompartmentalModel.simulate()).
- aryagraph.sim.compartmental.sirs(g: Any, beta: float, gamma: float, xi: float, **kwargs: Any) SimulationResult[source]#
Simulate
SIRS()on g (seeCompartmentalModel.simulate()).
- aryagraph.sim.compartmental.seird(g: Any, beta: float, sigma: float, gamma: float, mu: float, **kwargs: Any) SimulationResult[source]#
Simulate
SEIRD()on g (seeCompartmentalModel.simulate()).
Cascades and influence#
Simulate one independent cascade from seeds. |
|
Simulate the linear threshold model from seeds. |
|
Expected final number of active nodes from seeds, by Monte Carlo. |
|
Pick k seeds greedily by marginal gain in expected spread (CELF). |
Walks, opinions and diffusion#
Simulate independent random walkers. |
|
Exact stationary distribution |
|
Row-stochastic transition matrix of the walk (graph order; dangling rows uniform). |
|
Classic voter model with random-sequential updates. |
|
Synchronous majority rule. |
|
DeGroot averaging |
|
Deffuant–Weisbuch bounded-confidence model on opinions in [0, 1]. |
|
Exact heat flow |
|
Kuramoto phase oscillators coupled along the graph. |
Scheduling and ensembles#
Simulate running the tasks of dag on a pool of workers. |
|
Makespan distribution and task criticality by Monte Carlo. |
|
Run |