Chapter 11: Simulation: Modeling the Physical World

Slides:



Advertisements
Similar presentations
Chapter 5 Transfer of Training
Advertisements

Fundamentals of Probability
Copyright © 2008 Pearson Addison-Wesley. All rights reserved. Chapter 16 Unemployment: Search and Efficiency Wages.
Cost Management ACCOUNTING AND CONTROL
Chapter 9 Growth.
Chapter 1 The Study of Body Function Image PowerPoint
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide
Exit a Customer Chapter 8. Exit a Customer 8-2 Objectives Perform exit summary process consisting of the following steps: Review service records Close.
FACTORING ax2 + bx + c Think “unfoil” Work down, Show all steps.
1 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt FactorsFactors.
1 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt Wants.
CS1512 Foundations of Computing Science 2 Week 3 (CSD week 32) Probability © J R W Hunter, 2006, K van Deemter 2007.
Chapter 7 Sampling and Sampling Distributions
5.1 Probability of Simple Events
Webinar: June 6, :00am – 11:30am EDT The Community Eligibility Option.
1 (of 31) FIN 200: Personal Finance Topic 7-Project and Annuities Lawrence Schrenk, Instructor.
Computer Literacy BASICS
What is economics?.
Organizational Control and Change
Key Concepts and Skills
Addison Wesley is an imprint of © 2010 Pearson Addison-Wesley. All rights reserved. Chapter 10 Arrays and Tile Mapping Starting Out with Games & Graphics.
Chapter 11: Models of Computation
Slide 1 Diploma Macro Paper 2 Monetary Macroeconomics Lecture 2 Aggregate demand: Consumption and the Keynesian Cross Mark Hayes.
Pennsylvania Value-Added Assessment System (PVAAS) High Growth, High Achieving Schools: Is It Possible? Fall, 2011 PVAAS Webinar.
1. 2 Its almost time to take the FCAT 2.0! Here are some important explanations and reminders to help you do your very best.
Real Estate Market Analysis
Does Debt Policy Matter?
Chapter 4 Gates and Circuits.
Business and Economics 6th Edition
Chapter 2.3 Counting Sample Points Combination In many problems we are interested in the number of ways of selecting r objects from n without regard to.
The Time Value of Money.
2-1. McGraw-Hill/Irwin Copyright © 2006 The McGraw-Hill Companies, Inc. All rights reserved. 2 Money Management Skills.
Transportation and Air Traveler Characteristics Findings from the 2011 Washington-Baltimore Regional Air Passenger Survey Transportation Planning Board.
REVIEW of Chapter 14 We begin this chapter by describing a cost accounting system. We then explain the procedures used to determine costs using a job.
Chapter 1: What is Economics? Section 1
Chapter 4 Gates and Circuits.
40S Applied Math Mr. Knight – Killarney School Slide 1 Unit: Probability Lesson: PR-L1 Intro To Probability Intro to Probability Learning Outcome B-4 PR-L1.
© 2012 National Heart Foundation of Australia. Slide 2.
Science as a Process Chapter 1 Section 2.
Virginia Birch MFNERC Numeracy Specialist
Introduction to Valuation: The Time Value of Money
25 seconds left…...
1 Using one or more of your senses to gather information.
Copyright ©2004 Pearson Education, Inc. All rights reserved. Chapter 1 Overview of a Financial Plan.
Chapter 5: Time Value of Money: The Basic Concepts
Determining How Costs Behave
©Brooks/Cole, 2001 Chapter 12 Derived Types-- Enumerated, Structure and Union.
Chapter 15: Quantitatve Methods in Health Care Management Yasar A. Ozcan 1 Chapter 15. Simulation.
PSSA Preparation.
Chapter 11 Creating Framed Layouts Principles of Web Design, 4 th Edition.
Copyright © 2010, 2007, 2004 Pearson Education, Inc. Chapter 14 From Randomness to Probability.
1 Functions and Applications
The tool that could change everything 1 The Tool that could for Employees Change Everything.
Tips for Taking the FSA ELA Reading and Mathematics Assessments
Introduction into Simulation Basic Simulation Modeling.
3 - 1 Copyright McGraw-Hill/Irwin, 2005 Markets Demand Defined Demand Graphed Changes in Demand Supply Defined Supply Graphed Changes in Supply Equilibrium.
Key Concepts and Skills
Probability in Games. What is Probability? Probability is a branch of mathematics that deals with calculating the likelihood an event will _____ and is.
Programming Logic and System Analysis
1 Chapter No 3 ICT IN Science,Maths,Modeling, Simulation.
Computing and the Web Simulation. Overview n Reasons for Simulation n Building a Model n Monopoly Game Simulation n SimCity Simulation n Design of Computer.
IGCSE ICT Computer Simulation.
Probability in Games. What is Probability? Probability is a branch of mathematics that deals with calculating the likelihood an event will occur and is.
Modelling and Simulations The Kingsway School. What are Computer Models? When a real life situation is represented by computer software. Can you think.
Teaching Robots There are two ways to teach a robot how to do something: Type a program of instructions into the controlling computer. Use lead-through.
Planning Construction Chapter 15. Private Sector  Most buildings and other structures are built for ordinary people. These people make up the private.
Game Expert: SimCity Myke Olson LCC 4400: Seminar In Media Studies October 29, 2002.
Range of Computer Applications. Computer Applications Scientific Word Processing Spreadsheets E-commerce Business Educational Industrial National level.
Computer Control and Monitoring Today we will look at: What we mean by computer control Examples of computer control Sensors – analogue and digital Sampling.
Presentation transcript:

