ixa/lib.rs
1//! A framework for building discrete-event simulations
2//!
3//! Ixa is a framework designed to support the creation of large-scale
4//! discrete event simulations. The primary use case is the construction of
5//! agent-based models for disease transmission, but the approach is applicable
6//! in a wide array of circumstances.
7//!
8//! The central object of an Ixa simulation is the `Context` that is
9//! responsible for managing all the behavior of the simulation. All of the
10//! simulation-specific logic is embedded in modules that rely on the `Context`
11//! for core services such as:
12//! * Maintaining a notion of time for the simulation
13//! * Scheduling events to occur at some point in the future and executing them
14//! at that time
15//! * Holding module-specific data so that the module and other modules can
16//! access it
17//!
18//! In practice, a simulation usually consists of a set of modules that work
19//! together to provide all of the functions of the simulation. For instance,
20//! For instance, a simple disease transmission model might consist of the
21//! following modules:
22//! * A population loader that initializes the set of people represented
23//! by the simulation.
24//! * An infection seeder that introduces the pathogen into the population.
25//! * A disease progression manager that transitions infected people through
26//! stages of disease until recovery.
27//! * A transmission manager that models the process of an infected
28//! person trying to infect susceptible people in the population.
29pub mod context;
30pub use context::{Context, ExecutionPhase, IxaEvent};
31
32pub mod error;
33pub use error::IxaError;
34
35pub mod global_properties;
36pub use global_properties::{ContextGlobalPropertiesExt, GlobalProperty};
37
38pub mod network;
39pub use network::{ContextNetworkExt, Edge, EdgeType};
40
41pub mod people;
42pub use people::{
43 ContextPeopleExt, PersonCreatedEvent, PersonId, PersonProperty, PersonPropertyChangeEvent,
44};
45
46pub mod plan;
47pub mod random;
48pub use random::{ContextRandomExt, RngId};
49
50pub mod tabulator;
51pub use tabulator::Tabulator;
52
53pub mod report;
54pub use report::{ConfigReportOptions, ContextReportExt, Report};
55
56pub mod runner;
57pub use runner::{run_with_args, run_with_custom_args, BaseArgs};
58
59pub mod debugger;
60
61pub mod log;
62pub use log::{
63 debug, disable_logging, enable_logging, error, info, set_log_level, set_module_filter,
64 set_module_filters, trace, warn, LevelFilter,
65};
66
67pub mod external_api;
68mod hashing;
69pub mod numeric;
70pub mod web_api;
71
72// Re-export for macros
73pub use ctor;
74pub use paste;
75pub use rand;
76
77// Deterministic hashing data structures
78pub use crate::hashing::{HashMap, HashMapExt, HashSet, HashSetExt};