Python Forum

Full Version: queueing theory HELP
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
you are provided with four text files that have the inter-arrival times and service times of
100,000 data packets.
• The first file called “interArrivals.txt” has the time between arrivals for 100,000 data packets
with a mean time of 0.2 seconds between arrivals (generated using the Exponential
distribution). NOTE: we assume that the first packet arrives at time 0 (this is why the
first number in the file is 0).
• The remaining three files (“serviceTimesMu3.txt”, “serviceTimesMu6.txt” and
“serviceTimesMu8.txt”) contain the service times of the same 100,000 packets that
correspond to three different service rates of 3, 6 and 8 packets/sec respectively.
4.1) Using Python, develop a tool to simulate a router with a single server queue with infinite buffer and
a service rate of 8 packets/sec (use “serviceTimesMu8.txt”). Here are some suggestions/tips for your
coding:
• Create 5 different arrays: one for inter-arrival times, one for service times, one for the actual
arrival time on the clock, one for the delay experienced in the queue, and one for departure times.
• You know that a packet will spend some time in the queue if and only if the previous packet is
still being processed. Otherwise, the delay will be 0. See course notes from the example by hand.
• Hint for processing the given files: Since the first packet entering the system is a special case
(has a queuing delay = 0 and total delay = service time), you can hardcode these values in the
arrays that you created before processing the rest of the packets. Each subsequent packet after the
first one will depend on the one before it to determine its queueing delay and departure time. With
this information, you should be able to fill all your arrays.
What is your question for us? Please review the link to the rules in my signature (most importantly, the parts about asking good questions) and then make another post (on this thread) with enough for us to be able to help you.
Thank you for your reply, but it is a lab question needed from my side and I tried to understand what is needed and failed, I also don't know how to solve it.

In this lab, you are provided with four text files that have the inter-arrival times and service times of 100,000 data packets.

• The first file called “interArrivals.txt” has the time between arrivals for 100,000 data packets with a mean time of 0.2 seconds between arrivals (generated using the Exponential distribution). NOTE: we assume that the first packet arrives at time 0 (this is why the first number in the file is 0).

• The remaining three files (“serviceTimesMu3.txt”, “serviceTimesMu6.txt” and “serviceTimesMu8.txt”) contain the service times of the same 100,000 packets that correspond to three different service rates of 3, 6 and 8 packets/sec respectively.

4.1) Using Python, develop a tool to simulate a router with a single server queue with infinite buffer and a service rate of 8 packets/sec (use “serviceTimesMu8.txt”). Here are some suggestions/tips for your coding:
• Create 5 different arrays: one for inter-arrival times, one for service times, one for the actual arrival time on the clock, one for the delay experienced in the queue, and one for departure times.
• You know that a packet will spend some time in the queue if and only if the previous packet is still being processed. Otherwise, the delay will be 0. See course notes from the example by hand.
• Hint for processing the given files: Since the first packet entering the system is a special case (has a queuing delay = 0 and total delay = service time), you can hardcode these values in the arrays that you created before processing the rest of the packets. Each subsequent packet after the first one will depend on the one before it to determine its queueing delay and departure time. With this information, you should be able to fill all your arrays.
this forum is focused on learning. just re-posting the text of assignment does not help. I would suggest you read item 4.1. in your assignment - there are some hints how to approach the task as well as they refer to your course notes for example
(Sep-18-2020, 06:35 PM)ramymaarouf Wrote: [ -> ]I tried to understand what is needed
(Sep-18-2020, 06:35 PM)ramymaarouf Wrote: [ -> ]Using Python, develop a tool to simulate a router with a single server queue with infinite buffer and a service rate of 8 packets/sec (use “serviceTimesMu8.txt”).
Hi, thanks for your help