Write a single program which simulates the queuing

Assignment Help Computer Engineering
Reference no: EM131181971

Task

You should write a single program which simulates the queuing and service of customers under two dierent queuing strategies and compare the results.

Program

Your program should run two discrete event simulations, one for each strategy. Each simulation should start at time 0 and run until all customers have been served.

The two queueing strategies are as follows:

1. Use a single queue from which each server will take the next customer as soon as the server becomes available.

2. Use a queue for each server. Customers will choose the server with the shortest queue on arrival and will not move from queue to queue.

Your program should be readable and well commented.

Data Structures and Algorithms

Part of the purpose of this subject is to gain an in-depth understanding of data structures and algorithms. As such, all programming tasks in this subject require you to choose appropriate data structures and algorithms, and to implement them yourself. You may not take advantage of any built in data structures more complex than an array or list, but instead should provide your own implementation. If you use any references other than the lecture notes, ensure you cite them or you may receive 0 for plagiarism. A clear comment in your code is sufficient.

Readme

Write a text le named readme. Include clear instructions on how to compile and run your algorithm. Ensure that your program compiles and runs correctly on ubuntu, in the lab. If your program does not compile, it will receive 0 marks. If it doesn't run according to the specication, you will receive very few marks. You may also include a makele if you wish.

Analysis
Once your program is complete, you should run it for some sample scanarios and examine the results. Write a le named analysis.pdf containing a discussion the dierences you observe in statistics between the two queueing strategies. Which strategy is most ecient?

Input
Both simulations will use identical inputs. Your program should read a le name from standard input, and run each simulation using the named le as the input le. The input le has the following format:

The number of servers.

A set of lines each consisting of a customer arrival time followed by the corresponding service time. Times are in seconds, from the start of the simulation. Although a sample input le has been provided, your program should still run sucessfully substantially larger inputs.

Output

Output should be to standard output.

For each of the two simulations the output should consist of the following data, clearly labelled:

Number of people served.

Time that the last customer nished being served (total simulation time).

Average service time (note this should depend only on the input le).

Average time a customer spends in queue.

Maximum time a customer spends in queue.

Average length of queue in any given second. For each queue and in total for the multi-queue version of the simulation.

Maximum Length of queue. For each queue and in total for the multi-queue version of the simulation.

Total idle time for each server.

Reference no: EM131181971

Questions Cloud

Draw the demand curve for umbrellas : If the demand schedule above represents demand on a normal summer day, what would you expect to happen to market consumer surplus if the forecast is for a heavy rainfall? Assume that the store does not raise its price. Draw a graph to support your..
Wal-mart argues that risk of bike collapsing under weight : Judy Dawson weighed between 450 and 500 pounds. For a birthday present, her children bought her an exercise bike from Wal-Mart Stores, Inc. On the day Dawson received the bike, she rode it for only a moment. Suppose that Wal-Mart argues that the risk..
Driver issues with guest operating systems : The VirtualBox Interface has two panes, the Right Hand pane contains a list of the Virtual Machine's generic (old) hardware.
What had the greatest impact on you : What ideas, readings, discussions, or activities stood out to you? Why? What had the greatest impact on you? What were you surprised about? What can you use in your daily life?
Write a single program which simulates the queuing : You should write a single program which simulates the queuing and service of customers under two dierent queuing strategies and compare the results.
What learning activities would you select for each of needs : Think about a knowledge gap or learning gap that you have identified in your work environment. What learning activities would you select for each of these needs?
Prepare a personal and professional development plan : Prepare a Personal and Professional Development Plan (PPDP) for continued leadership development.  The period of the plan depends on your current career and life stage.  It should cover a minimum of two years but could be 5 or 10 years.  Select a ..
What you think about your country''s trade policies : Ricardo's model discusses benefits to countries at an aggregate level. But what if you were a Portuguese cloth maker or an English winemaker? Might you have a different view about the benefits of trade? Which factors might influence what you think..
Differences between the negotiation process between chinese : Identify two differences between the negotiation process between Chinese and American negotiations.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Imagine 5,000 input time slots are to be switched

The time slots are refreshed every 100 microsec. What memory cycle time is needed to keep up with the data flow.

  Method of collision resolution

Utilize the linear probing method of the collision resolution. Print out the tables after the data values have been stored. Search for ten several values in each of the three hash tables

  What do you mean by wimax describe why mobile wimax is an

directions please provide detailed and elaborate responses to the following questions. your responses should include

  Define how these characteristics influence the buying

Buyer's perceptions of a product and its price are an important influence on pricing. Value consciousness, price consciousness, and prestige sensitivity are 3 ways of describing these perceptions.

  What are the advantages of the osi reference model

Using the layers of the OSI model as a reference, explain and sketch how repeaters, hubs, bridges, switches, routers, and gateways function in forwarding packets from one host to another through each device respectively.

  Write down a function named twomax which takes a pointer to

write a function named twomax that takes a pointer to an array of integer numbers array size a pointer to integer which

  Why proper information is placed for each person

They are placed in A2-F2. My problem is that I have no idea how to change this information to apply to all the other friends (the current formula repeats friend 1's information for all the others). For instance , friend 2's information involves Ar..

  Who recognize the best time to avoid problems

The concept that the quality of the output is only as good as the quality of the input, which sometimes is known as __________, is familiar to IT professionals, who recognize that the best time to avoid problems is when data is entered.

  Implement the solution for tracking the number of subscribe

In a social media news feed, users are required to subscribe to the news feed before receiving any news or updates. Users can only subscribe to each news feed only once up to five different feeds.

  Explain electrical and computer engineering

Electrical and Computer Engineering, Suppose Xt is a random process which is second-order stationary. Show that it is also stationary of order 1.

  Questionnewtown records has determined to store information

questionnewtown records has determined to store information about musicians who perform on its albums in a database.

  Find the minimum sum of product expression

Find the minimum sum of product expression for the subsequent expression:

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd