Download presentation

Presentation is loading. Please wait.

Published byTyler Mayhall Modified over 2 years ago

1
New Mexico Computer Science For All Designing and Running Simulations Maureen Psaila-Dombrowski

2
Models vs. Simulations Model ▫The actual program ▫The abstraction of the real world ▫Captures the elements of the system and the behavior of the elements being modeled Simulation ▫Running the model to simulate the passage of time ▫Exploring the behavior of the modeled system over time. ▫In studying complex systems, sometime unexpected patterns emerge that weren’t explicitly programmed into the model.

3
Simulations on Your Computer Why? Once the model is developed ▫Can run many trials ▫Can run many parameters Can develop models for situations where experimentation is difficult ▫Too dangerous ▫Too expensive ▫Too time intensive

4
Deterministic vs. Stochastic Two types of simulation models: ▫Deterministic simulation models: Provide single outputs for each set of inputs No Randomness involved ▫Stochastic simulation models Can produce somewhat different outputs for each set of inputs Randomness IS involved Agent-based models of Complex Adaptive Systems have Randomness -> they are stochastic Look at the probability distribution of possible outcomes.

5
How to run a Simulation Simple parameter sweeping (one dimension) ▫Hold all other variables constant ▫Set min, max, and increment for one variable. ▫Sweep one variable (from min to max value) Repetition – Because the models are stochastic ▫Repetitions at each setting ▫Take the average? What output do you want?

6
Ant Foraging Model Food piles Ants wander around looking for food Ant finds a piece of food ▫Carries the food back to the nest ▫Drops a chemical as it moves – trail Chemical evaporation Chemical diffusion Other ants find the chemical trail, ▫Follow the chemical to food ▫Carries the food back to the nest ▫Reinforce chemical trail Repeated until there is no more food in that pile.

7
Show model

8
Ant Foraging Experiment/Simulation Three Parameters ▫Number of ants (0-200) ▫Diffusion rate (0-99) How quickly the chemical diffuses How wide the trail is ▫Evaporation rate (0-99) How fast the chemical evaporates How long the trail lasts

9
Ant Foraging Experiment/Simulation NEED TO KNOW WHAT OUTPUT DATA you are collecting…. Is it food left after # ticks? Is it ticks before all food is found?

10
Parameter Sweeping Picking Sample Points (where and how many) ▫Make sense no ants does not make sense ▫Must represent the variable or parameter being explored Extremes are not enough ▫2 points = line…. assumption Must use points in the middle ▫More points if behavior is complicated

11
Ant Simulation – Parameter Sweeping Parameter Sweeping ▫Ants (3 sample points) 50, 100, 200 ▫Diffusion rate (4 sample points) 0, 33, 66, 99 ▫Evaporation rate (4 sample points) 0, 33, 66, 99 Total Number of sampling points ▫3 x 4 x 4 ▫48 sample points

12
Repetitions Stochastic model Must run repetitions at each sample point How many repetitions? ▫How random is the process? ▫Up to the experimenter – YOU!

13
Ant Simulation - Repetitions I get to decide ▫Run the model to see how random ▫5 repetitions How many experiments? (number of sample points) x (number of repetitions) ( 48 ) x ( 5) = 240 Can Limit Experiments ▫Fix the number of ants to 100 (number of sample points) x (number of repetitions) ( 4 x 4 ) x ( 5) = 80

14
What Output? Simulation Output depends on the model ▫Number of ticks ▫Number of agents ▫Number of patches of color Epidemic model ▫Ticks until everyone infected ▫Number of agents infected after number of ticks Ants Model ▫Amount of food left after # ticks ▫Ticks before all food is found ▫Ticks before all found gathered

15
Show program running – not stopping

16
Stopping Forever Button Forever GO button can go forever Want an accurate measurement Automatically Stop the Forever GO button ▫Conditional Stop at the TOP of GO procedure to go if condition? [ stop ]... end

17
Show Stop in program

18
Table of Results

19
Graph of Results

21
Computer Simulation Write-up: Must include enough replication ▫Description of problem of interest and abstraction ▫Description of Model Assumptions/Simplifications Variables/Parameters ▫Description of Simulation Parameter Sweeping Repetitions ▫Description of Results Verbal Description Tables/Graphs ▫Discussion of Results/Conclusions

22
Summary Model – The program that captures the elements of the system being modeled and the behavior of those elements Simulation - Running the model to explore the behavior of the modeled system over time. Deterministic simulation models: Provide single outputs for each set of inputs because No Randomness involved Stochastic simulation models: produce different outputs for each set of inputs because Randomness IS involved Agent-based models of Complex Adaptive Systems have Randomness -> they are stochastic Look at the probability distribution of possible outcomes. How to perform a Stochastic Simulation Parameter Sweeping Repetition When you write up simulation results must include enough detail for simulation to be repeated and explained

Similar presentations

Presentation is loading. Please wait....

OK

1 Monte-Carlo Simulation Simulation with Spreadsheets.

1 Monte-Carlo Simulation Simulation with Spreadsheets.

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Ppt on human eye and colourful world free download Ppt on formal letter writing Ppt on bluetooth technology download Ppt on fire extinguisher types for electronics Ppt on operating system structure Ppt on pricing policy for new products Ppt on instrument landing system mark Ppt on model view controller framework Ppt on condition monitoring systems Ppt on current affairs 2013