s13/s27:agent-based modeling for public health (part 1)
DESCRIPTION
J. Schindler, Northrop Grumman Information Services; J. Holmes, University of Pennsylvania School of MedicineTRANSCRIPT
Agent-Based Modeling for
Public Health
Jay Schindler, PhD
Northrop Grumman CorporationPublic Health Division
Atlanta, [email protected]
John H. Holmes, PhD
University of Pennsylvania School of Medicine
Center for Clinical Epidemiology and Biostatistics
Center for Public Health Initiatives
Beginnings
• Welcome
• Introduction
• Audience Assessment
• Course Overview
Schedule for today
• Session 1– Introduction to agent-based modeling
– Introduction to NetLogo
– Modeling and simulation process (part 1)
• Break
• Session 2– Modeling and simulation process (part 2)
– Developing an agent-based model with NetLogo
– Wrap-up
Introduction to
Agent-Based Modeling
“The purpose of science is not to analyze or descr ibe,
but to make useful models of the wor ld. A model is
useful if it allows us to get use out of it .”
--Edward de Bono
“Essentially, all models are wrong, but some are
useful.” --George Box
• Modeling is creating and using a simplified
representation of objects, processes, and
environments. This can help to better…
– Identify, describe, and understand the
complex interactions and relationships in
dynamic systems
– Communicate and share relevant
information or knowledge pertinent to specific
issues or domains
– Predict potential outcomes or results of a
dynamic system based on initial parameters.
What is modeling?
• Support policy development & comparison.
• Guide surveillance and data collection activities
• Discover emergent behavior in complex systems
• Identify system variables and relationships critical to system change.
• Enhance decision-making process.
• Target evaluation & monitoring of real world systems
• Provide more effective use of resources ($$$, personnel, equipment, supplies, etc.)
Benefits of modeling
• Equation Based Modeling
– Equations mathematically define conditions and changes in stocks (accumulators) and flows (processes).
– Agents are defined as an aggregate.• Consistency
• Agent Based Modeling
– Algorithms specify conditions and changes in each agent based on values of parameters
– Agents have individual characteristics• Butterfly effect
Types of modeling
Introduction to NetLogo
• Identify goals, topic, framework
• Specify agents and environments
• Determine relevant interactions
• Develop an interface & displays
• Design and create script
• Run and troubleshoot the model
• Validate and verify model
Building a model using NetLogo
• General purpose modeling software– Strong educational components
– Friendly IDE with its own procedural language
• Freely available (not open source)– Supports an API
• Cross-platform for Windows, Mac, Linux– Java based
• Extensive library of models included– Additional models freely available
– Online applets
When you open NetLogo
Here is where the
model is simulated.
We’ll discuss
these functions
as we go along.
Accessing the Models Library
1. Click on File menu
2. Select Models Library
Let’s pick one: AIDS
Setting the parameter values
Here’s where you get to adjust the
input parameters specified by the
programmer.
Starting the simulation
Clicking on the Setup button populates the model
agents parameterized with the initial conditions.
Clicking on the Go button starts the simulation, or
pauses/resumes one that is running.
Running the simulation
Display of infections over time
This simulation was stopped
after 56 agents were
infected. The agents’ colors
reflect infection status (see
legend in graph at left).
Note where an uninfected
agent is in proximity to an
infected one. In subsequent
iterations, the uninfected
agent might convert to HIV+
with some probability based
on infectiousness and
frequency of sexual contact.
• Systems Dynamics (Equation) Model
• Agent Based (Procedural) Model
Examples in NetLogo
• Who are the end users or intended audience?
• What is the purpose of the model and the questions it is
intended to answer?
• Appropriate ABM platform & model development strategy
• Identify relevant data sources and required agent-related
data
• System analysis
• Agents , agent behaviors, & agent interactions
• Backed by theory and data
• Develop model through multiple iterations
• Examine output to assure links between agent behaviors and
system behaviors
• Validate and verify model
Developing an agent-based model
• Model concept development (Conceptualization)
• Model construction (Formulation)
• Model testing (Testing)
• Model dissemination (Implementation)
Overview of the modeling process
http://www.idiagram.com/ideas/models.html
The modeling process
Model Concept Development
• What is the problem / issue / concern?
• How can we identify those HIV/AIDS communication
prevention strategies that are most cost-effective for
African countries?
Model concept development
• What is the purpose / goal of developing the
model?
• Compare communication intervention approaches that
distribute messages about using condoms so we can
understand which factors most influence their successful
adoption, help save lives, and help save African
agencies or governments financial resources.
Model concept development
• What audiences and applications are driving the
development of the model?
• HIV/AIDS interventionists: Compare effectiveness of
communication models relevant to HIV/AIDS prevention
• African HIV/AIDS health program planners: Determine
most effective strategies to reduce the spread of AIDS
Model concept development
• What level of abstraction or aggregation should the model attain?
• Function at a community level (approximately 1000 – 2500 people). Where individuals can interact with other individuals and health workers, travel to clinics or centers, and allow social interaction to play an important role.
• NOT at the level of biochemical processes within the body, nor at the national level where countries interact through policy, trade, and politics.
Model concept development
• What are the system boundaries to this model?Identify essential, aggregated, directional elements What elements are essential to generate the behavior(s) of interest and must be included in the model? What elements are deemed irrelevant and should be excluded from the model?
• Improve HIV/AIDS information levels in individuals, increase mass media messaging, change communication levels among males or females.
• Irrelevant: national leadership changes, individual drug use, individual hygiene practices
Model concept development
Model Construction
• Which agents (and environments) should be
included in (or excluded from) the model?
• Include: individuals, clinics/hospitals, mass media
channels
• Exclude: HIV/AIDS educators, sex workers, individual TV
or radio stations
Model construction
• What are the initial parameters (and their
conditions) in the agents? Are these conditions
distributed along a continuum or identical?
• Individuals have gender (m or f), HIV status (0 or 1),
communication messages from like gender (#),
communication messages from different gender (#),
mass media behavior change status (0 or 1), peer
communication behavior change status (0 or 1)
• Initial values set by input boxes. Default values are …
Model construction
• How do agents interact with other agents?
How do agents interact with the environment?
• How do variables (stocks or flows) influence
other variables (stocks or flows)? Where do
feedback loops occur?
• Individuals meet other individuals and share information.
With enough information, condom behavior changes.
• Individuals interact with mass media channel
(environment), receive information, and change condom
behavior.
Model construction
• How do exposures occur? How do agents
influence others? Are there synergistic
interactions? Does learning occur?
• Agents influence other agents through random mixing.
When two or more agents share the same space,
communication may (probabilistic) occur.
• Learning occurs when people are exposed to messages
and exceed a “mastery” threshold.
( if count > threshold then behavior := new )
Model construction
Model Testing
• Structural Validity: Model aligned to conceptual
parameters (i.e., problem, purpose, goals,
audience, applications, system boundaries)?
• Intervention models only examine communication
strategies, limiting the scope of the modeling goal (e.g.,
compare various intervention strategies)…
Model testing
• Computational Validity: Model is free of
algorithmic, mathematical, and logic errors?
• Individuals don’t save the intervention program any
money UNTIL they have adopted proactive condom
use? After individuals adopt new behavior, they save
the intervention program money indefinitely?
Model testing
• Behavioral Validity: Model is plausible over the range of variables? Parameters are responsive to changes in the system?
• Peer-to-peer communication model follows S-shaped curve typical of random mixing models where individuals reach a “threshold of exposure”
• Changing the communication success parameter influences the timeframe for the population to “absorb” the message.
Model testing
• Empirical Validity: Model provides results that
are comparable to (or compatible with) real-
world events or observations.
• Do we have data that can be used to compare predicted
and actual outcomes?
• (Need to test this when the model is more “complex and
complete.”)
Model testing
Model Dissemination
• What are the essential system structures, critical
variables, and important initial conditions that
are informative?
• Discussion of mass media intervention approaches,
mixing model of participants, exposure to messages ,
and behavioral change system.
• Assumptions of exposure to peers, permanent behavior
change, barriers to communication, gender roles
Model dissemination
• What are the synergistic effects, emergent
behaviors, and insights that illuminate
theory/practice?
• Exponential growth of peers communicating messages
can lead to rapid behavior change over time.
Model dissemination
• What are appropriate applications, policy
implications, and opportunities for careful
extrapolation from the model?
• Comparing relative exposure to different mass media
channels.
• Linking cost analyses to mass media interventions may
help clarify policy decisions for future intervention.
Model dissemination
• Model concept development (Conceptualization)– Problem Purpose/Goals Applications/Audience– Essential Elements & Exclusions: System Boundaries
• Model construction (Formulation)– Agents & Environments– Conditions & Parameters in Agents & Environments– Agent-Agent & Agent-Environment Interactions– Exposure, Influence, & Interactive Behavior– Synergistic Effects & Learning – Initial Conditions
• Model testing (Testing)– Structural validity: Model aligned to conceptual parameters– Computational validity: Eliminate algorithmic, mathematical, & logic errors– Behavioral validity: Parameter sensitivity, plausibility over variable range,
robust– Empirical validity: Results compatible with/comparable to real-world
observations
• Model dissemination (Implementation)– Essential system structures, critical variables, important initial conditions– Synergistic effects, emergent behaviors, insights that illuminate
theory/practice– Appropriate application, policy implications, opportunities for extrapolation
Review of the modeling process
• Costs: – $$ and Proprietary
– Open source or “Free”
• Training – Tutorials
– User base and support
– Developer support and software updates
• Computer programming skills required or preferred? – Java, C, Python, R, etc.?
• Educational role or capability– Interface for user development or group settings
• Power and speed
– Access to HPC, cluster or grid computing
– GPU use capability
Agent-based modeling
considerations
Modeling and Simulation in
Public Health
• MIDAS (Models of Infectious Disease Agent
Study)– https://www.epimodels.org/midas/about.do
• Maxi-Vac 1.0 & Maxi-Vac Alternative– http://www.bt.cdc.gov/agent/smallpox/vaccination/maxi-
vac/index.asp
• Complex Systems Modeling for Obesity
Research– http://www.cdc.gov/pcd/issues/2009/jul/09_0017.htm
• Milstein’s Health Bound simulation for training– http://forio.com/simulate/manager/cdc/health-bound/index.html
Modeling examples in public health
Some demonstrations
An Epidemiology Application
Modeling disease outbreaks
An Intervention Application
Modeling social or behavioral change
An Supply Chain Application
Modeling resource delivery
An Economic Application
Modeling economic evaluations
Wrap-up
• Online tutorials and introductions– Google it!
• Resource sites – SwarmWiki
• (http://www.swarm.org/index.php/Main_Page )
– Agent Based Computational Economics – Leigh Tesfatsion• (http://www.econ.iastate.edu/tesfatsi/ace.htm )
• Journals – JASSS (Journal of Artificial Societies and Social Simulation)
• (http://jasss.soc.surrey.ac.uk/JASSS.html )
• Organizations – NAACSOS
• ( http://www.casos.cs.cmu.edu/naacsos/ )
• Tools…
Resources to help you
• NetLogo (http://ccl.sesp.northwestern.edu/netlogo/ )
• Repast Simphony (http://repast.sourceforge.net/ )
• MASON (http://www.cs.gmu.edu/~eclab/projects/mason/ )
• SWARM (http://www.swarm.org/index.php/Swarm_main_page )
• AnyLogic (http://www.xjtek.com/ )
• Comparison of tools:• http://www.swarm.org/index.php/Tools_for_Agent-Based_Modelling
Agent-based modeling tools
• Albin, S. (1997). Building a system dynamics model. Part 1:
Conceptualization
http://sysdyn.clexchange.org/sdep/Roadmaps/RM8/D-4597.pdf
• Bossel, H. (2007). Systems and models: Complexity, dynamics,
evolution, sustainability. Books on Demand GmbH, Norderstedt,
Germany.
• Doran, J. (200x). Agent design for agent-based modeling.
http://cswww.essex.ac.uk/staff/doran/doran_revisedviennapaper.PD
F
• Luna-Reyes, Luis F. (2003). Model conceptualization: a critical
review.
http://sysdyn.clexchange.org/sdep/Roadmaps/RM8/D-4597.pdf
• Macal, C. & North, M. (2000). Tutorial on agent based modeling and
simulation Part 2: How to model with agents.
http://portal.acm.org/citation.cfm?id=1218130
Some references
Questions??