Introduction¶
Features of the PRAM framework:
Models on an agent population level instead of the level of individual agents by grouping functionally equivalent agents into
groups
Allows groups of agents to be related to one or more
sites
(e.g., a school the agents attend to or a opinion they share)Lifts the domain (and thus offers lifted inference)
Models agent population mass dynamics as mass shift (or transfer) between groups
Agent population mass dynamics observes axioms of probability
Is equivalent to compartmental models but without imposing the requirement of specifying all compartments beforehand (i.e., groups are created automatically when necessary)
Additional features more specific to the implementation in the PyPRAM package:
Attempts to integrate and unify other modeling and simulation frameworks (e.g., ABMs, compartmental models, redistribution systems, ordinary-differential equations, Markov chains, etc.)
Allows modelers to compose complicated models from smaller parts called modeling primitives
Organizes modeling primitives into a multigraph
Inheritance-based hierarchies expressed within the modeling primitives multigraph explicitly encode specialization and generalization
Provides systemic diagnostics - Mass dynamics visualization - Time-frequency analysis - Recurrence quantification analysis - Etc.
Dependencies¶
pybind11 (for PyRQA)
PyOpenCL (for PyRQA)
selenium (for saving
altair
graphs)Gecko Driver and a recent version of Firefox (for saving
altair
graphs)Chrome Driver (a Chrome alternative to the above)
Gecko Driver or Chrome Driver and a recent version of either of the respective Web browser (i.e., Firefox or Chrome; for saving
altair
graphs)
Installation¶
Install PyPRAM like so:
pip install git+https://github.com/momacs/pram.git
To install all extra dependencies instead, do:
pip install git+https://github.com/momacs/pram.git#egg=pram[all]
Basic API Usage¶
…