Package: ABM 0.4.3

ABM: Agent Based Model Simulation Framework

A high-performance, flexible and extensible framework to develop continuous-time agent based models. Its high performance allows it to simulate millions of agents efficiently. Agents are defined by their states (arbitrary R lists). The events are handled in chronological order. This avoids the multi-event interaction problem in a time step of discrete-time simulations, and gives precise outcomes. The states are modified by provided or user-defined events. The framework provides a flexible and customizable implementation of state transitions (either spontaneous or caused by agent interactions), making the framework suitable to apply to epidemiology and ecology, e.g., to model life history stages, competition and cooperation, and disease and information spread. The agent interactions are flexible and extensible. The framework provides random mixing and network interactions, and supports multi-level mixing patterns. It can be easily extended to other interactions such as inter- and intra-households (or workplaces and schools) by subclassing an R6 class. It can be used to study the effect of age-specific, group-specific, and contact- specific intervention strategies, and complex interactions between individual behavior and population dynamics. This modeling concept can also be used in business, economical and political models. As a generic event based framework, it can be applied to many other fields. More information about the implementation and examples can be found at <https://github.com/junlingm/ABM>.

Authors:Junling Ma [aut, cre]

ABM_0.4.3.tar.gz
ABM_0.4.3.zip(r-4.7)ABM_0.4.3.zip(r-4.6)ABM_0.4.3.zip(r-4.5)
ABM_0.4.3.tgz(r-4.6-x86_64)ABM_0.4.3.tgz(r-4.6-arm64)ABM_0.4.3.tgz(r-4.5-x86_64)ABM_0.4.3.tgz(r-4.5-arm64)
ABM_0.4.3.tar.gz(r-4.7-arm64)ABM_0.4.3.tar.gz(r-4.7-x86_64)ABM_0.4.3.tar.gz(r-4.6-arm64)ABM_0.4.3.tar.gz(r-4.6-x86_64)
ABM_0.4.3.tgz(r-4.6-emscripten)
manual.pdf |manual.html
card.svg |card.png
ABM/json (API)
NEWS

# Install 'ABM' in R:
install.packages('ABM', repos = c('https://junlingm.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/junlingm/abm/issues

Uses libs:
  • c++– GNU Standard C++ Library v3

On CRAN:

Conda:

cpp

4.22 score 33 stars 9 scripts 345 downloads 30 exports 2 dependencies

Last updated from:127bd3a862. Checks:13 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK169
linux-devel-x86_64OK119
source / vignettesOK575
linux-release-arm64OK116
linux-release-x86_64OK122
macos-release-arm64OK181
macos-release-x86_64OK243
macos-oldrel-arm64OK154
macos-oldrel-x86_64OK224
windows-develOK129
windows-releaseOK168
windows-oldrelOK105
wasm-releaseOK107

Exports:addAgentAgentclearEventsContactEventgetAgentgetIDgetSizegetStategetTimegetWaitingTimeleavematchStatenewAgentnewConfigurationModelnewCounternewEventnewExpWaitingTimenewGammaWaitingTimenewPopulationnewRandomMixingnewStateLoggerPopulationschedulesetDeathTimesetStatesetStatesSimulationstateMatchunschedule

Dependencies:R6Rcpp

Readme and manuals

Help Manual

Help pageTopics
Agent Based Model Simulation FrameworkABM-package ABM
add an agent to a populationaddAgent
R6 class that represent an agentAgent
Unschedule all event from an agentclearEvents
An R6 class that implements a contact pattern in RContact
R6 class to create and represent an eventEvent
Get the agent at an index in the populationgetAgent
Get the ID of the agent.getID
Get the size of a populationgetSize
Get the state of the agentgetState
returns the event timegetTime
Generate a waiting time from an WaitingTime objectgetWaitingTime
leave the population that the agent is inleave
Check if the state of an agent matches a given statematchState
Create an agent with a given statenewAgent
Creates a random network using the configuration modelnewConfigurationModel
Create a logger of the Counter classnewCounter
Creates a new event in RnewEvent
Creates an exponentially distributed waiting timenewExpWaitingTime
Creates an gamma distributed waiting timenewGammaWaitingTime
Create a new populationnewPopulation
Creates a RandomMixing objectnewRandomMixing
Create a logger of the StateLogger classnewStateLogger
R6 class that represents a populationPopulation
Schedule (attach) an event to an agentschedule
set the time of death for an agentsetDeathTime
Set the state of the agentsetState
Set the state for each agent in a populationsetStates
R6 class Create and represent a Simulation objectSimulation
The state of an agentState
Check if two states matchstateMatch
Unschedule (detach) an event from an agentunschedule