Computer Science 101 Modeling and Simulation. Scientific Method Observe behavior of a system and formulate an hypothesis to explain it Design and carry.

Slides:



Advertisements
Similar presentations
What is Science? Science refers to a method of learning about the natural world, as well as to the knowledge gained through that process. Scientific Inquiry.
Advertisements

Introduction into Simulation Basic Simulation Modeling.
Acceleration Due to Gravity: Free Fall By: Rosa Marie Kinder and Kenisha Marshall SC441 Honors Class, Fall 2002, Dr. Roman Kezerashvili.
PHYSICAL SCIENCE MOTION
New Mexico Computer Science For All Designing and Running Simulations Maureen Psaila-Dombrowski.
1. 2 FREELY FALLING OBJECTS - we will consider the case where objects move in a gravity field – namely free-fall motion. We will neglect [for a time]
Gravity and free fall.
Chapter 2 Motion.
1.2 Falling Balls ball 1. Ideas for today: Weight Acceleration due to gravity Falling objects Horizontal and vertical motion 2.
Overarching Goal: Understand that computer models require the merging of mathematics and science. 1.Understand how computational reasoning can be infused.
Chapter 3 Motion in a line (linear motion). Motion Vocabulary A cat moves a distance of 10 meters (how far?) in 5 seconds. What information do you KNOW.
Change in Velocity Each time you take a step you are changing the velocity of your body. Each time you take a step you are changing the velocity of your.
One-Dimensional Motion. Experience vs. Experiment Through evolution and memory, humans have developed a “sense” for motion  Developed over years of observation,
Summary:Linear Motion D t D t V t V t a t D t Constant acceleration “a” occurs in nature whenever the force is constant e.g. gravity. Stationary object.
Simulation Waiting Line. 2 Introduction Definition (informal) A model is a simplified description of an entity (an object, a system of objects) such that.
Speed, Velocity and Acceleration
Chapter 12: Simulation and Modeling Invitation to Computer Science, Java Version, Third Edition.
Bell Ringer Sports announcers will occasionally say that a person is accelerating if he/she is moving fast. Why is this not an accurate description of.
Chapter 12: Simulation and Modeling
The Scientific Method A Way to Solve a Problem What is the Scientific Method? It is the steps someone takes to identify a question, develop a hypothesis,
The Nature of Science Chapter 1. Section 1 What is Science? You should know this by now!!!
Scientific Method. Aristotle and his contemporaries believed that all problems could be solved by thinking about them. Sometimes this worked, other times.
INTRODUCTION TO SCIENCE & THE
Motion.
INTRODUCTION TO SCIENCE Chapter 1 Physical Science.
Models and Simulations
A Solidify Understanding Task
Copyright © by Holt, Rinehart and Winston. All rights reserved. ResourcesChapter menu Copyright © by Holt, Rinehart and Winston. All rights reserved. ResourcesChapter.
Environmental Science Chapter 2 – Scientific Tools Test Review
DO NOW 1. What is the first step of the scientific method? 2. What is a hypothesis? What words need to be included in a hypothesis? 3. How is data recorded.
1.2 Using a Scientific Approach You are caught in the rain. Should you run or walk? Maybe you should run–less time in the rain means less water falls down.
Free Fall and Gravity. Acceleration Review 1. A biker is traveling at 12.0 m/sec and speeds up to pass a car to 18.5 m/sec in 1.5 seconds. What is the.
1.2 Using a Scientific Approach You are caught in the rain. Should you run or walk? Maybe you should run–less time in the rain means less water falls down.
Physics 1D03 - Lecture 21 Kinematics in One Dimension Displacement, velocity, acceleration Graphs A special case: constant acceleration Bodies in free.
Acceleration due to Gravity CCHS Physics. Historical Background.
Scientific Method Chapter 1-1. What is Science?  Science – organized way of gathering and analyzing evidence about the natural world  Described as a.
Chapter 3 Motion in a line (linear motion). Motion Vocabulary A cat moves a distance of 10 meters (how far?) in 5 seconds. What information do you KNOW.
 Simulation enables the study of complex system.  Simulation is a good approach when analytic study of a system is not possible or very complex.  Informational,
