Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
9 views

Chapter 04 - Modeling Process in Simulation

Chapter 4 discusses the modeling process in simulation, emphasizing the distinction between models and simulations, types of models, and the modeling life cycle. It outlines the steps involved in developing a model, including defining goals, creating conceptual and computational models, and verifying and validating the model. The chapter also covers various types of simulation models, including deterministic and stochastic, as well as static and dynamic models.

Uploaded by

Racem Mellouli
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Chapter 04 - Modeling Process in Simulation

Chapter 4 discusses the modeling process in simulation, emphasizing the distinction between models and simulations, types of models, and the modeling life cycle. It outlines the steps involved in developing a model, including defining goals, creating conceptual and computational models, and verifying and validating the model. The chapter also covers various types of simulation models, including deterministic and stochastic, as well as static and dynamic models.

Uploaded by

Racem Mellouli
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 27

Course

Simulation of Industrial Systems

Modeling
Process in
Simulation

Chapter 4

Dr Racem Mellouli Chapter 4 – Modeling Process in Simulation Slide 1 of 27


Modeling in Simulation...
 Simulations and Modeling too are abstractions of reality.
Often they deliberately emphasize one part of reality at the
expense of other parts. Sometimes this is necessary due to
computer power limitations. Sometimes it's done to focus
your attention on an important aspect of the simulation.
 Simplification effect (simplified representation of reality)
 Information reduction
 Aggregation and massification of certain data and
elimination of unnecessary/ negligible details.
 Projecting a detailed information in time and space in a
global information and sometimes approximate.
 Reformatting the reality in more compact, readable and
understandable appearance (structured representation)
Dr Racem Mellouli Chapter 4 – Modeling Process in Simulation Slide 2 of 27
Simulation VS Modeling...

Model
 A usually miniature representation of something; an example for
imitation [Merriam-Webster dictionary]
 A description of an observed behavior, simplified by ignoring certain
details. Models allow complex systems to be understood and their
behavior predicted within the scope of the model, but may give
some incorrect descriptions and predictions in partial scope, even
for situations outside the realm of their intended use.
[www.learnthat.com]
Simulation
 The imitative representation of the functioning of one system or
process by means of the functioning of another [Merriam-Webster
dictionary]  not used for a static reality (that is possible for models)
 Includes with the modeling part computer experimentations in
which the model is executed with visual display (graphical
animation) and with results enumeration according to different
situation scenarios.
Dr Racem Mellouli Chapter 4 – Modeling Process in Simulation Slide 3 of 27
Models in Simulation

• Types of models
 Physical models: croquis, miniature, sculpture (static
in general)
 Analytical models: mathematical
 Simulation models

The latter:
 A computer model
 A system model + dynamic, animated
What modeling and how?
 A computer model, as used in modeling and simulation
science, is a mathematical representation of something—a
person, a building, a vehicle, a tree—any object.
 A model also can be a representation of a process—a
weather pattern, traffic flow, air flowing over a wing.
 Models are created from a mass of data, equations and
computations that mimic the actions of things represented.
 Models usually include a graphical display that translates all
this number crunching into an animation that you can see
on a computer screen or by means of some other visual
device.

Dr Racem Mellouli Chapter 4 – Modeling Process in Simulation Slide 5 of 27


What modeling and how?
 Models can be simple images of things—the outer shell, so
to speak—or they can be complex, carrying all the
characteristics of the object or process they represent.
 A complex model will simulate the actions and reactions of
the real thing.
 To make these models behave the way they would in real
life, accurate, real-time simulations require fast computers
with lots of number crunching power.

Dr Racem Mellouli Chapter 4 – Modeling Process in Simulation Slide 6 of 27


Types of Simulation Models
System model 3-level
classification

deterministic stochastic

static dynamic static dynamic


Monte Carlo
simulation
continuous discrete continuous discrete
ContinuousDiscrete-event ContinuousDiscrete-event
simulation simulation simulation simulation
Stochastic vs. Deterministic
• Stochastic simulation: a simulation that contains
random (probabilistic) elements
 Examples
– Inter-arrival time or service time of customers at a restaurant or
store
– Amount of time required to service a customer
 Output is a random quantity (not exactly the same: multiple
runs required analyze output)
• Deterministic simulation: a simulation containing no
random elements known /can be known in advance
 Examples
