System- A collection of entities that interact towards the accomplishment of some logical end

Examples of entities

1. customers in a store

2. Students in a cafeteria line

3. Packets in the internet

4. orders in a restaurant

5. automobiles on an assembly line

 

 

An attribute - a property of an entity

1. Number of items per customers

2. whether the tray is empty

3. destined for the local node or another node

4. whether the order has been filled

5. number of parts assembled

Activity-

1. checking out items

2. paying

3. transmitting

4. served

5. assembling the brakes

 

State -a collection of variable to describe the system at a particular time

Examples:

Number of people in line

Number of packets at a node

Whether server is busy

 

Discrete event simulation- modeling a system where the state variables change instantaneously at separable, countable points in time

Not described by a differential equation as in deterministic simulations

Flow of people in a line, packets in a network

Possible aims of the simulation

1. Determine if one needs additional servers( toll booth collectors or cashiers)

2. Determine if more machines should be ordered

3. Determine if the inventory schedule is correct

 

 

Events

Arrival of a Customer

Machine 4 finished its job

Customer 4 leaving a system

 

 

 

System

Entities

Attributes

Activities

Events

State Variables

Banking

Customer

account

Balance

Making deposits

Arrival

Departure

Number of busy tellers

No. of customers

Rail

Riders

Destination, origin

Traveling

coming to a station

no. of riders in transit

no. of riders waiting at a station

Inventory

Warehous

Capacity

Withdrawing

Demand

level of inventory

backlogged demands

           

Cafeteria, fast food restaurant, auto assembly line

 

Simplest example 1 queue and 1 server

Usually want to know

how much time has passed since a person entered a queue until he has been serviced

average number of people in line

Does queue exceed a prescribed number

How much time is the server idle?

State variables

Whether server is idle

Number of people in line

Arrival times

Amount of time for service for each customer

Types of Events

Arrival of a customer

Might change server to busy( when will this happen)

or

Increase the number of people in a queue

Departure of a customer

Server might be changed to idle- when?

or

Decrease the number in queue

End of simulation

 

What does a simulation need?

(1) A clock- some way of keeping track of time

a. Time driven

fixed increment might look at 1:00, 1:01, 1:02, 1:03 and

at each time increment ask if there is an event.

b Event driven

Time advanced when next event occurs

Assume arrivals at 1:05, 1:17 and 1:23

and departures at 1:18, 1:37 1:46

See only 1:05 , 1:17, 1:18, 1:23, 1:37, 1:46

Times of inactivity skipped

What is the advantage of event driven?

What do you need to keep track of the events-

event list- a sorted list

not a queue or a stack

(2) Way of generating meaningful interarrival times and service times

a. Service time at an airline counter varies depending on whether a ticket needs to be purchased

b. At a tool booth service time varies whether it is easy pass, token, or money

c. Arrival distribution

Movie theatre

Grocery store

gas station

cafeteria at wpu

How would you handle generating times if you were told

1. Equally likely between 1 and 8 minutes?

2.

Probability

1 minute 10%

2 minutes 30%

3 minutes 50%

4 minutes 10%

Solution: Random integer between 1 and 10

1 assign 1

2,3,4 assign 2

5,6,7,8,9 assign 3

10 assign 4?

3. How about?

1 minute - 1/3

2 minutes 1/4

3 minutes 1/4

4 minutes 1/6

 

 

Assume given interarrival times at 3,5,3, 2

What are the "arrival times"?

0,3,8,11,13

and service times 2,6,4,1, 5.

When do they begin service?

0,3,9,...

Easy to make a table

Interarrival

Arrival

Service Begins

Service time

Service

ends

time in system

time waiting

 

0

0

2

2

2

0

3

3

3

6

9

6

0

5

8

9

4

13

5

1

3

11

13

1

14

3

2

2

13

14

5

19

6

1

When are the arrival and departure events?

0,2,3,8,9,11,13,14,19

Statistics

1.Utilization - total service time/total time=18/19

2. Average service time = total service time/ number of customers 18/5=3.6

3. Average waiting time= total wait/time/number of customers 4/5=.8 minutes

4. Probability of waiting- number who wait/total customers 3/5=.6

5. average time between arrivals- sum of arrivals/(number of arrival -1)= 13/4

6. Expected service time= sum of time*probability of that time

1* .2 + 2*.2 + 4*.2 +5 *.2 +6*.2 = .2*18=3.6

Not always equal to average service time

Really relevant:

**** THIS THURSDAY! ****

MURRAY HILL
MATHEMATICS RESEARCH COLLOQUIUM
& INFORMAL SEMINAR

Date: Thursday, September 23, 2004

Time: 2:00 pm

Place: MH 2D-101

Speaker: SASHA STOLYAR
Lucent Bell Labs

Title: MAXIMIZING QUEUEING NETWORK UTILITY SUBJECT TO STABILITY

ABSTRACT

We study a model which accomodates a wide range of (seemingly very
different) resource allocation problems in communication networks.
Some examples: congestion control of complex time-varying (wireless)
networks, minimizing average power consumption in wireless networks,
scheduling in wireless systems subject to power consumption and/or
traffic rate constraints.

The model is a controlled queueing network, where controls have a dual
effect. In addition to determining exogenous customer arrival rates,
service rates at the nodes, and (possibly random) routing of customers
among the nodes, each control decision produces a certain vector of
"commodities". The set of available control choices depends on the
underlying random network mode. Network "utility" is a concave function
of the vector of long-term average rates at which commodities are
produced. The goal is to maximize utility while keeping network queues
stable. We introduce a (very parsimonious) dynamic control policy,
called the Greedy Primal-Dual algorithm, and prove its asymptotic
optimality.

Let's do another:

Interarrivals at 5 1 4 3 2 1

Service times 1 1 8 8 4 2

How about 2 servers where server one takes 3 minutes and server 2 5 minutes and the same interarrival rates