Expand description
A framework for building discrete-event simulations
Ixa is a framework designed to support the creation of large-scale discrete event simulations. The primary use case is the construction of agent-based models for disease transmission, but the approach is applicable in a wide array of circumstances.
The central object of an Ixa simulation is the Context
that is
responsible for managing all the behavior of the simulation. All of the
simulation-specific logic is embedded in modules that rely on the Context
for core services such as:
- Maintaining a notion of time for the simulation
- Scheduling events to occur at some point in the future and executing them at that time
- Holding module-specific data so that the module and other modules can access it
In practice, a simulation usually consists of a set of modules that work together to provide all of the functions of the simulation. For instance, For instance, a simple disease transmission model might consist of the following modules:
- A population loader that initializes the set of people represented by the simulation.
- An infection seeder that introduces the pathogen into the population.
- A disease progression manager that transitions infected people through stages of disease until recovery.
- A transmission manager that models the process of an infected person trying to infect susceptible people in the population.
Re-exports§
pub use context::Context;
pub use context::ExecutionPhase;
pub use context::IxaEvent;
pub use error::IxaError;
pub use global_properties::ContextGlobalPropertiesExt;
pub use global_properties::GlobalProperty;
pub use network::ContextNetworkExt;
pub use network::Edge;
pub use network::EdgeType;
pub use people::ContextPeopleExt;
pub use people::PersonCreatedEvent;
pub use people::PersonId;
pub use people::PersonProperty;
pub use people::PersonPropertyChangeEvent;
pub use random::ContextRandomExt;
pub use random::RngId;
pub use tabulator::Tabulator;
pub use report::ConfigReportOptions;
pub use report::ContextReportExt;
pub use report::Report;
pub use runner::run_with_args;
pub use runner::run_with_custom_args;
pub use runner::BaseArgs;
pub use log::disable_logging;
pub use log::enable_logging;
pub use log::set_log_level;
pub use log::set_module_filter;
pub use log::set_module_filters;
pub use ctor;
pub use paste;
pub use rand;
Modules§
- context
- A manager for the state of a discrete-event simulation
- debugger
- error
- Provides
IxaError
and wraps other errors. - external_
api - global_
properties - A generic mechanism for storing context-wide data.
- log
- The
log
module defines an interface to Ixa’s internal logging facilities. Logging messages about internal behavior of Ixa. This is not to be confused with reporting, which is model-level concept for Ixa users to record data about running models. - network
- A module for modeling contact networks.
- numeric
- Vendored from statrs@0.18.0 (prec.rs), convenience wrappers around methods from the approx crate. Provides utility functions for working with floating point precision.
- people
- A generic mechanism for representing people and associated data.
- plan
- A priority queue that stores arbitrary data sorted by time and priority
- random
- report
- runner
- tabulator
- web_api
Macros§
- assert_
almost_ eq - create_
report_ trait - Use this macro to define a unique report type
- debug
- Logs a message at the debug level.
- define_
data_ plugin - Defines a new type for storing data in Context.
- define_
derived_ property - Defines a derived person property with the following parameters:
- define_
edge_ type - Define a new edge type for use with
network
. - define_
global_ property - Defines a global property with the following parameters:
- define_
multi_ property_ index - define_
person_ property - Defines a person property with the following parameters:
- define_
person_ property_ with_ default - Defines a person property with the following parameters:
- define_
rng - Use this to define a unique type which will be used as a key to retrieve
an independent rng instance when calling
.get_rng
. - error
- Logs a message at the error level.
- info
- Logs a message at the info level.
- trace
- Logs a message at the trace level.
- warn
- Logs a message at the warn level.
Enums§
- Level
Filter - An enum representing the available verbosity level filters of the logger.
Traits§
- Hash
MapExt - Provides API parity with
std::collections::HashMap
. - Hash
SetExt - Provides API parity with
std::collections::HashSet
.