Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
queueing theory HELP
#1
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.
Reply
#2
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.
Reply
#3
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.
Reply
#4
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”).
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#5
Hi, thanks for your help
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  What's the full answer to this question in python? (bayesian decision theory) Hblaugrana 1 2,475 Oct-31-2018, 02:22 PM
Last Post: j.crater

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020