Problems of queueing model
• Simulation examples
• Single channel queue example
• Able-baker example
• Inventory system
Able baker problem
• In this model,
• There are two servers. Able and baker
• Able server does the job better than the Baker server
• Baker gets the customer when the able server is busy
• When both the servers are idle, able server gets the
customer
Example 1
• Simulate the able-baker problem for 10 customers given that the
interarrival distribution and service time distribution is as given
below.
• Calculate the following
• Average waiting time
• Average service time of able and baker server
• Consider the following random numbers for
• Arrival time : 26, 98, 90, 26, 42, 74, 80, 68, 22
• Service time : 95, 21, 51, 92, 89, 38, 13, 61, 50, 49
Inter arrival time Probability
1 0.25
2 0.40
3 0.20
4 0.15
Service time-able Probability
2 0.30
3 0.28
4 0.25
5 0.17
Service time-Baker Probability
3 0.35
4 0.25
5 0.20
6 0.20
Example 2
• Simulate the able-baker problem for 10 customers given that the
interarrival distribution and service time distribution is as given below.
• Calculate the following
• Average waiting time
• Average service time of able and baker server
• Average time customer spends in the system
• Average time between arrivals
• Consider the following random numbers for
• Arrival time : 9, 60, 73, 35, 88, 10, 21, 49, 53
• Service time :32, 94, 79, 5, 75, 84, 57, 55, 30, 50
Inter arrival time Probability
1 0.35
2 0.10
3 0.15
4 0.40
Service time-able Probability
2 0.4
3 0.1
4 0.3
5 0.2
Service time-Baker Probability
3 0.35
4 0.20
5 0.25
6 0.20
Simulation of inventory system
• Inventory system has a periodic review of length N at which
time the inventory level is checked.
• An order is made to bring the inventory up to level M
• At the end of review period an order of quantity Q is placed.
• Demands are not known usually, so order quantities are
probabilities.
• Demands are not usually uniform and do fluctuate over time
Example 1
• A paper seller buys the paper for Rs 4 each and sells them for Rs 6 each,
the newspaper not sold at the end of day are sold as scrap for 0.5 each.
There are three types of days “good, fair, poor” with probabilities 0.4,
0.35, 0.25 respectively. Develop a simulation table for purchase of 70
newspapers and demand for 10 days. Calculate the total profit.
• Given that random numbers for types of news days are 94, 77, 49, 45 ,
43, 37, 49, 0, 16, 24 and for demand are 80, 20, 15, 88, 98, 65, 86, 73,
24, 60. instead of 70 papers ,if 80 papers is purchased will it be more
profitable?
• Profit=revenue of sales- cost of newspaper-lost profit from excess
demand + salary of sales of scrap paper
• Distribution of newspaper demand is as follows
Demand Good probability Fair probability Poor probability
40 0.03 0.10 0.44
50 0.05 0.18 0.22
60 0.15 0.40 0.16
70 0.20 0.20 0.12
80 0.35 0.08 0.06
90 0.15 0.04 0.00
100 0.07 0.00 0.00
Example 2
• A baker bakes 30 dozens of bread each day. The probability
distribution of customers in table 1. customers order 1,2,3 or 4
dozens of bread loafs according to distribution given below in
table 2. assume that each day all the customers order the same
dozens of bread loafs. The selling price is rs 5.40 per dozen and
making price is rs 3.80 per dozen. The left over bread loafs will be
sold for half price at profit of baker. Instead of 30 dozens , if 40
dozens are baked per day will it be more profitable?
• Random digits are
• Customers : 50, 61, 73, 24, 96
• Dozens : 5,3,7,0,8
Table 1
Number of customers per day Probability
8 0.35
10 0.30
12 0.25
14 0.10
Table 2
Number of dozens/customers Probability
1 0.4
2 0.3
3 0.2
4 0.1
Example 3
• Dr XYZ is dentist who schedules all patients for 30 min
appointments. Some of the patients take more or less than
30 min. depending upon type of dental work to be done. The
following table shows the various category of work,
probability and time required to complete the work
• Simulate the dental clinic for 3 hours and determine the
following
• Average waiting time
• Total idle time of the doctor
• Assume that patients show up at clinic at exactly at their
scheduled time starting from 8.0 am. Use the following
random numbers for handling the above problem
• 40, 82, 11 , 34, 25, 66
Categories Probability Time required
Filling 0.40 45
Crown 0.15 60
Cleaning 0.15 15
Extraction 0.10 45
Check up 0.20 15
Lead time inventory system
Example 1
• Suppose that the maximum inventory level M is equal to 11
units and review period N in equal to 5 days.
• The problem is to estimate the average ending units in the
inventory and number of days where shortage occurs for the
problem lead time in random variable. Assume that the
orders placed at the close of the business and received for
the inventory at the beginning depending on the lead time.
For this problem we begin inventory with 3 items and
assume that the first order of 8 items arrive at third day
morning
• Order quantity=order up to level-ending inventory +
shortage quantity
• Consider the following random numbers for different cycles
• For lead time : 5, 0, 3,4,8
Cycle Random digits
1 24, 35, 65, 81, 54
2 3, 87, 27, 73, 70
3 47, 45, 48, 17, 09
4 42,87, 26, 36, 40
5 7, 63, 19, 88, 94
Random digit demands Probability
0 0.10
1 0.25
2 0.35
3 0.21
4 0.09
Random digit lead time Probability
1 0.6
2 0.3
3 0.1
Example 2
• Demand for widgets follows the following probability
distribution
• Stock is examined every 7 days (the plant is in operation
every day) and if the stock level has reached 6 units or less
an order for 10 widgets is placed. The lead time is
probabilistic and follows the following distribution
Demand 0 1 2 3 4
Probability 0.33 0.25 0.20 0.12 0.10
• When the simulation begins 12 widgets are on hand and number of
orders have back ordered (back ordering is allowed)
• Simulate the operation of this system for 6 weeks. For lead time ,
random numbers are 3, 1, 1, 4, 0, 4
• The random numbers for the simulation is
Lead time 0 1 2
Probability 0.3 0.5 0.2
Cycle Random digits
1 94, 87, 63, 66, 30, 69, 37
2 01,66,51, 92, 36, 47, 80
3 94, 31,07, 09, 19, 29,29
4 94,87, 85, 66, 78, 94, 56
5 67, 07, 43, 36, 03, 46,16
6 74, 82, 31, 17, 00, 08, 85
Example 3
• The number of fridge ordered each day is randomly
distributed as shown below
• The distribution of lead time is given below
Demand 0 1 2 3 4
Probability 0.10 0.25 0.35 0.21 0.09
Lead time 1 2 3
Probability 0.6 0.3 0.1
• Assume that the orders are placed at the end of 5th day of
each cycle. The simulation begins with inventory level at 3
refrigerators and an order of 8 refrigerators to arrive is 2
days. Simulate this for 5 cycles according up to level
inventory system . Assume that order up to level is (m) is 11
End of unit 4
Thank you 