Chapter 11: Simulation: Modeling the Physical World Simulation is one of the most important uses of computers today. It allows us to visualize worlds that might not exist outside of the computer. The Computer Continuum The Computer Continuum

Simulation: Modeling the Physical World Chapter 11 Simulation: Modeling the Physical World In this chapter: Why do we need simulations? What is a model and how do they differ? How can the simulation game Monopoly be categorized? What can SimCity teach us? What do programmers consider when planning, designing, and implementing a simulation? Virtual reality, what are its uses? How can an electronic spreadsheet be used as a simulation tool? The Computer Continuum The Computer Continuum

Reasons for Simulation Chapter 11 Reasons for Simulation Simulation: A technique used to mimic or imitate some phenomenon in a way that represents the real situation in most of its details. A physical or mathematical model is designed to behave like the object or event of interest. By manipulating and working with the model, a person can: Predict outcomes. Better understand the model. Experiment with the model. Test the model. Use the model for training purposes. The Computer Continuum The Computer Continuum

Reasons for Simulation Chapter 11 Reasons for Simulation Time compression must be possible in order to predict the future in some way. Presidential elections. Weather forecasting. National economic trends. Population growth. Predictions are only as good as the model used in the simulation! The Computer Continuum The Computer Continuum

Reasons for Simulation Chapter 11 Reasons for Simulation Simulation of the Inaccessible or Impossible Many simulations are necessary because it is impossible to gain knowledge any other way. Observing the collapse of a star. Reactions within a nuclear reactor. Genetic evolution. The weather on Venus. Recreation of the bomb blast that destroyed the Alfred P. Murrah Federal Building in Oklahoma City, Oklahoma. The Computer Continuum The Computer Continuum

Reasons for Simulation Chapter 11 Reasons for Simulation Based on the explosives investigation, a simulation of the bomb’s force was recreated. Oklahoma Bombing Simulation The Computer Continuum The Computer Continuum

Reasons for Simulation Chapter 11 Reasons for Simulation Experimentation and Testing Testing the simulated model of a complicated system is sometimes more feasible than testing the real thing. Experimentation on a new jet engine. Repeatedly crashing automobiles into cement barriers. Results from changing tax rates and interest rates on the US economy. Changing fertilizer compounds on corn crops. The Computer Continuum The Computer Continuum

Reasons for Simulation Chapter 11 Reasons for Simulation Testing guardrail designs using simulated car crashes. The Computer Continuum The Computer Continuum

Reasons for Simulation Chapter 11 Reasons for Simulation Education and Training Offers greater flexibility than traditional education and training. Can offer the benefit of years of experience to people learning some complex skill. Diagnostics in medicine. Flight training. Training a nuclear power plant technician. Managing salmon runs. Managing traffic patterns. Building and bridge construction. The Computer Continuum The Computer Continuum

Reasons for Simulation Chapter 11 Reasons for Simulation Simulated landing onto an aircraft carrier. The Computer Continuum The Computer Continuum

The Computer Continuum Chapter 11 Building a Model Models, whether physical or computer-simulated, share general characteristics: Continuous systems: Have quantities that vary smoothly or in a continuous manner. Example: Simulated landing of a rocket on the moon has quantities in engine thrust, velocity, and deceleration. All these vary smoothly (don’t jump). Discrete systems: Have quantities that vary in steps or jumps. Example: Modeling the traffic flow at an intersection. The number of cars can be counted precisely. Can’t have half a car pass through the intersection. The Computer Continuum The Computer Continuum

