General Simulation Principles - PowerPoint PPT Presentation

1 / 60
About This Presentation
Title:

General Simulation Principles

Description:

General Simulation Principles Refer to Chapter 3 Very Important Chapter Section 3.1 Memorize all basic definitions & be able to discuss thoroughly – PowerPoint PPT presentation

Number of Views:180
Avg rating:3.0/5.0
Slides: 61
Provided by: ValuedMSU1
Category:

less

Transcript and Presenter's Notes

Title: General Simulation Principles


1
General Simulation Principles
  • Refer to Chapter 3
  • Very Important Chapter
  • Section 3.1
  • Memorize all basic definitions be able to
    discuss thoroughly
  • Also includes additional material not in book

2
Discrete Event Systems
  • Discrete systems focus of course
  • Framework for modeling systems
  • General Terminology
  • General Purpose Languages vs. Simulation
    Packages
  • Dynamic (over time)
  • Stochastic (randomness)

3
Terminology (pg. 89)
  • System
  • Model
  • System State
  • Entity
  • Attributes
  • List
  • Event
  • Event notice
  • Event list (FEL)
  • Activity
  • Delay
  • Clock

4
Terminology
  • System
  • Model
  • Abstract representation of a system, in form
    other than the system itself
  • Includes relationships that describe system
    (state, entities, activities, events, processes,
    delays, etc.)
  • Mathematical, physical, computer program, etc.
  • Collection of one or more entities interacting
    together over time to accomplish some goal or
    goals
  • School
  • Airport
  • Gas Station
  • Human Body

5
Terminology
  • System State
  • Entity
  • Collection of variables necessary to fully
    describe the system at a point in time
  • Number-in-queue
  • Number-of-servers
  • Status-of-servers
  • Object or component of system that requires
    representation in the model an object of
    interest
  • Customer
  • Server
  • Queue