Unit 4 queuing models problems

  • 1.
  • 2.
    • Simulation examples •Single channel queue example • Able-baker example • Inventory system
  • 3.
    Able baker problem •In this model, • There are two servers. Able and baker • Able server does the job better than the Baker server • Baker gets the customer when the able server is busy • When both the servers are idle, able server gets the customer
  • 4.
    Example 1 • Simulatethe able-baker problem for 10 customers given that the interarrival distribution and service time distribution is as given below. • Calculate the following • Average waiting time • Average service time of able and baker server • Consider the following random numbers for • Arrival time : 26, 98, 90, 26, 42, 74, 80, 68, 22 • Service time : 95, 21, 51, 92, 89, 38, 13, 61, 50, 49 Inter arrival time Probability 1 0.25 2 0.40 3 0.20 4 0.15 Service time-able Probability 2 0.30 3 0.28 4 0.25 5 0.17 Service time-Baker Probability 3 0.35 4 0.25 5 0.20 6 0.20
  • 5.
    Example 2 • Simulatethe able-baker problem for 10 customers given that the interarrival distribution and service time distribution is as given below. • Calculate the following • Average waiting time • Average service time of able and baker server • Average time customer spends in the system • Average time between arrivals • Consider the following random numbers for • Arrival time : 9, 60, 73, 35, 88, 10, 21, 49, 53 • Service time :32, 94, 79, 5, 75, 84, 57, 55, 30, 50 Inter arrival time Probability 1 0.35 2 0.10 3 0.15 4 0.40 Service time-able Probability 2 0.4 3 0.1 4 0.3 5 0.2 Service time-Baker Probability 3 0.35 4 0.20 5 0.25 6 0.20
  • 6.
    Simulation of inventorysystem • Inventory system has a periodic review of length N at which time the inventory level is checked. • An order is made to bring the inventory up to level M • At the end of review period an order of quantity Q is placed. • Demands are not known usually, so order quantities are probabilities. • Demands are not usually uniform and do fluctuate over time
  • 7.
    Example 1 • Apaper seller buys the paper for Rs 4 each and sells them for Rs 6 each, the newspaper not sold at the end of day are sold as scrap for 0.5 each. There are three types of days “good, fair, poor” with probabilities 0.4, 0.35, 0.25 respectively. Develop a simulation table for purchase of 70 newspapers and demand for 10 days. Calculate the total profit. • Given that random numbers for types of news days are 94, 77, 49, 45 , 43, 37, 49, 0, 16, 24 and for demand are 80, 20, 15, 88, 98, 65, 86, 73, 24, 60. instead of 70 papers ,if 80 papers is purchased will it be more profitable? • Profit=revenue of sales- cost of newspaper-lost profit from excess demand + salary of sales of scrap paper • Distribution of newspaper demand is as follows
  • 8.
    Demand Good probabilityFair probability Poor probability 40 0.03 0.10 0.44 50 0.05 0.18 0.22 60 0.15 0.40 0.16 70 0.20 0.20 0.12 80 0.35 0.08 0.06 90 0.15 0.04 0.00 100 0.07 0.00 0.00
  • 9.
    Example 2 • Abaker bakes 30 dozens of bread each day. The probability distribution of customers in table 1. customers order 1,2,3 or 4 dozens of bread loafs according to distribution given below in table 2. assume that each day all the customers order the same dozens of bread loafs. The selling price is rs 5.40 per dozen and making price is rs 3.80 per dozen. The left over bread loafs will be sold for half price at profit of baker. Instead of 30 dozens , if 40 dozens are baked per day will it be more profitable? • Random digits are • Customers : 50, 61, 73, 24, 96 • Dozens : 5,3,7,0,8
  • 10.
    Table 1 Number ofcustomers per day Probability 8 0.35 10 0.30 12 0.25 14 0.10
  • 11.
    Table 2 Number ofdozens/customers Probability 1 0.4 2 0.3 3 0.2 4 0.1
  • 12.
    Example 3 • DrXYZ is dentist who schedules all patients for 30 min appointments. Some of the patients take more or less than 30 min. depending upon type of dental work to be done. The following table shows the various category of work, probability and time required to complete the work • Simulate the dental clinic for 3 hours and determine the following • Average waiting time • Total idle time of the doctor
  • 13.
    • Assume thatpatients show up at clinic at exactly at their scheduled time starting from 8.0 am. Use the following random numbers for handling the above problem • 40, 82, 11 , 34, 25, 66 Categories Probability Time required Filling 0.40 45 Crown 0.15 60 Cleaning 0.15 15 Extraction 0.10 45 Check up 0.20 15
  • 14.
  • 15.
    Example 1 • Supposethat the maximum inventory level M is equal to 11 units and review period N in equal to 5 days. • The problem is to estimate the average ending units in the inventory and number of days where shortage occurs for the problem lead time in random variable. Assume that the orders placed at the close of the business and received for the inventory at the beginning depending on the lead time. For this problem we begin inventory with 3 items and assume that the first order of 8 items arrive at third day morning
  • 16.
    • Order quantity=orderup to level-ending inventory + shortage quantity • Consider the following random numbers for different cycles • For lead time : 5, 0, 3,4,8 Cycle Random digits 1 24, 35, 65, 81, 54 2 3, 87, 27, 73, 70 3 47, 45, 48, 17, 09 4 42,87, 26, 36, 40 5 7, 63, 19, 88, 94
  • 17.
    Random digit demandsProbability 0 0.10 1 0.25 2 0.35 3 0.21 4 0.09 Random digit lead time Probability 1 0.6 2 0.3 3 0.1
  • 18.
    Example 2 • Demandfor widgets follows the following probability distribution • Stock is examined every 7 days (the plant is in operation every day) and if the stock level has reached 6 units or less an order for 10 widgets is placed. The lead time is probabilistic and follows the following distribution Demand 0 1 2 3 4 Probability 0.33 0.25 0.20 0.12 0.10
  • 19.
    • When thesimulation begins 12 widgets are on hand and number of orders have back ordered (back ordering is allowed) • Simulate the operation of this system for 6 weeks. For lead time , random numbers are 3, 1, 1, 4, 0, 4 • The random numbers for the simulation is Lead time 0 1 2 Probability 0.3 0.5 0.2 Cycle Random digits 1 94, 87, 63, 66, 30, 69, 37 2 01,66,51, 92, 36, 47, 80 3 94, 31,07, 09, 19, 29,29 4 94,87, 85, 66, 78, 94, 56 5 67, 07, 43, 36, 03, 46,16 6 74, 82, 31, 17, 00, 08, 85
  • 20.
    Example 3 • Thenumber of fridge ordered each day is randomly distributed as shown below • The distribution of lead time is given below Demand 0 1 2 3 4 Probability 0.10 0.25 0.35 0.21 0.09 Lead time 1 2 3 Probability 0.6 0.3 0.1
  • 21.
    • Assume thatthe orders are placed at the end of 5th day of each cycle. The simulation begins with inventory level at 3 refrigerators and an order of 8 refrigerators to arrive is 2 days. Simulate this for 5 cycles according up to level inventory system . Assume that order up to level is (m) is 11
  • 22.
    End of unit4 Thank you 