The Computer Continuum Chapter 11 Building a Model Models can also be characterized as predictable or probabilistic Predictable systems: Have systems that predict exactly what will happen. Example: Using the mathematical model of the solar system to predict exactly when an eclipse will happen. Probabilistic systems: Have models that contain unpredictable features. Example: Weather simulation programs combine multitudes of information from satellites and previously recorded data. Yet, weather systems have unpredictable features. The Computer Continuum The Computer Continuum

The Computer Continuum Chapter 11 Building a Model Models can also be characterized as having feedback versus non-feedback features. Feedback: A general term denoting the feeding back or recycling of actions or results of a model to itself. An automobile driver system is a feedback type of system: Driver tries to avoid an object in the road A turn away from the object is started. Driver’s eyes feed back information... If the turn is not sharp enough Driver increases the turn The Computer Continuum The Computer Continuum

Monopoly Game Simulation Chapter 11 Monopoly Game Simulation Monopoly Simulation: Probabilistic: Controlled by random toss of dice or instructions given by randomly shuffled cards. Discrete: Dice or instructions both show exact number of steps to be taken. Feedback? If players are involved, then yes there is feedback in the system. If the system is defined not to include the players but only the dice tosses on the board, it does not have a feedback loop. The Computer Continuum The Computer Continuum

Monopoly Game Simulation Chapter 11 Monopoly Game Simulation Monopoly Simulation: How can computers be used to simulate systems? A partial list of activities necessary to simulate the game of Monopoly: Toss dice. Move game pieces. Allow real estate, hotel and house purchases. Draw Chance or Community Chest card if necessary. Toss second or third time if necessary. Go to jail if doubles on third toss. Collect $200.00 upon passing GO. Check for rent payment. Keep records of each player’s assets (cash and real estate)... The Computer Continuum The Computer Continuum

Monopoly Game Simulation Chapter 11 Monopoly Game Simulation To understand the process of writing a program to play Monopoly, look at part of the problem of getting out of jail... Pay $50.00 Roll Start in Jail Use Get out of Jail free card Doubles? Roll No Count = 1 Yes Yes Yes Yes Is Count >2? Use Get out of Jail free card Pay $50.00 Move # Shown Wait Turn No No No Wait Turn Out of Jail The Computer Continuum The Computer Continuum

Monopoly Game Simulation Chapter 11 Monopoly Game Simulation The probabilities for landing on the various squares in Monopoly: 1 Mediterranean .0238252 16 St. James Place .0318117 31 Pacific .0299534 2 Community Chest .0210683 17 Community Chest .0272474 32 North Carolina .0293420 3 Baltic .0241763 18 Tennessee .0334833 33 Community Chest .0264392 4 Income Tax .0260343 19 New York .0333734 34 Pennsylvania .0279291 5 Reading Railroad .0332449 20 Free Parking .0335340 35 Short Line Rail. .0271871 6 Oriental .0253014 21 Kentucky .0310290 36 Chance .0096825 7 Chance .0096756 22 Chance .0124010 37 Park Place .0244447 8 Vermont .0259620 23 Indiana .0304690 38 Luxury Tax .0243572 9 Connecticut .0257326 24 Illinois .0355236 39 Boardwalk .0294734 10 Just Visiting .0253909 25 B&O Railroad .0343378 40 Go Jail Possibilities .0345904 11 St. Charles Place .0303370 26 Atlantic .0301120 J(1) Sent to Jail .0444049 12 Electric Co. .0310260 27 Ventnor .0298999 J(2) in Jail 2 Turns .0370041 13 States .0258042 28 Water Works .0314613 J(3) in Jail 3 Turns .0308368 14 Virginia .0287890 29 Marvin Gardens .0289385 15 Pennsylvania Rail .0312800 30 Go to Jail .0000000 The Computer Continuum The Computer Continuum

Monopoly Game Simulation Chapter 11 Monopoly Game Simulation 120 Calculating the return on investment, taking into account the probability of landing on that particular property: 100 80 60 40 20 $1000 $2000 The Computer Continuum The Computer Continuum

SimCity: Simulation for City Planning Chapter 11 SimCity: Simulation for City Planning SimCity: A game or simulation rich in details needed to do real city planning. Basic thesis: To build and run a city. Building Cities: (Problem Solving) Zoning areas as Residential, Commercial or Industrial. Building roads, rail systems, power and water facilities. Taxing and appropriating funds. Building police stations, fire stations, and hospitals. Including educational institutions and libraries. Adding zoos, parks and recreational areas. Building marinas, airports, and seaports. The Computer Continuum The Computer Continuum

SimCity: Simulation for City Planning Chapter 11 SimCity: Simulation for City Planning Choices of power plants in the year 2026. The Computer Continuum The Computer Continuum

