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

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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