0% found this document useful (0 votes)
4 views21 pages

Simulation Techniques

Agent-Based Simulation (ABS) is a computational modeling approach that simulates interactions of autonomous agents to analyze system-level behavior across various fields such as social sciences, economics, and healthcare. Key components include agents, environment, rules, emergence, and adaptation, while challenges involve complexity and validation. Monte Carlo simulation is another technique used for modeling uncertainty through random sampling, applicable in finance, engineering, and project management.

Uploaded by

abdullahafaf01
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views21 pages

Simulation Techniques

Agent-Based Simulation (ABS) is a computational modeling approach that simulates interactions of autonomous agents to analyze system-level behavior across various fields such as social sciences, economics, and healthcare. Key components include agents, environment, rules, emergence, and adaptation, while challenges involve complexity and validation. Monte Carlo simulation is another technique used for modeling uncertainty through random sampling, applicable in finance, engineering, and project management.

Uploaded by

abdullahafaf01
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

Title: Agent-Based Simulation (ABS)

Subtitle: Modeling Complex Systems through Autonomous Agents


Purpose: Introduce ABS, its key concepts, applications , examples and
tools.

Lecture # 3

Teacher: Kanwal Khurshid


National Textile University Faisalabad
2

Agenda

Agent-Based Simulation
Monte carlo simulation
3

What is Agent-Based Simulation?

Agent-based simulation (ABS) is a computer model that simulates how individual agents
interact with each other and their environment. It's used to study how these
interactions affect the behavior of a system.

Or
A computational modeling approach that simulates the actions and interactions of
autonomous agents to understand system-level behavior.
4

Key Components of ABS

1. Agents:
▪ Agents are the fundamental units in an ABS. They can represent individuals, groups,
organizations, or even entire systems.
▪ Each agent has attributes (e.g., age, wealth, location) and behaviors (e.g., decision-making rules,
movement patterns).
▪ Agents can be heterogeneous, meaning they can have different attributes and behaviors.
2. Environment:
▪ The environment is the space in which agents operate. It can be physical (e.g., a grid or network)
or abstract (e.g., a social network or market).
▪ The environment can influence agent behavior and vice versa.
3. Rules:
▪ Agents follow a set of rules that dictate how they interact with each other and with the
environment.
▪ These rules can be simple or complex, deterministic or stochastic.
4. Emergence:
▪ One of the key features of ABS is the emergence of system-level properties from the
interactions of individual agents.
▪ Emergent phenomena are often unpredictable and cannot be easily deduced from the
behavior of individual agents alone.
5. Adaptation:
▪ Agents can adapt their behavior based on their experiences and changes in the
environment.
▪ This can lead to dynamic and evolving systems.
7

Applications of Agent-Based Simulation

ABS is used in a wide range of fields, including:


1.Social Sciences:
▪ Modeling social networks, opinion dynamics, and the spread of information or diseases.
▪ Studying the emergence of social norms, cooperation, and conflict.
2.Economics and Finance:
▪ Simulating markets, trade, and economic systems.
▪ Analyzing the impact of policies, market behaviors, and financial crises.
3. Ecology and Biology:
▪ Modeling ecosystems, animal behavior, and population dynamics.
▪ Studying the spread of diseases and the impact of environmental changes.
4. Urban Planning and Transportation:
▪ Simulating traffic flow, pedestrian movement, and urban growth.
▪ Analyzing the impact of infrastructure changes and policy decisions.
5. Healthcare:
▪ Modeling the spread of infectious diseases and the impact of interventions.
▪ Simulating healthcare delivery systems and patient behavior.
9

Advantages of Agent-Based Simulation

1. Flexibility:
▪ ABS can model a wide variety of systems and behaviors, making it a versatile tool for many
disciplines.
2. Heterogeneity:
▪ Agents can have diverse attributes and behaviors, allowing for more realistic and nuanced models.
3. Emergence:
▪ ABS can capture emergent phenomena that are difficult to predict or model using traditional
methods.
4. Adaptability:
▪ Agents can adapt and learn, allowing for dynamic and evolving systems.
10

Challenges and Limitations

Challenges of ABS
1.Complexity:
▪ Designing and implementing ABS models can be challenging.
2.Computational Cost:
▪ Large-scale simulations require significant computational resources.
3.Validation:
▪ Difficult to validate models, especially with real-world data.
4. Interpretability:
▪ Emergent behaviors can be hard to interpret and explain.
11

Tools for Agent-Based Simulation

• NetLogo: User-friendly, widely used in education and research.


• Repast: Java-based, suitable for complex systems.
• AnyLogic: Multi-method tool for ABS, discrete-event, and system dynamics.
• GAMA: Open-source, ideal for spatial and environmental modeling.
• MASON: High-performance Java library for large-scale simulations
12

