0% found this document useful (0 votes)
27 views38 pages

Chapter 4 Simulation World Views

The document discusses different approaches for modeling simulation systems including event-based, activity-based, process-based, and three-phase approaches. It also provides an example of modeling a client-server human resources system and compares event-based and activity-based designs for the system.

Uploaded by

kesisdrderejesh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views38 pages

Chapter 4 Simulation World Views

The document discusses different approaches for modeling simulation systems including event-based, activity-based, process-based, and three-phase approaches. It also provides an example of modeling a client-server human resources system and compares event-based and activity-based designs for the system.

Uploaded by

kesisdrderejesh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 38

Chapter 4

Simulation world views


Event, Activity, Process and three
phase approaches for modeling
Content
• The event approach
• The activity approach
• The process interaction approach
• The three phase approach
Introduction
• Simulation world view
– Answers the question of how to get a good
simulation model
– Provide a framework for defining a system in
sufficient detail
– Must define the dynamic state transition that
occur over time
The Event Approach
• System is viewed as a series of instantaneous events
that change the system
• Identify the events and the state changes that occur
• Simulation time cannot advance with in time
• An activity that transpire with time needs two events,
for its start and end
• Important questions to be answered
– How is the state of the system defined
– What events can occur which change the state of the system
• Time events
• Change events
• Cross events
– What is the logic in each event for state transition
Example: A client-server system with limited
capacity

• Events
– New Customer arrival and customer departure
• States
– Number of busy servers and number of customers
waiting service
• State transitions
– Arrive event – schedules another new event
• Sometimes events may also cancel another event
– Depart event
• Time advances from event to event
• Events are associated with procedures in
programming languages
• End of simulation is based on simulation time
or number of customers served
– Special event – end simulation
• Priority of events
– Can be implemented by using a modified event list
– Events
• E(type, time_of_occurence)
The activity interaction approach
• Activities and their preconditions(triggers) are the focus
• It is a state based approach to modeling and events can
be based on conditions
• Also known as activity scanning approach and two phase
approach
• In the modeling
– Types of events that occur
– Their causal relationship has to be defined
– Use modeling formalisms to describe the model
• Activity cycle diagram
Activity scanning cont…
• Has two phases
– Time flow phase
• advance time
– Activity scanning phase
• check activities whose condition is fulfilled
• Process it
• End of simulation can be activated like event
based approach
The process approach
• Started in the 80’s
• Movement of entities through a system is modeled
• The process flow is described by a series of process
steps that model the state changes that take place in
the system
• A process executes as a sequence of events
• To model a system
– What are the entities that move through the system?
– What processes are executed as the entity moves through
the system?
Example: Process model of simple client-server
system
• Process models are defined in the form of
flowchart
• Entities enter the process at the first step and exit
the process at the last step
• In our example
– Customer enter the process
– Wait to seize the resource or server
– Delay by the processing time
– Release the server
– Tally their time in system
Service operation is modeled by a resource that can be seized and released by
entities as they flow through the process

Seize step simulates the time delay until server becomes available – this is a
conditional delay

Delay step simulates a planned delay of processing time


The three phase approach
• Is combination of Activity scanning and event
based approaches
• Solves problem of activity scanning
• Activity scanning uses fixed time step
– Time slice selection problem
• As small as the smallest time interval between two
events
• Some events may be extremely far apart – activity
scanning simulator checks all conditions
Three phase …
• Event based approach and activity scanning are
combined
– Like event scheduling activities are scheduled in the
future time
– At event times, all activities conditions are checked like
activity scanning approach
• Two types of activities
– Bound to occur activities(B) –
• scheduled like event scheduling fashion
• Define unconditional state change by scheduling B type events
– Conditional activities(C)
• Are invoked at event times if their condition evaluates to true
• May schedule B type events in the future
Drawbacks of three phase
• Mixing different world views makes it difficult
to understand
Client -server modeling
• It dates back to 1980s
• It is a versatile, modular and message based architecture
• It contains two parties –client and server
– Client – requester of service
– Server- host providing service
• A host can be client, server or both
• Examples
– Online banking systems
– Web based online shopping
– Inventory management software
– Classroom – wireless
• The architecture improves
– Usability
– Flexibility
– Interoperability
– Scalability
Intro cont…
• Advent of Internet and web has made
available new applications and new challenges
– Distributed systems appeared
– Increased user numbers
• Design issues in capacity planning
– What is the impact of 20% increase in customer
transactions
– Impact of shift in storage (HD) on response time
– Impact of shift of data base to remote host
System architectures
• Client request service by sending message
• Server listens to requests, process and reply
• Associated program and computation is
divided into two- server and client
• N tier architecture – how client interacts with
server
Three tier architecture – middle ware
• Message
– Request message – source, destination, message
body(type of service)
– Reply – source ,destination, message
body(requested service)
• Client

