Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The purpose of this homework is to run a simulation of different queuing policies, and observe their impact on average waiting time. Create a Program

The purpose of this homework is to run a simulation of different queuing policies, and observe their impact on average waiting time.

Create a Program in C++ or JAVA Imagine that we have five interchangeable service stations (airline check-in counters; store check-out counters; DMV service windows; immigration posts in an international airport; etc). Arriving passengers (or clients or citizens or visitors) are lined up in FIFO queues, and you have to decide how to organize these queues and associated queuing policies:

Option 1: all arriving passengers are placed in a single queue, and service stations take passengers from the front of that queue.

Option 2: each service station has its own queue, and arriving passengers are dispatched to a queue according to one of many policies:

2.A: round robin (1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, ...).

2B: arriving passenger is placed in a shortest queue.

2.C: arriving passenger is placed in a random queue. Inputs to the simulation:

The duration of the simulation measured in minutes (D: make it arbitrarily long, do not worry about it being or not being realistic).

The average arrival rate measured in minutes (A: arrivals are random, but on average there is one new passenger every A minutes),

The average service rate measured in minutes (S: service rates are random, but on average they need about S minutes of service).

For the sake of this study, make sure to crowd the system, by choosing S >> 5*A, without causing an overflow of your queues. Also choose D to be long enough to get rid of any transitory effects.

Outputs of the Simulation for each queuing policy: The duration of the simulation (which may be longer than the input parameter, as when check-in closes, there may be passengers in the waiting queues and service stations). The maximum length of the queue for each queue. The average and maximum waiting time for each queue. The rate of occupancy of each service station (percentage of time each station was busy).

If you want: show the real-time evolution of the queues during the run-time simulation.

Create this program in C++ or java

please provide only full running code.

I asked this Question third time if, I didn't get full running code. I have to give dislike to answer.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions