comp155 computer simulation september 10, 2008. discrete event simulation discrete event...

21
COMP155 Computer Simulation September 10, 2008

Upload: victoria-bond

Post on 18-Jan-2018

227 views

Category:

Documents


0 download

DESCRIPTION

Steps in a Simulation Study from Discrete-Event Simulation 4 th ed. Banks et.al. Prentice Hall 2005

TRANSCRIPT

Page 1: COMP155 Computer Simulation September 10, 2008. Discrete Event Simulation  discrete event simulation: state variable change only at a discrete set of

COMP155Computer SimulationSeptember 10, 2008

Page 2: COMP155 Computer Simulation September 10, 2008. Discrete Event Simulation  discrete event simulation: state variable change only at a discrete set of

Discrete Event Simulation discrete event simulation:

state variable change only at a discrete set of points in time

events: the set of points in time at which state changes occur

Page 3: COMP155 Computer Simulation September 10, 2008. Discrete Event Simulation  discrete event simulation: state variable change only at a discrete set of

Steps in a Simulation

Study

from Discrete-Event Simulation 4th ed. Banks et.al. Prentice Hall 2005

Page 4: COMP155 Computer Simulation September 10, 2008. Discrete Event Simulation  discrete event simulation: state variable change only at a discrete set of

Example System

One type of entities: parts to be drilledmultiple entities over time

One process: drilling a part One resource: drill press

required to complete drilling processone the drill press is in use for a part,

it is not released until that part is finished (this is the example system in chapters 2 and 3)

Blank PartArrives

Finished PartDeparts

DrillPress

Part in Service

4

Queue

567

Page 5: COMP155 Computer Simulation September 10, 2008. Discrete Event Simulation  discrete event simulation: state variable change only at a discrete set of

Goals of Drill Press Study What do we want to discover?

How many parts can be processed in some time frame?

What is average and maximum waiting time for parts in the queue?

What is the maximum size of the queue?What are the average and maximum

total time in system for parts?What is the utilization ratio of the drill press?

Page 6: COMP155 Computer Simulation September 10, 2008. Discrete Event Simulation  discrete event simulation: state variable change only at a discrete set of

Components of a Simulation/Model

Entities Attributes Resources Queues Global Variables Statistical Accumulators Events Simulation Clock

Page 7: COMP155 Computer Simulation September 10, 2008. Discrete Event Simulation  discrete event simulation: state variable change only at a discrete set of

Entities Things that move around, change status,

and interact with other entities Entities are dynamic objects:

arrive, move around, leave Usually represent “real” things

DP system: entities are the partsMay have “fake” entities for modeling “tricks”

○ Breakdown demon, break angel May have multiple realizations (instances)

in system concurrently May have multiple types of entities

concurrently

Page 8: COMP155 Computer Simulation September 10, 2008. Discrete Event Simulation  discrete event simulation: state variable change only at a discrete set of

Attributes Characteristic of all entities: describe,

differentiateAll entities of same type have same attribute “slots”

but different values Possible Attributes:

○ Time of arrival, due date, priority, color Notion of an attribute is same as in other CS

contexts (OO, UML, ER …) Arena defines certain automatic attributes,

developer adds application specific attributes

Page 9: COMP155 Computer Simulation September 10, 2008. Discrete Event Simulation  discrete event simulation: state variable change only at a discrete set of

Resources Resources are things that entities compete for

○ People, Equipment, Space Entities seize a resource, use it, release it

Better to think “resource is assigned to an entity”, rather than an “entity belonging to a resource”

Resources may have several units of capacityexamples

○ seats at a table in a restaurant○ identical ticketing agents at an airline counter

Number of units of resource may change during a simulation run

Page 10: COMP155 Computer Simulation September 10, 2008. Discrete Event Simulation  discrete event simulation: state variable change only at a discrete set of

Queues A queue is a place for entities to wait when

they can’t move forwardexample: need to seize an unavailable resource

Queues have namesname often tied to a corresponding resource

Queues generally have finite capacity need to model what happens if an entity arrives at

a full queue

Page 11: COMP155 Computer Simulation September 10, 2008. Discrete Event Simulation  discrete event simulation: state variable change only at a discrete set of

Global Variables Global Variables reflect characteristics

of whole system, not of specific entitiesExamples:

○ Travel time between all station pairs○ Number of parts in system○ Simulation clock (built-in Arena variable)

Entities can access and change variables Arena defines certain global variable,

developer adds application GVs

Page 12: COMP155 Computer Simulation September 10, 2008. Discrete Event Simulation  discrete event simulation: state variable change only at a discrete set of

Statistical Accumulators Used to record information needed for

output performance measurespassive variables: used for recording,

but not for processing in simulation Arena automatically handles

most statistical accumulatorsinvisible to simulation logic

Page 13: COMP155 Computer Simulation September 10, 2008. Discrete Event Simulation  discrete event simulation: state variable change only at a discrete set of

Variables vs. Accumulators Global Variables:

simulation clocknumber of parts in queue (now)

Statistical Accumulators:number of parts drilled (so far)total of queue waiting times (so far)max time in queue (so far)max time in system (so far)

Page 14: COMP155 Computer Simulation September 10, 2008. Discrete Event Simulation  discrete event simulation: state variable change only at a discrete set of

Events Something that happens at an instant of time May change attributes, variables or statistical

accumulators System maintains an event calendar

used to determine next interesting instance in time Discrete-event simulation

by definition, nothing in system changes between events

Page 15: COMP155 Computer Simulation September 10, 2008. Discrete Event Simulation  discrete event simulation: state variable change only at a discrete set of

System Clock Global variable maintained by Arena

to track simulation time Clock advances as events are processed

Page 16: COMP155 Computer Simulation September 10, 2008. Discrete Event Simulation  discrete event simulation: state variable change only at a discrete set of

Experiment Design A run or execution of a simulation gives

information about one set of conditions with one set of random inputs

Multiple runs are needed to deal with:randomnessconfiguration changes

Page 17: COMP155 Computer Simulation September 10, 2008. Discrete Event Simulation  discrete event simulation: state variable change only at a discrete set of

Randomness in Simulation A single simulation run is not sufficient for

non-deterministic systems Drill press simulation: five replications:

Notesubstantialvariabilityacrossreplications

Page 18: COMP155 Computer Simulation September 10, 2008. Discrete Event Simulation  discrete event simulation: state variable change only at a discrete set of

Comparing Alternatives Goals may require comparison of different

system configurationsparticularly when simulation is used for designwhat is the fastest, cheapest or “best” design

Drill press system: What would happen if the arrival rate were to double?Cut interarrival times in halfRerun the model for double-time arrivalsMake five replications

Page 19: COMP155 Computer Simulation September 10, 2008. Discrete Event Simulation  discrete event simulation: state variable change only at a discrete set of

Drill Press Simulation Results Circles:

original arrival times Triangles:

arrival rate doubled

solid: replication 1

hollow:replications 2-5

Page 20: COMP155 Computer Simulation September 10, 2008. Discrete Event Simulation  discrete event simulation: state variable change only at a discrete set of

Assignment 3 Teams of 4 Develop a simulation study using Arena Problems from IIE/RA annual contest

IIE: Institute of Industrial EngineersRA: Rockwell Automation

Finished reports due September 29

Page 21: COMP155 Computer Simulation September 10, 2008. Discrete Event Simulation  discrete event simulation: state variable change only at a discrete set of

Assignment 3: First Task Goals of study

informal list Informal model of system

block/flow diagram identify entities, resources, processes, queues