Agent-Based Simulation Examples

Agent-based simulation (ABM) is used to model complex systems by simulating how individual
agents interact. Examples of ABM include:
• Disease spread: Simulating how diseases spread through a population, where each person is
an agent with their own attributes
• Traffic flow: Simulating how vehicles interact with each other and their environment,
including obeying traffic signals and keeping a safe distance
• Social networks: Simulating how opinions spread, and cultures evolve across social
networks
• Financial markets: Simulating how participants make decisions that affect price movements
13

Monte Carlo Simulation Examples

A Monte Carlo simulation is a computational technique used to model and analyze


complex systems by simulating a large number of random scenarios. It is widely used
in fields such as finance, engineering, physics, and project management to estimate
the probability of different outcomes and assess risk.
Or
Monte Carlo simulation is a computational method that uses random sampling to
solve problems. It's used in a variety of fields, including finance, epidemiology, and
engineering.
14

Key Concepts of Monte Carlo Simulation :

1.Random Sampling: The simulation relies on generating random inputs (often based on
probability distributions) to model uncertainty in the system.
2.Iterative Process: The simulation runs thousands or millions of iterations, each time using
different random inputs to produce a range of possible outcomes.
3.Probability Distributions: Input variables are often modeled using probability distributions
(e.g., uniform, non-uniform etc.) to reflect their uncertainty.
4.Aggregation of Results: After running all iterations, the results are aggregated to analyze the
distribution of outcomes, calculate probabilities, and make informed decisions.
15

Steps to Perform a Monte Carlo Simulation:

1. Define the Problem: Identify the system or process you want to model and the variables involved.
2. Specify Probability Distributions: Assign appropriate probability distributions to the input variables (e.g.,
uniform distribution for unknown quantities).
3. Generate Random Samples: Use random number generators to create samples from the specified
distributions.
4. Run Simulations: Perform the simulation by running the model repeatedly with the random inputs.
5. Analyze Results: Aggregate the results to determine the range of outcomes, probabilities, and key statistics
(e.g., mean, mode, median, standard deviation, confidence intervals).
16

Applications of Monte Carlo Simulation:

1. Finance: Estimating the risk of investments, valuing options, and forecasting portfolio returns.
2. Engineering: Analyzing system reliability, failure rates, and performance under uncertainty.
3. Project Management: Predicting project completion times and costs under uncertain conditions.
4. Science and Research: Modeling complex physical systems, such as particle interactions or climate
change.
5. Gaming and AI: Used in game theory and reinforcement learning to simulate decision-making
processes.
17

Problem:
We want to estimate the probability of rolling a 6 on a fair die. The theoretical probability is 1661​ (about 16.67%),
but we’ll use Monte Carlo simulation to approximate this.

Steps:
1. Define the Problem: We’re simulating rolling a die many times and counting how often a 6 appears.
2. Random Sampling: Each roll of the die is random, and each outcome (1, 2, 3, 4, 5, or 6) is equally likely.
3. Run Simulations: Roll the die (or simulate rolling it) thousands of times.
4. Analyze Results: Calculate the percentage of times a 6 appears.
18

Problem:
We want to estimate the probability of rolling a 6 on a fair die. The theoretical probability is 1661​ (about 16.67%),
but we’ll use Monte Carlo simulation to approximate this.

Simulation in Action:
Let’s say we simulate rolling the die 1,000 times. Here’s how it works:
1.Use a random number generator to simulate each roll:
1. If the number is between 1 and 6, it represents the outcome of the die.
2. For example, if the random number is 4, the outcome is 4.
2.Count how many times a 6 appears.
3.Divide the number of 6s by the total number of rolls (1,000) to estimate the probability.
19

Problem:
We want to estimate the probability of rolling a 6 on a fair die. The theoretical probability is 1661​ (about 16.67%),
but we’ll use Monte Carlo simulation to approximate this.

Example Results:
• Suppose in 1,000 rolls, a 6 appears 168 times.
• The estimated probability of rolling a 6 is:
Probability=168/1000=0.168 or 16.8%.
• This is close to the theoretical probability of 1/6​ (16.67%).
1..
20

Advantages:
• Handles complex systems with many uncertain variables.
• Provides a range of possible outcomes and their probabilities.
• Flexible and applicable to a wide variety of problems.
Limitations:
• Computationally intensive, especially for high-precision results.
• Requires accurate probability distributions for input variables.
• Results are only as good as the model and assumptions used.
Monte Carlo simulations are a powerful tool for understanding and managing uncertainty in complex
systems.
Thank You

You might also like