Simulation of a digital circuit

– Simulation of a chemical reaction based on differential
equations
 Output is deterministic for a given set of inputs (usually the
same output within multiple runs)
Static vs. Dynamic Models
• Static models
 Model where time is not a significant variable: time is “frozen”,
fixed, stationary, it does not evolve  model is an unanimated image,
Time Independent, drawing pictures of precise states, and we don’t
care about what is coming after or happening before…
 Examples
– Linear programming model for a static decision with static data
– to specify structure of the objects that exist (vs to represent the
object interactions/activity sequences during runtime): OR models
except online and real-time optimization.
 Static + stochastic = Monte Carlo simulation
– Statistical sampling to develop approximate solutions to numerical
problems
• Dynamic models
 Model focusing on the evolution of the system under investigation over
time  Main focus of this course
Continuous vs. Discrete
• Discrete
 State of the system is viewed as changing at discrete
(separate) points in time
 An event is associated with each state transition
– Events contain timestamps (time marks, time stones)
• Continuous
 State of the system is viewed as changing continuously
across time
 System typically described by a set of differential equations
Model Development Life Cycle
1. Define goals )objectives of study(

2. Develop conceptual model ‫النموذج المفاهيمي‬

Fundamentally
3. Develop specification of model ‫مواصفة‬
an iterative
process
‫عملية تكرارية‬
4. Develop computational model ‫النموذج الحسابي‬

5. Verify model ‫التحقق من النموذج‬

6. Validate model ‫المصادقة على النموذج‬


1. Determine Goals and Objectives
• What does you (or the customer) hope to accomplish
with the model
 May be an end in itself
– Predict the weather
– Train personnel to develop certain skills (e.g., driving)
 More often a means to an end
– Optimize a manufacturing process or develop the most cost effective
means to reduce traffic congestion in some part of a city
• Often requires developing a business case to justify
the cost
 Improved efficiency will save the company $$$
– Example: using electronics affects efficiency and has a cost
 May be hard to justify in scarcity (lean, “difficult”) times
• Goals may not be known when you start the project!
 One often learns things along the way
2. Develop Conceptual Model

An abstract representation (i.e., not directly executable) of


the system
Q1. What should be included in model?
Q2. What can be left out?
Q3. What abstractions should be used?
Q4. What metrics will be used/produced by the model?
 Level of detail
 Often a variant on standard abstractions
 Example: context of transportation
 Fluid flow?
 Queueing network?
 Appropriate choice depends on the purpose of the model
 An abstract representation of the system
(example: a Petri net, a flowchart, a logical diagram)
2. Develop Conceptual Model
AN ILLUSTRATION OF CONCEPTUAL MODELING:

SIMULATING AN OUTPATIENTS CLINIC


Key questions:
How many consultation rooms are required?
 To perform some calculations based on expected patient flows
and on observations of the current outpatients system.
Can we make major investment decisions based on these limited
data?
 to start collecting more data (to define before the perimeter/the
scope)
 to make initially calculations based on static data which requires
to take into account the effects of variability in patient flows and
consultation times. This is something for which discrete-event
simulation is very well suited.
What are the specialties using the facility?
  Several, each with its own clinical team
2. Develop Conceptual Model
How Patients can progress through a series of tests and
consultations (according to specialty)?
  For some specialties, such as ophthalmology, specialist
equipment and dedicated rooms are required.
  Scheduling patient appointments is a significant task and then
there is the matter of late arrivals and nonattendances.
  Staff shifts, working practices and skills all impact upon the
functioning of the system…
 Etc...
 All Appropriate data gathered (with appropriate abstraction
chosen)
2. Develop Conceptual Model
Remark1: two issues that made such a model infeasible:
• Lack of data: much of the necessary data had not previously been
collected and even if we were to try, issues of patient confidentiality
(e.g. you cannot sit in a consultation room timing consultation times)
would make it impossible to collect all the data we needed.
• Lack of time: the hospital provide an answer within a few weeks and we
had very limited time and resource to devote to the modeling work
 Focus only on the critical issue:
 How many rooms are required ? At least a lower bound on the
rooms required.
Remark2 (example of chosen abstractions and simplifications) : In
Figure 1: Patient arrivals are based on the busiest period of the week –
a Monday morning. All patients scheduled to arrive for each clinic, on a
typical Monday, arrived into the model at the start of the simulation run,
that is, 9:00am. For this model we are not concerned with waiting time,
so it was not necessary to model when exactly a patient arrived, only
the number that arrived
2. Develop Conceptual Model
Patient arrivals are based on the busiest period of the week – a Monday
morning. A proportion of patients do not attend their allotted clinic.
Typical proportions of absent patients are sampled at the start of the
simulation run and removed before entering the waiting line.
Data on the time in a consultation room are limited, since they had not
specifically been timed (chrono-measured), but there are norms to
which the clinical staff aimed to work. These data can be available by
clinic type and used with a certain statistical distribution to give an
approximation for the variability in consultation time.
The input variable for the simulation experiments is the number of
consultation rooms, which will be varied from 20 to 60 in steps of 10.
The main output variable will be the time it took until the last patient left
the system.
An other key simplification, which is all involved recognized, is that there
are no limitations on staff or equipment availability (an investment
design objective).
 This conceptual model is predicting a lower bound on the number
of rooms required.
2. Develop Conceptual Model
 This conceptual model is predicting a lower bound on the number
of rooms required.
 In other words, shortages of staff and equipment, and unconsidered
technical constraints (very thin, potentially with a low impact),
uncertainty and breakdowns would only increase the need for
consultation rooms.
 For each room scenario, the model will be replicated 100 times and a
frequency chart will be generated showing the probability that the
system would be cleared in under 3 hours – the hospital’s target.
2. Develop Conceptual Model
Artefacts of Conceptual Modeling
2. Develop Conceptual Model
Artefacts of Conceptual Modeling
3.Develop Specification Model
• A more detailed specification of the model
including more specifics
• Collect data to populate model
 Traffic example: Road geometry, signal timing, expected
traffic demand, driver behavior
 Empirical data or probability distributions often used
• Development of algorithms necessary to include
in the model
 Example: Path planning for vehicles
4. Develop Computational Model

Executable simulation model


To adapt to Software approach
 General programming language
 Special simulation language
 Simulation package
 Approach often depends on need for customization
and economics
 Where do you make your money?
Other (non-functional) requirements
 Performance
 Interoperability with other models/tools/data
5. Verification

• Did I build the model right?


• Does the computational model match the
specification model?
• Largely a software engineering activity
(debugging)
• Not to be confused with correctness (see
model validation)!
6. Validation

• Did I build the right model?


• Does the computational model match the
actual (or envisioned) system?
• Typically, compare against
 Measurements of actual system
 An analytic (mathematical) model of the system
 Another simulation model
• By necessity, always an incomplete
activity!
 Often can only validate portions of the model
 If you can validate the simulation with 100%
certainty, why build the simulation?
Components of a Discrete-Event
Simulation Model
• Each simulation model must be customized (personalized) to
target system, but there are several common components
(variables, data structures, subprograms…) and a general
organization
 System state: a set of several variables to describe state
 Simulation clock: current value of simulated time
 Event list: times and names of future events
 Statistical counters: to accumulate quantities for output (KPI)
 Initialization routine a sequence of actions regularly followed; a fixed program: initialize model at time
0
 Timing routine: determine next event time, type; advance clock
 Event routines: carry out logic routine for each event type
 Library routines: utility‫( ادوات برمجية‬toolbox) routines to generate random
variates, etc.  see Block Library
 Report generator: to summarize, report results at end
 Main program: ties routines together, executes them in right order
Slide 25
Components Organization in a
Discrete-Event Simulation Model (cont’d.)

Slide 26 of 51
Components Organization in a
Discrete-Event Simulation Model (cont’d.)
• More on entities
 Objects that compose a simulation model
 Usually include customers, parts, messages, etc. … may
include resources like servers
 Characterized by data values called attributes
 For each entity resident in the model there’s a record (row)
in a list, with the attributes being the columns
• Approaches to modeling
 Event-scheduling – as described above, coded in general-
purpose language
 Process – focuses on entities and their “experience,”
usually requires special-purpose simulation software

Slide 27

You might also like