02 20110314-simulation

3,150 views
2,998 views

Published on

kos ommak

Published in: Education
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
3,150
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
151
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

02 20110314-simulation

  1. 1. Introduction to Simulation and Modeling 4th Undergraduate Level Academic Year 2010/2011, 1 st Term Dr. Mohammed Abdel-Megeed Salem Scientific Computing Department Faculty of Computer and Information Sciences Ain Shams University Lecture 2 Ain Shams University in Cairo Faculty of Computer and Information Sciences Scientific Computing Department
  2. 2. Outline Dr. Mohammed Abdel-Megeed Salem Lecture 2 Introduction to Simulation and Modeling
  3. 3. System Definition <ul><li>“ A collection of elements that function together to achieve a desired goal” – (Blanchard 1991) </li></ul><ul><li>Key Points: </li></ul><ul><ul><li>A system consists of multiple elements </li></ul></ul><ul><ul><li>Elements are interrelated and work in cooperation </li></ul></ul><ul><ul><li>Exists for the purpose of achieving specific objectives </li></ul></ul><ul><li>Examples: </li></ul><ul><ul><li>Traffic Systems </li></ul></ul><ul><ul><li>Political Systems </li></ul></ul><ul><ul><li>Economic Systems </li></ul></ul><ul><ul><li>Manufacturing Systems </li></ul></ul><ul><ul><li>Service Systems </li></ul></ul>Dr. Mohammed Abdel-Megeed Salem Lecture 1 Introduction to Simulation and Modeling
  4. 4. System Analysis and Simulation System Real Exp. Exp. with Model Physical Model Mathematical Model Analytical Solution Simulation Dr. Mohammed Abdel-Megeed Salem Lecture 2 Introduction to Simulation and Modeling
  5. 5. System Analysis and Simulation System Real Exp. Exp. with Model Physical Model Mathematical Model Analytical Solution Simulation Dr. Mohammed Abdel-Megeed Salem Lecture 2 Introduction to Simulation and Modeling
  6. 6. System Analysis and Simulation <ul><li>Example 1: </li></ul><ul><ul><li>System: Banking </li></ul></ul><ul><ul><li>Entities: Customers </li></ul></ul><ul><ul><li>Attributes: Account balance </li></ul></ul><ul><ul><li>Activities: Making deposits </li></ul></ul><ul><ul><li>Events: Arrival and departure </li></ul></ul><ul><ul><li>State: No# busy tellers, No# waiting customers </li></ul></ul>
  7. 7. System Analysis and Simulation <ul><li>Example 2: </li></ul><ul><ul><li>System: Cafeteria </li></ul></ul><ul><ul><li>Entities: Diners </li></ul></ul><ul><ul><li>Attributes: Size of appetite </li></ul></ul><ul><ul><li>Activities: selecting food and paying for food </li></ul></ul><ul><ul><li>Events: Arrival and departure </li></ul></ul><ul><ul><li>State: No# diners in waiting line, No# servers working </li></ul></ul>
  8. 8. System Analysis and Simulation <ul><li>Systems Types: We categorize systems to be of two types, discrete and continuous. A discrete system :is one for which the state variables change instantaneously at separated points in time. A bank is an example of a discrete system (number of customers changes only when customer arrives or departs). </li></ul>
  9. 9. System Analysis and Simulation <ul><li>Systems Types: </li></ul><ul><li>We categorize systems to be of two types, discrete and continuous. A continuous system : is one for which the state variables change continuously with respect to time. An airplane moving through the air is an example of a continuous system, since state variables such as position and velocity can change continuously with respect to time. </li></ul>
  10. 10. System Analysis and Simulation <ul><li>System vs Model </li></ul><ul><ul><li>It may be impractical to experiment with it. For example, it may not be wise or possible to double the unemployment rate to determine the effect of employment on inflation. </li></ul></ul><ul><ul><li>A model is a representation of a system for the purpose of studying the system. </li></ul></ul>System Input output Model Input output
  11. 11. <ul><li>Types of Models </li></ul><ul><li>Mathematical or Physical </li></ul><ul><ul><li>A simulation model is a particular type of mathematical model of a system. </li></ul></ul><ul><li>Simulation Models may be further classified as being </li></ul><ul><ul><li>Static or Dynamic, </li></ul></ul><ul><ul><li>Deterministic or Stochastic, </li></ul></ul><ul><ul><li>Discrete or Continuous. </li></ul></ul>
  12. 12. System Real Exp. Exp. with Model Physical Model Mathematical Model Analytical Solution Simulation Static Dynamic Deterministic Stochastic Continous Discrete
  13. 13. System Analysis and Simulation <ul><li>A storehouse with n loading berths </li></ul><ul><li>There are several 100 trucks daily to serve </li></ul><ul><li>Loading time of a truck is 50 minutes StorehouseGoal• Cost-effective loading and short waiting timeUsually 2 types• Type 1: Full load with only one product• Type 2: Load consisting of several productsProposals• Fast loading berth for Type 1 customers• Special berth for Type 2 customersProblem• Cannot experiment, changes are expensive! </li></ul>
  14. 14. Simulation Model <ul><li>Physical Model: useful to build physical models to study engineering systems. </li></ul><ul><li>Mathematical Model: representing a system in terms of logical and quantitative relationships that are then manipulated and changed to see how the model reacts, and thus how the system would react. </li></ul><ul><li>Static Simulation Model: is a representation of a system at a particular time. </li></ul><ul><li>Dynamic Simulation Model: represents a system as it evolves overtime. </li></ul><ul><li>Deterministic Simulation Model: If a the simulation model does not contain any probabilistic (i.e.,random) components, it is called deterministic </li></ul>
  15. 15. Simulation Model <ul><li>Stochastic Simulation Models: Having at least some random input components produce output that is itself random, and model therefore be treated as only an estimate of the true characteristics of the model. </li></ul><ul><li>Continuous vs. Discrete Simulation Models: a discrete simulation model is not always used to model a discrete system and vice versa. Thus a communication channel could be modeled discretely (continuously) if the characteristics and movement of each message (the flow of the messages in aggregate) were deemed important. </li></ul>
  16. 16. Discrete-Event Simulation <ul><li>Definition of Discrete-Event Simulation </li></ul><ul><li>Event </li></ul><ul><li>Barbershop example </li></ul>Dr. Mohammed Abdel-Megeed Salem Lecture 2 Introduction to Simulation and Modeling
  17. 17. Time Advanced Mechanisms <ul><li>Simulation Clock </li></ul><ul><li>Next-event time advance </li></ul><ul><ul><li>Intializied by 0 </li></ul></ul><ul><ul><li>Advnced to the time of next event </li></ul></ul><ul><ul><li>Update the state variables </li></ul></ul><ul><ul><li>Time of next event is updated </li></ul></ul><ul><ul><li>Continued untill a prespecified stopping condition </li></ul></ul><ul><li>Fixed-increment time advance </li></ul>
  18. 18. Example <ul><li>Single Server- single queue (Vodafone shop) problem </li></ul><ul><li>SOLVED ON WHITE BOARD </li></ul>
  19. 19. Event Simulation Components <ul><li>System State </li></ul><ul><li>Simulation Clock </li></ul><ul><li>Events list </li></ul><ul><li>Statistical Counters </li></ul><ul><li>Intialization Routine </li></ul><ul><li>Timing Routine </li></ul><ul><li>Event Routine </li></ul><ul><li>Library Routines </li></ul><ul><li>Report Generator </li></ul><ul><li>Main Program </li></ul>
  20. 20. Contacts <ul><li>Introduction to Simulation and Modeling, 4 th Undergraduate Level, 2009/2010 </li></ul><ul><li>Dr. Mohammed Abdel-Megeed M. Salem </li></ul><ul><li>Faculty of Computer and Information Sciences, </li></ul><ul><li>Ain Shams University Abbassia, Cairo, Egypt Tel.: +2 011 727 1050 </li></ul><ul><li>Email: mamegeed@hotmail.com http:// cis.shams.edu.eg/Mohammed.Salem/indexEn.html http://www.informatik.hu-berlin.de/~salem </li></ul>

×