Chapter 10-2 Friction and Gravity. Friction Force of Friction – caused by two surfaces rubbing Strength: depends on 1) how hard the surfaces are pushed.
Science of Physics What Is Physics?. Topics of Physics Physics is the study of the physical world Why things do what they do Physics is all around us.
Forces and Motion Falling Water Activity 1. What differences did you observe in the behavior of the water during the two trials? 2. In trial 2, how fast.
Galileo Galilei ( ) "You must read the book of Nature... In other words, observe and do experiments. This is against the medieval idea of scholasticism--that.
Modelling & Simulation of Semiconductor Devices Lecture 1 & 2 Introduction to Modelling & Simulation.
An object that the only force acting on it is gravity Mr. P.
Chapter 12: Simulation and Modeling
You are caught in the rain. Should you run or walk
& AIR RESISTANCE The physics of falling
If you missed the first lecture. . .
Invitation to Computer Science 5th Edition
Scientific Method.
The vertical one-dimensional motion
Scientific Method.
Free Fall.
Acceleration.
Acceleration.
You are caught in the rain. Should you run or walk
The Difference between Mass & Weight
Scientific Method.
You are caught in the rain. Should you run or walk
You are caught in the rain. Should you run or walk
You are caught in the rain. Should you run or walk
Acceleration.
Acceleration.
The Difference between Mass & Weight
Acceleration.
Free Fall Stuntman’s Free Fall – Great Adventure.
Acceleration.
You are caught in the rain. Should you run or walk
Apr. 25, 2019 You need: Clean paper (2) / pencil Warm Up:
Presentation transcript:

Computer Science 101 Modeling and Simulation

Scientific Method Observe behavior of a system and formulate an hypothesis to explain it Design and carry out experiments to test the hypothesis Make predictions about behavior based on valid hypotheses

Models Scientists often work with a model of a system rather than the “real thing” A model is a simplified version or abstraction of the real thing Example: test a model airplane in a wind tunnel

Physical vs Computational Models A computational model represents a physical model as a set of equations or algorithmic procedures A computational model captures the fundamental characteristics and behavior of a system Computational models are also called simulation models or simulations

Why Construct a Simulation? The system may not exist, so it’s impossible to experiment directly on it The system does not consist of physical objects (welfare policies, labor practices) It might be unsafe to experiment on an actual system, such as a nuclear power plant

Why Construct a Simulation? It might take too much time to build a physical model Some physical systems change too quickly or slowly, such as subatomic particles or ecosystems Some physical models have serious ethical consequences, such as the use of animals for medical research Ease of modification: if design doesn’t work, just modify the parameters

Computational Steering Initialize the system, observe its response, and if not satisfied, modify the parameters and run it again Repeat the process again and again, seeking to improve performance Interactive design too expensive to conduct with real physical systems

Interactive Design with a Simulator Construct the simulation model Set the initial parameters Run the simulation and collect results Modify the parameters Satisfied? Start Stop No Yes

An Example Physical Experiment Galileo’s experiment to demonstrate that heavy objects don’t fall faster than light ones Drop a massive iron cannonball and a light wooden ball from the top of the Tower of Pisa They landed at the same instant!

The Mathematical Model An equation represents the relation between distance, velocity, the force of gravity, and time d = v init t + ½ gt 2 g is 9.8 meters/sec 2 everywhere along the earth’s surface Note that the object’s mass is not part of the equation We can substitute a distance and solve for the time or the time and solve for the distance

The Mathematical Model The Tower of Pisa is 54 meters high d = v init t + ½ gt 2 54 = 0 * t + ½ * 9.8 * t 2 t 2 = t = 3.32 seconds Then drop the balls and time them to verify

The Mathematical Model Galileo could have used this model to determine the time from a height of 150 meters, even though no building that high existed at that time d = v init t + ½ gt = 0 * t + ½ * 9.8 * t 2 t 2 = 30.6 t = 5.53 seconds And it’s safe: nobody ever fell off an equation!

When Equations Don’t Work Accuracy. Sometimes, there are too many factors (such as air resistance for falling bodies or the imperfect shape of the Earth) and the equations get too complex The gravitational model is continuous, can be described in terms of equations, but sometimes we don’t know the equations or the system may resist a continuous description

When Equations Don’t Work Some systems contain stochastic components, meaning that some elements exhibit random behavior Customers walk into a store at random times Models must then use statistical approximations instead of exact equations

Discrete Event Simulation Time is not continuous, as with falling bodies, but breaks up into discrete moments At each moment, an event takes place that changes the state of the system Examples: a customer enters a store or purchases an item One event can cause a later event to happen During some moments, nothing can happen at all

Example: A Car Wash Given that it takes 4 minutes to wash a car and that cars arrive in a line with a random probability of.25, how many cars will get washed in 600 minutes and how long did each car have to wait in line? We can vary the wash time and the probability of arrival try to determine the optimal state of this “system”

The User Interface

The Simulation Algorithm Get the minutes per wash, probability of arrival, and total running time Initalize the counters For each minute do If a new car has arrived Time-stamp the car and add it to the end of the line If a car is not being washed and the line is not empty then Take a car off the front of the line Use its time stamp to see how long it waited Add its wait time to the total wait time Record that we have just begun to wash that car If a car is being washed Reduce by 1 minute the time left before we are done washing it If we are done washing the car Increment the number of cars washed Return the total number of cars washed and the average wait time Note that the “cars” and “minutes” are abstract, not real

Two Senses of “Improving” We can vary the parameters of a given model to determine the optimal behavior of a system We can make the model of a system more realistic by adding multiple wash stations, types of wash, etc.