Most simulation models represent systems or processes where the behavior of the system or process’s components are known or can be estimated in advance. Agent-based models are a special case - you usually do not know model dynamics in advance; instead, you obtain that information from the interaction of the agents in the model.
Agent-based simulation uses autonomous individual decision-making entities called agents that interact with other agents within their specified locality. Agents are whatever might be relevant to the system or process - vehicles, personnel, products, documents, etc. Based on the agent's individual behavior, the dynamics of the entire system or process emerges. Each agent has a set of rules to follow but they also have a degree of autonomy such that model dynamics cannot be predefined. This is because agents can have intelligence, memory, social interaction, contextual and spatial awareness, and the ability to learn.
Agent-based models share the following characteristics:
- The identification of individual entities or agents within the model.
- A set of rules that govern individual behavior.
- The premise that local entities affect each other's behavior.
Creating Agent-Based Models in ExtendSim
The agents used in agent-based modeling are programmed as ExtendSim blocks. Blocks and their enclosed data have unique searchable identities and locations within the model. The ExtendSim database and ExtendSim functions can find and send messages to blocks that have specific characteristics, locations, and values. This makes it easy to create intelligent behavior, facilitate block-to-block interaction, and cause blocks to be moved in, added to, or removed from, a model.
For example, in constructing an agent-based model of the robotic clean up of a chemical spill, you could use the inter-block communication functions in a Controller block to locate all of the Robotic Clean Up blocks in the model. The Controller could send messages to the robots asking them to move towards a spill and clean it up. The robots could send messages back to the Controller stating whether they were available or were currently being recharged, and whether they were too far from a chemical spill or close enough to be useful. The scripting and animation functions would show the robot blocks physically moving around within the model and the spill being removed.
Breaking Down Agent-Based Modeling
Let's look at a case that examines the impact of facility design on a hospital's Intensive Care Unit (ICU). Using ExtendSim, different facility designs can be compared by looking at how the ICU nurses interact with each other when requesting help to take care of patients.
In the agent-based model, when a patient requests help, the nurse (a.k.a. the agent) transitions from idle to helping the patient. Sometimes a nurse who is with their patient requests help from another nurse that is currently idle. This would force a state change in the two nurse agents:
- One nurse agent transitions from I am helping my patient to another nurse is helping me.
- While the second agent transitions from idle to I am helping another nurse.
- When the helping task is complete, both nurse agents will transition back to their idle states and with on their next task.
The ICU model begins as a state diagram. Agents are initially idle, then transition to either helping a patient or another agent. Occasionally, an agent transitions from helping a patient to being assisted by another agent. Using dynamic simulation, rules can be used to model agent behavior and control the transitions from one state to another.
Optimum facility layout can be determined based on how the agents interact with each other in each facility design.
The ICU model is a simple, yet elegant example of how you can use ExtendSim to build an agent-based model. Breaking down the dynamic model:
- Each of the nurse agents were modeled as items but their properties were contained in a database table along with their current agent state.
- Agents were held in various Queue Equation blocks (Item library) based on the agent’s current state. These Queue Equation blocks would release the agents as they transition from one state to another.
- The Link Alert block (Utilities library) is used to track when the data or structure of a database location changes.
Sample Agent-Based Model
Designing a commercial kitchen for a busy pizza making establishment is another great example of the need for agent-based modeling. The kitchen contains pizza ovens, storage, preparation, cutting, and staging areas. Crew members travel from one of these workstations to the next as they prepare, cook, cut, and stage the pizzas. How can you optimize the kitchen's pizza output while positioning the workstations such that crew members don't run into each other? Build it as a job shop model simulating the activities of crew members as they make and bake pizzas on-demand whilst learning where to move and when.
Kitchen Specifics
When a pizza is ordered, a production request is placed in a queue for the kitchen staff. Each production request consists of an ordered set of activities that are required to make each pizza. This kitchen has 4 crew members comprising its kitchen staff who are each capable of performing any of the activities required to make a pizza. Each activity is performed by the first available crew member. As more orders come in, crew members move from one activity to the next intelligently reducing the wait time between activities.
The agent-based model examines the movement of kitchen staff from one workstation to another. Kitchen workers (animated as colored circles in this example) move from workstation to workstation such that they take the shortest distance of travel while avoiding collisions with kitchen workstation equipment and other kitchen staff.
Case Studies
Thomas Edmunds, COVID Systems Analysis Group
Lawrence Livermore National Laboratory
December 2021
The SARS-CoV-2 pandemic has driven a need for models that can predict transmission among populations and test the effectiveness of proposed interventions to control it such as testing, quarantining, vaccinations, and nonpharmaceutical interventions. This report describes a hybrid approach that is mostly agent based, but utilizes Ro and time frames from ordinary differential equation (ODE) models to estimate infection rates and reduce data requirements. The ExtendSim model developed is intended to inform management decisions regarding testing and quarantine policies and technologies.
Shujing Deng, Technischen Universität München
April 3, 2020
To truly estimate the life cycle of a building, it’s important to find a way to quantify the usage intensity of its individual components. Generally, many factors have an impact on the life span of the components in a building, such as product quality, maintenance, and visitor interaction with the building components, but how can you do that in a building type where user structure and interaction are too complex to analyze, such as in a shopping mall? Using ExtendSim, Shujing Deng created an agent-based model of a real shopping mall with over 100 shops on two floors. Adding the logic of a decision-making mechanism to enable the monitoring of all the interactions between customers and the main building components in the mall, the dynamics of user-space relationships within the shopping mall can be observed, exposing the usage intensity regarding building components. Running different scenarios, simulation results indicate the usage of building components mainly depends on the total number of the consumers in the mall interacting with the objects.