Lecture 1- Overview What is a model? Why to use models? Characteristics of a model Forms of models Classification of models (temporal dimension) Course scope 3 What is a model? A model is a simplification of a reality. In this course, a model is a simplification of a real system A system is a collection of entities (physic (e.g., people and machines) or abstract (e.g., administrative units) that act and interact together toward the accomplishment of some logical end Manufacturing systems (production lines, inventory systems, etc.). Computer and communication systems (client-server systems, communication networks, etc.) Etc. 4 2 Lecture 1- Overview What is a model? Why to use models? Characteristics of a model Forms of models Classification of models (temporal dimension) Course scope 5 Why to use models? To understand, describe and exchange knowledge about the structure and the behaviour of the real system To predict the behaviour of the system under different conditions (what-if experimentations) Why does the network performance die when more than 10 people are at work? It is very costly, dangerous and often impossible to make experiments with real systems. Provided that models are adequate descriptions of reality, experimenting with them can save money, suffering and even time. To study new or imaginary systems 6 3 Lecture 1- Overview What is a model? Why to use models? Characteristics of a model Forms of models Classification of models (temporal dimension) Course scope 7 Characteristics of a model A model is always a simplification of the reality (or the modeled system) It only captures certain relevant aspects of the real system, the other aspects are ignored This is why we say that « all models are wrong, but some models are useful » or « not all models are useful » You shoud interpret « wrong » by « not the reality » In order to be useful, the model must be validated, that is, we must prove that it is a good approximation of the real system it represents 8 4 Lecture 1- Overview What is a model? Why to use models? Characteristics of a model Forms of models Classification of models (temporal dimension) Course scope 9 Forms of models (1/5) Physical models: a scaled-down physical objects (scale model of a building, a car, etc.) 10 5 Forms of models (2/5) Mathematical or analytical models: set of equations or relations among mathematical variables (set of equations describing the workflow on a factory floor, etc.) Example: Q = m C (t1 - t2) - a model of heat emitted by a body of mass m, when cooling from temperature t1 to temperature t2. t2. C is the heat capacity parameter. 11 Forms of models (3/5) Diagrammatic models A drawing is also a model, and in some cases it can offer much more information than the verbal description A drawing may be better than a thousand words Charest N Bus Station Ste-Foy University 12 6 Forms of models (4/5) Computer simulation models: A simulation is a computer program that mimics the behavior of a real-world system, including its inputs Suitable for complex dynamic systems 13 Forms of models (5/5) SYSTEM Experiment with the Actual System Experiment with a Model of the System There is always the question of whether it actually reflects the system. •Too costly or disruptive •Not appropriate for the design Physical Model Mathematical Model Make assumptions that take the form of mathematical or logical relationships E.g., table top scale models of material handling systems Analytical Solution Simulation If the model is simple enough. E.g., calculus, algebra, probability theory Highly complex systems 14 7 Lecture 1- Overview What is a model? Why to use models? Characteristics of a model Forms of models Classification of models (temporal dimension) Course scope 15 Classification of models (time) (1/4) We may distinguish different types of models according to several aspects (characteristics of the real system, of the studied problem, etc.) Time is one of the most important aspects of a model, and we should ask the following questions: Do we need to see how does the system evolve in time, like in a movie, or we just need a snapshot of the reality, like on a photo? If the system is evolving, how does it change from one state to another? Is it a continuous process or a discrete, instantaneous one? Is the next state of the system totally defined by its current one, or future states occur spontaneously with certain probability? We distinguish: Static vs. Dynamic Models Deterministic vs. Stochastic Models Continuous vs. Discrete Models 16 8 Classification of models (time) (2/4) 1. Static vs. Dynamic Models (does the system change?) Static model Time plays no role; represents a system at a particular point in time (a snapshot) Example: a map, a photo, etc. Dynamic model Represents a system as it evolves over time (time changes and so do variables in the system) Example: a cartoon, a 3d animation, etc. 17 Classification of models (time) (3/4) 2. Deterministic vs. Stochastic Models (can we exactly predict the change?): Deterministic model A dynamic model where the state* of the system at time ti+1 is entirely defined by its state at time ti. Example: chemical reactions Stochastic model A dynamic model where the state of the system at time ti+1 may take several values, each value with a certain probability Example: most queueing and inventory systems * A state is a variable characterizing an attribute in the system (level of stocks in inventory, number of jobs waiting for process, etc.) 18 9 Classification of models (time) (4/4) 3. Continuous vs. Discrete Models (When does the system changes?): Continuous: the state of the system changes continuously (e.g., chemical processes) Discrete model: the state of the system changes only at discrete points in time 19 • Continuous-time models evolve their variable values continuously over time • Discrete-time models may change their variable values only at discrete points in time 20 10 Lecture 1- Overview What is a model? Why to use models? Characteristics of a model Forms of models Classification of models (temporal dimension) Course scope 21 Course scope In this course we are interested in the modeling of real-world stochastic systems using computer simulation Particularly, we focus on “discrete-event” systems although we shall see other examples As we shall see, simulating a system properly requires several disciplines Hopefully, you will learn many useful “transferable” skills, even if you do not choose to specialize in modeling 22 11 Lecture 1- Overview What is a model? Why to use models? Characteristics of a model Forms of models Classification of models (temporal dimension) Course scope 23 Lecture 2- Objectives Introduce the general steps of the modeling process Some steps will be detailed / added next classes Understand the importance of objectives in the modeling process 24 12 Modeling process Problem Analysis Conceptual Modeling and Specification Real system Data Collection Useful (valide) Model Computational Model Model Implementation Development for a specific purpose Model Verification Model Validation An iterative process 25 Waiting Line systems Service system Arrivals Queue customers Service facility Served units A Waiting Line System is characterized by: -Queue (Buffer): with a finite or infinite size - Server: with a given processing speed - Events: Arrivals or Departures with given rates 26 13 Ships example Ships at sea Ship unloading system Empty ships Waiting ship line Dock 27 Bank example 28 14 Work example: airport runway Control Tower Aircrafts Runway 29 Problem Analysis Conceptual M & S Data Collection Implementation Verification Validation Problem analysis • Clearly indentify the problem and the purposes of the model • Some important questions: What are the objectives the model will be used for? Define an achievable goal “To model the system” is not a goal “To model the system in order to measure the performance / …” is a goal What are the relevant measurements to evaluate goals achievement? How can we evaluate that the objectives are achieved? What are the characteristics of the system? 30 15 Problem Analysis Conceptual M & S Data Collection Implementation Verification Validation Problem analysis (cont.) Airport example: Objective: Evaluate the performance of the landing airport system. Important performance measures: Average waiting time: the time an aircraft must wait when arriving at the airport and before it is allowed to land. Average service time: the time an aircraft takes to be parked Only one runway, can not be used by two aircrafts at the same time Ground parking capacity: 30 aircrafts Aircrafts are served first-in-first-out. In emergency situations, the rule change 31 Problem Analysis Conceptual M & S Data Collection Implementation Verification Validation Conceptual modeling and specification Establish a clear conceptual model of the system and specify its behaviour What should be included to the model? What can be ignored? What abstractions should be used? What is the level of detail? What are important variables and parameters of the system? What are important inputs / outputs? How the entities of the system should interact? Etc. 32 16 Problem Analysis Conceptual M & S Data Collection Implementation Verification Validation Conceptual modeling and specification (cont.) Customers: aircrafts that use the system resources Server: the runway, a resource that can be used by only one customer at a given time Queue: the buffer (control tower) holding aircrafts waiting to land 33 Problem Analysis Conceptual M & S Data Collection Implementation Verification Validation Conceptual modeling and specification (cont.) Airport example: Abstractions: aircrafts (customers), runway (server), control tower (manages the queue), aircrafts arrival and parking (events) Aircrafts should be modeled individually, they can not be in groups. Travellers should not be modeled! Important variables: arrival times, waiting times, parking times, number of waiting aircrafts, number of parked aircrafts, etc. Inputs: Number of arriving aircrafts and their arrival times Average time of landing Etc. Outputs: Average waiting and service times Etc. An aircraft can not land before having the Ok from the control tower If the runway is busy, the control tower should ask arriving aircrafts to wait flying Etc. 34 17 Problem Analysis Conceptual M & S Data Collection Implementation Verification Validation Data collection Estimate the inputs of the model In stochastic systems we often use distributions of random variables Based on statistics and historical data Airport example: What is the arrival process? Schedule of aircraft arrivals, e.g., log from specific dates Often, probability distribution defines time between successive aircrafts arrivals How much service time (from arrival time to parking time) is needed for each aircraft? May use probability distribution to specify aircrafts service time Etc. 35 Problem Analysis Conceptual M & S Data Collection Implementation Verification Validation Model Implementation Use an analytical model or a simulation model? Analytical: using queuing theory for example (set of equations) Simulation: using a computer program to execute the model (mathematical simulations, etc.) Use a general-purpose programming language (C++, Visual Basic, etc.) or a special-purpose simulation language or environment (like Arena, etc.) ? 36 18 Problem Analysis Conceptual M & S Data Collection Implementation Verification Validation Model Verification Concerned with the correctness of the transformation from the abstract representation (the conceptual model) to the implemented model Does the implemented model respects the conceptual specifications? Often conducted by inspection of the code, i.e., by comparing the code to the conceptual specifications If there is a difference, we should change either the conceptual specifications or the code Did I build the model right? 37 Problem Analysis Conceptual M & S Data Collection Implementation Verification Validation Model Validation While verification concerns whether or not the program is working as the specifications expect, validation considers whether or not the implemented model is a “good” model of the real system. A model that can be relied upon to reflect the behavior of the real system can be considered ‘valid’. Did I build the right model? We can not validate a model at 100%, we can only validate portions of a model Remember: a model is a simplification of a real system, it can never behave at 100% like a real system 38 19 Simulation Modeling Process For simulation models, we will see / detail other steps in the modeling process, such as Simulation experiments, Output analysis and others We will talk more and more about the modeling process next courses 39 20