6
Terminology
  • Attributes
  • Attribute Values
  • Properties of an entity that describe it
  • Length (of queue)
  • Capacity (of queue)
  • Status (of server)
  • Speed (of server)
  • Type (of customer
  • Actual values assigned to an attribute at a
    particular point in time
  • 0 to Capacity
  • 1, 2, 3,
  • Busy, Idle, On-Break
  • Num. Services/Time
  • Business, Personal

7
Terminology
  • List
  • Event
  • Collection of associated entities, ordered in
    some manner
  • FIFO queue of customers
  • Priority queue of customers
  • Available servers
  • Instantaneous occurrence that changes the state
    of system
  • Arrival of customer
  • Completion of service
  • Breakdown of machine

8
Terminology
  • Event Notice
  • Event List (FEL)
  • Record of event to occur at current or future
    time data necessary to execute it event type
    time
  • Arrival, 10
  • End-service, 30
  • Future Event List
  • List of Event Notices ordered by time
  • Typically a linked list
  • Is the driver for a simulation program

9
Terminology ACTIVITY
  • Duration of time of specified length known when
    begins scheduled desired
  • Unconditional wait
  • Duration determination
  • Deterministic always 10 minutes
  • Statistical Uniform (1,10)
  • Functional based on attribute (age, capacity)
  • Begins Ends with an Event
  • Service time Begin Service, End Service

10
Terminology DELAY
  • Duration of time of unspecified, indefinite
    length not known until it ends duration
    determined by system conditions i.e. by other
    events or activities not scheduled or desired
  • Conditional wait
  • Time waiting in queue
  • Time waiting on any other event

11
Terminology CLOCK
  • Variable representing simulated time
  • Elapsed time in smallest time unit necessary
  • Updated with each new event time as the event is
    executed

12
Primary vs. Secondary Events
  • Primary Event
  • Occurrence is scheduled
  • Placed on FEL
  • Arrival, Complete Service
  • Secondary Event
  • Occurrence due to some other event or condition
  • Not on FEL
  • Enter or Leave queue, Begin service

13
Waits Conditional vs.
Unconditional
  • Conditional Wait Delay
  • Caused by some other condition
  • In Queue
  • Unconditional Wait Activity
  • Scheduled
  • Service time

14
Example 2.6 page 51
  • Computer technical support center is staffed by 2
    people, Able Baker, who take calls answer
    questions to solve computer problems. Able is
    more experienced faster. If both are idle,
    Able takes call. If both busy, caller placed on
    hold calls are answered in the order received.

15
State components from Example 2.6
  • System
  • Model
  • System State
  • Entity
  • Attributes
  • List
  • Event
  • Event notice
  • Event list (FEL)
  • Activity
  • Delay
  • Clock

16
Dynamic Relationships Interactions Between
Components
  • Consider the questions on page 91.
  • Answers are necessary to determine correct model.

17
Time Management Methods
  • Determines how CLOCK is managed (updated)
  • Time Slice Approach
  • Continuous Systems
  • vs.
  • Critical Event Approach
  • Discrete Event Approach

18
Time Slice Approach
  • Simulation is controlled by time
  • Clock is incremented by fixed number of time
    units (N) each time
  • State of system is based on everything that
    occurred in past N time units
  • Typical for simulating continuous systems
  • Able to easily compress or expand time by varying
    N

19
Critical Event Approach
  • Simulation is controlled by occurrence of
    critical events
  • Clock is incremented (updated) by variable
    amounts as determined by occurrence of next
    critical event
  • Critical events cause specific changes in state
    of the system
  • Used for discrete systems

20
Time Slice vs. Discrete EventExamples
  • Discuss clock management system updates
  • Continuous
  • Release of pollutants into a river
  • Flood of city due to rain storm
  • Discrete
  • Use of student computer lab
  • Baggage check-in counter at airport

21
Future Events List (FEL)
  • A set of all events that have been scheduled to
    occur at a future time
  • Arrange in chronological order
  • Linked List
  • tlt t1lt t2 lt t3lttn
  • t is value of clock
  • t1 is the imminent event

22
Future Events List
  • What are implementation options? Pros Cons?
  • Array
  • Ordered, Unordered
  • Linked List
  • Ordered

23
Event Scheduling Time Advance Algorithm (main)
  • 1. Remove imminent event
  • 2. Advance Clock
  • 3. Execute imminent event update state
  • 4. Generate future events (as necessary) Place
    on FEL
  • 5. Update Cumulative Statistics counters
  • 6. Repeat (1-5) until simulation ends

24
Stop Event
  • An event whose occurrence causes termination of
    the simulation
  • EXAMPLES
  • 1. Clock time exceeds value N
  • 2. Number of events exceeds value N
  • 3. Queue reaches length L
  • Others ???

25
Critical Events
  • In a basic queuing system, there are 2 critical
    events.
  • What are they?
  • 1. ?????
  • 2. ?????
  • These are events in FEL

26
Arrival Event Processing
ARRIVAL
No
Yes
ENTER QUEUE
ServerBUSY?
BEGIN SERVICE
27
Complete Service Event Processing
Complete Service
Remove from Q
NO
Server Idle
YES
AnotherIN Q?
Begin Service
28
Generating Events
  • Initialize
  • Stop event (if stopping on TIME)
  • First Arrival (of each type)
  • Next Arrival
  • As an Arrival is removed
  • Complete Service
  • As an arrival Begins Service
  • Note on flowcharts ? new event generated

29
Queuing System Components
  • Queue
  • Calling population
  • Discipline
  • Capacity
  • Arrivals
  • Times, rates
  • Nature of

30
Queuing System Components
  • Services
  • Times
  • Nature of
  • System
  • Number of queues
  • Number of servers
  • State variables
  • Capacity
  • Nature of Arrivals/ Departures

31
Characteristics
  • Key elements Customers and Servers
  • Calling Population set of potential customers -
    finite vs. infinite
  • System Capacity the total number which may wait
    and be served at any given time
  • Finite vs. infinite
  • Arrival rate vs. effective arrival rate

32
Characteristics (cont.)
  • Arrival Process
  • Characterized by inter-arrival times of
    successive customers
  • Scheduled vs. random
  • 1 at a time or batches
  • Poisson Arrivals independence
  • Examples

33
Introduction to Queuing Models
  • Queue Waiting line
  • Customer any entity that may request service
    from a system
  • Typical Measures of System Performance
  • Server utilization
  • Length of waiting lines
  • Delays of customers

34
Queuing Models (cont.)
  • Input Parameters
  • Arrival rates
  • Service demand
  • Service rate
  • Number arrangements of servers

35
Start-up vs. Wind-down Conditions
  • Start-up
  • What is state of system when simulation starts?
    Empty? Full?
  • Initialization?
  • Wind-down
  • How is simulation stopped?
  • Are customers left in system? What do you do with
    them?

36
Queuing Models
  • Mathematical Analysis vs. Simulation Analysis
  • Topics to be addressed
  • Dynamic behavior
  • General characteristics
  • Meaning and relationships of the important
    performance measures
  • Estimation of performance measures
  • Effect of varying input parameters
  • Mathematical solutions to basic models

37
Queue Attributes
  • of Phases or Stations (sequential)
  • of Channels (parallel)
  • of Servers
  • Blockers-non blocking stations
  • Capacity
  • Discipline (FIFO, LIFO, Priority, etc.)

38
Queue Behavior
  • Balk upon arrival, customer decides not to enter
    the system
  • Renege after being in queue for some period of
    time, customer leaves system
  • Jockey to change queues after entering one queue

39
Queue Behavior
  • Priority a number affecting the processing of
    customers
  • Preempt to stop serving one customer before
    completion in order to begin serving another
    customer

40
Single Server-Single Queue
Queue
Arrive Server Depart
41
Parallel Servers Same Type Single Queue
S
Arrive ?
Q
Depart
S
42
Parallel Servers QueuesDifferent Servers
A1 Q1 S1 D
A2 Q2 S2 D
A1 A2 have different arrival rates. S1 S2 are
different types w/ different rates.
43
Parallel Servers
S1
Arrive
Depart
Q
S2
S1 S2 provide same service but may have
different service rates. Choice between S1 S2
may be rule-based or random.
44
Sequential Servers
A
D
Q1
S1
Q2
S2
Each customer must receive both services.
45
Goals of Simulation
  • Common Questions
  • 1. Average Queue Length?
  • 2. Amount () of server Idle Time? (Utilization)
  • 3. Mean Waiting time of Customers?
  • 4. Others?
  • Consider
  • Information Cost Value

46
Simulation Methodology
  1. Plan
  2. Model
  3. Validate Verify
  4. Simulate
  5. Apply

47
Simulation Methodology
  • 1. Plan
  • Define problem factors that affect the system
  • Estimate resources needed to observe system and
    collect data
  • Determine feasibility of continuing
  • Consider reduction
  • Collect info.- interviews, literature search,
    observation

48
Methodology (cont.)
  • Model
  • Construct a REPRESENTATION consisting of the
    minimal set possible

49
Methodology (cont.)
  • Validate and Verify
  • Validate to ensure that the model accurately
    represents the system
  • Verify to ensure that the program accurately
    represents the model
  • How? historical data predictions
  • Statistical tests
  • Sensitivity Analysis
  • Reasons for Failure to validate or verify

50
Methodology (cont.)
  • Apply
  • What is output?
  • How should the results be interpreted?
  • How can we use the results?
  • How can we communicate the results to others?

51
Steady State
  • The system is running in such a way that state
    variables (statistics) experience only small
    variations
  • Must consider start- up wind- down
    conditions
  • How can steady state be recognized?
  • Why do we care?

52
Conways Method(Determining Steady State)
  • Take snapshots of some stats independent, not
    cumulative
  • Rule throw out first intervals such that they
    are min or max. When first interval is not, then
    in steady state.
  • Limits Sensitive to interval size.
  • Which stats should be considered?

53
Emshoff Sisson Method(Determining Steady State)
  • Apply Conway to reduce the number of intervals.
    Look at the individual points in the set.
    Determine the of values above below the mean.
    Use Chi Square test to determine if the next
    interval is likely to come from the previous
    cumulative population.
  • Allows for gradual changes in data, but spots
    dramatic or sudden changes.

54
World Views (3)
  • Event Scheduling
  • Process Interaction
  • Activity Scanning
  • Way we view of the model Interactions
  • Languages may favor one view
  • View may be hidden from user

55
Event Scheduling (variable time advance)
  • Approach we have been discussing
  • Schedule Process each individual event,
    updating System State as each is processed
  • Typical approach for simulation in high-level
    language
  • Main loops, removing events from FEL calling
    functions
  • Functions begin-service, enter-queue,
    end-service, etc.

56
Process Interaction (variable time advance)
  • View entities in terms of process they follow
    their life cycle
  • Process time sequenced list of events,
    activities, delays, including demands for
    resources, that define the life cycle of entity
    as it moves through system
  • Underlying support is likely event-based
  • Simscript language

57
Process Example
  • Customer A Definition
  • Arrive at business
  • Get in Queue A
  • Request Service A
  • Receive Service A
  • End Service A
  • Leave business
  • Customer B Definition
  • Arrive at business
  • Get Cart
  • Get in Queue A
  • Request Service A
  • Receive Service A
  • End Service A
  • Return Cart
  • Leave business

58
Activity Scanning (time-slice)
  • Uses fixed time increment rule-based approach
    to determine when activities begin
  • At each time advance, conditions for each
    activity checked, if true then activity starts
  • Simple, can be modular, easily maintainable
  • Repeated scanning can make simulation run slowly
  • GPSS

59
Other World Views
  • Hybrids
  • Some languages, systems support multiple views
  • Many simulation environments hide approach with
    GUI

60
Next!
  • Read Implementation Paper posted on Class Web Site
Write a Comment
User Comments (0)
About PowerShow.com