– Generally N message types


– Each having its own rate
– Probability of stream type k is given by
k
qk  N


j1
j

 k Is the rate of message type k and K= 1,2,3, … N


• Response time
– Tr= response time
• Tr= time just after post processing- time just before
preprocessing
• Server model
– One or more CPU and server processes
– A queue for each of them
– Service in CPU may require other servers(disk/IO)
• Communication link
– Is critical in the performance of client-server
systems
– Contains entrance/exit /routers
– Node contains
• Hardware
• Software
– Protocol (ATM,IP,TCP, UDP)
– Is modeled by a simple queue (single server with
queue)

• Arrival entities are messages from client or server


• Buffer has limited size
• Server is the transmission capacity
Transmission model cont…
• Service at server is transmission
– Capacity is given by bandwidth capacity(BWC)
– Message transfer efficiency (MTE)
BWavalable
MTE 
BWtotal

– Mostly 60% to 80% depending up on the protocol


used
– Rest is used by transmission overhead
– Service time calculation
st  (message _ size _ in _ byte) / MTE * BWC(bytes / sec)
Modeling an HR system
• Two tier client server system
• Four client nodes and one server

Server

HR Database

Client
• Schematic representation
HR system modeling cont…
• Client request types and message size

• Client side service request profile


Cont…
• Server side
– TP monitor manages the requests
• Takes 1 millisecond per visit
– Two server processes
• SP1 – serves Add and Delete requests
• SP2- serves Find and Search
HR system modeling cont…
• Transmission network
– BWC of transmission 200bytes/msec
– MTE is 70%

•Performance measures required


1. Average buffer delay in the transmission network and
at each server
2. Utilization level of the transmission network, TP
monitor and Servers
3. Response time statistics
4. Recommendations for service improvements
Event based design
• Define the state of the system
– System contains – clients, transmission network and servers
• S(N,V1,V2,V3,V4)
– N number of customers waiting in transmission queue
– V1 status of transmission network
– V2 status of TP
– V3 status of server 1
– V4 status of server 2
• Identify the events and accompanying state changes
– Arrival of requests in transmission network( 4 types of arrivals)
– Departure from transmission network
– Arrival at TP monitor
– Departure from TP monitor
– Service start at server 1/server2
– Service completion at server 1/server 2
Event based design cont…
• Each event should have
– Time of occurrence
– Type indicator
• Start and end events should also be added
– Start event initialize the system
– End event is scheduled to occur in one hour
Activity based design approach
• Identify the activities and their condition
– Arrival activity (ADD, Delete, Find, Search)
– Transmit activity
– Monitor transaction
– Add activity
– Delete activity
– Find activity
– Search activity
• Identify the entities
– Clients, Transmission network, server 1, server 2, TP monitor
• Draw the activity cycle diagram of each activity
ACD for HR system
Request Add
service queue

queue
Get
transmitted
to server

Reply
queue transmitted

queue
Reply
transmitted

queue

Get service
Activity cycle diagram for transmission network/ TP monitor

Request
arrival

queue
queue

Transmit
activity
Activity cycle diagram for server
1/2

Request
arrival

queue
queue

Transmit
activity
Process based approach
• 4 processes
– Add process
Begin-----seize-----delay-----tally-----end
– Delete process
Begin-----seize-----delay-----tally-----end
– Find process
Begin-----seize-----delay-----tally-----end
– Search process
– Begin-----seize-----delay-----tally-----end
Reading Assignment
• Modeling of e-commerce and supply chain
• Modeling of E- banking system
• Modeling of Wireless web in a class room for
performance analysis
• Modeling telecommunication system

1. Select a modeling approach


2. Based on the approach you selected model the system
3. Identify performance measures

You might also like