Вы находитесь на странице: 1из 13

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
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
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

#1. Name several entities, attributes, activities, events,


and state variables for thefollowing systems
A cafeteria
Entities: client, cashier, waiter, e.g. Attributes of a client: hungry,
hurried. Attributes of a cashier: faster, reliable, responsible, skilled in
mathematics. Attributes of a waiter: faster, reliable, expert in the
products. Activities: take orders, collect payments, dispatch orders,
e.g.Events: arrival and departure of clients, lack of raw material, faults in
theequipment.State variables: number of occupied tables, number of
orders per table, numberof people that pay with cash or credit card, number
of clients waiting forattention.

A grocery store
Entities: client, cashier, distributor, salesperson. Attributes of a cashier:
faster, reliable, responsible, skilled in mathematics. Attributes of a
distributor: faster, reliable, responsible, punctual. Attributes of a
salesperson: faster, reliable, responsible, skilled in sales. Activities: sell
products, fill displays, organize the supermarket carts.Events: arrival and
departure of clients, reception of products, lack of products.State variables:
number of people that pay with cash or credit card, number ofclients waiting
for attention, number of sold products per day

A Laundromat
Entities: client, washing machines, employees. Attributes of a client: hurried,
with a lot of clothing to wash. Attributes of a washing machine: faster,
economic, high capability, long-lasting. Attributes of an employee:
faster, reliable, responsible, expert in repairing andinstalling
washing machines. Activities: wash clothes, separate clothes by colors and c
haracteristics, dryclothes, collect payments.Events: arrival and departures of
clients, faults in the washing machines,damages in the clothing, lack
of washing materials.States variables: number or clients per day, number of
washing machines,amount of pounds of washed clothing per day.
A fast-food restaurant
Entities: client, cashier, employee, deep fryer. Attributes of a cashier: faster,
reliable, responsible, skilled in
mathematics. Attributes of an employee: faster, reliable, responsible, expert
in attention tothe client.
Attributes of a deep fryer: high capability, long-lasting, fast
cooking. Activities: take orders, dispatch orders, cook the food, serve the
clients.Events: lack of raw material, damages in the equipment, arrival and
departureof clients, lack of staff.State variables: number of orders, number
of clients waiting for, number ofoccupied seats, amount of sold products,
dispatching time
A hospital emergency room
Entities: doctor, nurse, patient, equipment. Attributes of a doctor: safe,
expert in his/her science, calm, intelligent. Attributes of a nurse: safe,
expert in her science, patient, responsible. Attributes of the equipment:
high capability, long-lasting,
sterilized. Activities: vaccinate, feed the patients, administering medicines, h
eal thewounds, evaluate the patients.Events: lack of medicines, lack of staff,
lack of beds, arrival and departure ofpatients.State variables: number of
patients, amount of administrated medicines,number of empty beds, number
of registered cases.

A taxicab company with 10 taxis


Entities: client, taxi driver, taxi, radio operator. Attributes of a taxi driver:
responsible, respectful, reliable, good driver. Attributes of a taxi: economic,
good condition, long-lasting. Attributes of a radio operator: responsible,
respectful, faster with the callings. Activities: pick passengers, answer
callings, deliver things, collect payments.Events: taxicabs with mechanical
problems, taxicabs with flat tires, absence oftaxi drivers, detained
taxis.State variables: number of clients, amount of gained money per day,
number ofreceived callings per day, amount of mileage per taxicab in a day.

An automobile assembly line


Entities: operator, robotic arm, inspector. Attributes of an operator:
responsible, faster, careful, skilled in assembling. Attributes of a robotic
arm: long-lasting, faster, economic. Attributes of an inspector: responsible,
careful, tricky, skilled in assembling. Activities: put parts,
assemble automobiles, transport automobiles through theassembly
stations.Events: lack of parts to assemble, absence of an operator, damages
in therobotic arm, lack of inspection tools.States variables: number of assembled
cars per day, amount of used parts perday, amount of time to assemble a car, number
of automobiles waiting forassembling.

Вам также может понравиться