Chapter 3

March 28, 2018 | Author: Tesfahun Girma | Category: Monte Carlo Method, Object (Computer Science), Control Flow, Time, Applied Mathematics


Comments



Description

Discrete-Event Simulation: Contents • Objects of the system: entities, classes, attributes and sets • Operation of entities: event, activity and process • Activity cycle diagram they have unique values with in the system or for each entity . and is the object of interest • Example: if college is considered as a system. attributes and sets • DES is most prevalent type of simulation • In DES. a system is the main object • System – any object which has some action to perform and is dependent on a number of objects – Entity – is an object which make up a system. laboratories etc are its entities – Attributes – are properties of the system or entity. students.Objects of the system: entities. then classrooms. classes. number of units in the system » S2.customers in queue and their identity .• Every system has a state – Set of data stored in variable – Captures salient features of a system – Allows to describe state evolution of system – It can be defined in various ways depending on system to be modeled and need in performance analysis • Example – for a single server system » S1. then S(t)=n+1 if job arrival event occurs and n-1 if job completion event occur .Examples.single machine system with out failure • It is FIFO buffer • The state S(t) is the number of jobs in the system at time t • There are two events – Job arrival event – Service completion event • At time t. if S(t) is n. 1) If n=1 If n>1 (n. V(t)) – N(t) is the number of jobs in the system – V(t) is the status of the machine ( 0 idle.1) (n.Example 2. 1) (n.v) ( n. 1 busy and 2 failed) • The events are – – – – Job arrival Job completion Machine failed Machine repaired • State transition will be job arrival ( n.2)  (0.1) .2) (n.machine with failure • The state of the system is represented as S(t)=(N(t). v) service completion failure arrival repair completion (n+1.0)  (n  1. is execution of a procedure at the event occurrence time – When each event occurs. state vector will be either incremented or decremented . activity and process • Event – is a data structure that contains a field containing its time of occurrence and other fields – Occurrence of an event.Operation of entities: event. simulation state is assumed constant . events are linked to each other according to their occurrence • Execution of an event may schedule another event • Between events.• Evolution of simulation is governed by clock and event list • In the event list. • Activity is a function to be performed by an entity – Are described with preconditions and actions – Condition must be fulfilled for an activity’s operation to be scheduled and performed • Process – is the sequence of operations that an entity passes through during its life in a system – Are sequence of events or activities – Describes the behavior of an entities that flow through a system – Useful for description of systems having resource contention – Are represented by control flow diagrams which show the sequence of processes that each entity passes through . else find the next event Advance the clock to the time of the next event and execute it 5 Loop back to step 3 .DES algorithm 1 2 3 4 Set simulation clock to zero Generate one or more events and schedule them If event list is empty stop. 8 1 7 6 8 7 8 6 5 4 3 6 4 5 2 6 4 7 7 6 . Monte Carlo Sampling and histories • Monte Carlo simulations involve random values • Generated using random number generators (RNG) – RNG are used to schedule random events – Event time = Random number generated from sample of inter event time + current clock time • DES performance evaluation – Is a statistical experiment – Performance measures are estimated from a set of histories – Steps in performance estimation • Multiple simulations are run using random numbers • One or more performance measures are computed from each run • The performance values are taken as samples and statistical computations are performed . Design methods • • • • Activity cycle diagram Event oriented graph Petri-Net approach Control graph . Activity cycle diagram • Is a graphical representation technique used to describe activity and process interaction models • It models interaction of entities • It describes the progression of activity and queue states that entities pass through • In an activity cycle diagram entities come together to engage in activities and when the activity is complete the entities move on to reside in a queue until required for another (or repeat of the same) activity. . usually represented by a circle and rectangle respectively. • Only two symbols are required to be represented in the model : a queue and an activity. • Alternating sequence of activities and queues. • Symbols used • Two types of entities may exist – Entities which enter and leave the system • World queue – special queue – Entities which totally reside inside the system • Dummy queues have to be inserted if activities continue without any delay • All activity cycles have to be closed loop . activity • Merge the individual activity cycles • Verify the logic of the diagram and amend as necessary.queue . . • List all entities and their key attributes • For each entity define its individual closed cycle of activity .Steps in developing ACD • Specify the model domain. Specify the model domain. then grabs the server and gets service. Finally leaves the system – Server takes in a customer and then serve it and come back to idle step . • Specify the objective of the model • Specify the main activities in the model • Example : single server system – Customer arrives and waits until server is idle. List all entities and their key attributes • Entities are – Customer – Server • Attributes – Customer – arrival time and service time – Server – idle or busy . For each entity define its individual closed cycle of activity .activity • Customer activity cycle Customer Arrival World queue Wait for server Get service • Server activity cycle Serve customer idle .queue . Merge the individual activity cycles • Identify common activities • Serve customer and get service activities are the same Customer Arrival World queue Get service Wait for server idle . Some issues in ACD • Arrival activities – Is a special activity – World queue contains infinite entities – No control over arrival time – Artificial entity called ‘gate’ which interact with arrival activity World queue Arrival Hold gate . Some issues cont… • Time limited cycles – Some activities may be multi period controlled – Extend the principle of arrival activity – Example – traffic light – 3 period time limited • Green .5 minute.5 minutes • Resource limitation – some entities may have limited availability • Example : if queue size is limited . Amber -30 seconds and Red – 5. Extended conventions of ACD symbols • Queue – Include • Name.is name of queue for easy reference • Number – is id for easy reference • Capacity – is maximum queue capacity • Activity – Source and destination queue numbers – Activity name. activity number – Other parameters . DRAFT and GASSONL .Simulation program generator • Main use of ACD is as front end in simulation program generator • Simulation program generator is a program that generates high level language codes from ACD or other graphical inputs • CAPS/ECSL.
Copyright © 2024 DOKUMEN.SITE Inc.