SimCity: Simulation for City Planning Chapter 11 SimCity: Simulation for City Planning Sims: The people who live in the simulation. People will stay in a city if they feel safe, taxes are reasonable, jobs are available, and services are provided. City Planning must include replacement and repairs as needed. Power plants wear out. Roads need repair. As cities grow, increasing water system demand grows. Money needs to be coming in for services to be provided! The Computer Continuum The Computer Continuum

SimCity: Simulation for City Planning Chapter 11 SimCity: Simulation for City Planning The water system is “under the city”. The Computer Continuum The Computer Continuum

Design and Implementation of Computer Simulations Chapter 11 Design and Implementation of Computer Simulations Five basic tasks to be performed in setting up a computer simulation: 1. Determine if the simulation is feasible. Cost and other alternatives must be examined first. 2. Create a model to mimic the real situation. 3. Write a computer program that is based on the model. 4. Validate and verify that the program correctly represents the real-world system. A model is verified or validated when it proves to be a reasonable representation of the system being simulated. 5. Experiment with the computer simulation to resolve the problem. The Computer Continuum The Computer Continuum

Design and Implementation of Computer Simulations Chapter 11 Design and Implementation of Computer Simulations Programming languages used to create simulations: Can be written in any language including Visual BASIC, Smalltalk, C++, Pascal, etc. For complex simulations, several simulation programs have been developed. Usually have a graphics orientation. One example is Extend: Library-based simulation program. Programmer can build libraries of icons that represent the behaviors of elements in the system being modeled. The Computer Continuum The Computer Continuum

Design and Implementation of Computer Simulations Chapter 11 Design and Implementation of Computer Simulations The classic predator/prey problem as modeled in Extend: The Computer Continuum The Computer Continuum

The Computer Continuum Chapter 11 Virtual Reality Virtual Reality (Artificial reality): A situation in which an individual has a three-dimensional view into a world that doesn’t exist except in the computer. Uses: Industry and military train people in the use of complex systems. Entertainment. Special equipment is necessary to experience the environment fabricated by the computer. Can include visual images, smells, and touch. The Computer Continuum The Computer Continuum

The Computer Continuum Chapter 11 Virtual Reality Special equipment is necessary to experience the environment fabricated by the computer. Can include smells, and touch. Can include visual images using a headset, goggles, or a special environment. Three approaches to this type of simulation: A computer creates a tiny video display in a headset. Special goggles are worn that will make 3D images appear. Create a room whose walls are video projections of scenes that are created alternately for the left eye, then the right eye. The Computer Continuum The Computer Continuum

The Computer Continuum Chapter 11 Virtual Reality CAVE Automatic Virtual Environment Physical environment: 10’x10’x9’ room where 3 of the 4 walls and the floor are projection surfaces. Electronically controlled shutter glasses alternately allow projected images to appear to each eye. The Computer Continuum The Computer Continuum

The Computer Continuum Chapter 11 Virtual Reality Virtual Surgery: (Surgery project) Surgery training workstations with video monitor and hand manipulators. Surgeons practice various types of surgery. Can be used as a remote surgery facility. Surgeon connects via satellite to an operating room where robot-like devices at an operating room do the job. The Computer Continuum The Computer Continuum

Electronic Spreadsheets as Simulation Tools Chapter 11 Electronic Spreadsheets as Simulation Tools Electronic spreadsheet application consists of rows/columns of cells that can contain numbers, text, and formulas. The next slides will display how spreadsheets are used in a: Continuous simulation model. Probabilistic simulation model. Model with feedback. The Computer Continuum The Computer Continuum

Electronic Spreadsheets as Simulation Tools Chapter 11 Electronic Spreadsheets as Simulation Tools Continuous Simulation Model Expres is a standard three-phase, dispersed-flow, black-oil, finite-difference reservoir simulator. Uses a spreadsheet’s macro capabilities to simulate oil well production. Expres Simulator web site… The Computer Continuum The Computer Continuum

Electronic Spreadsheets as Simulation Tools Chapter 11 Electronic Spreadsheets as Simulation Tools Probabilistic Simulation Model Each time a probabilistic simulation is run, a different result will occur. This simulation uses a random number function to simulate a die toss. The Computer Continuum The Computer Continuum

Electronic Spreadsheets as Simulation Tools Chapter 11 Electronic Spreadsheets as Simulation Tools Model with Feedback Deals with the issue of time. Something happens that affects a reaction later. A widely used type of feedback is the “what-if” simulation. Example: Backpacking trip. If you only have 4 days and need 4 each of breakfasts, lunches, and dinners. What combinations can you make if you only have $45.00 to spend? The Computer Continuum The Computer Continuum