Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Data Structure Expert

Case description
A local company owns three 3D printers installed in its three different branches. Clients can call the company and reserve the use of one printer for some hours. Because of the heavy request for its printers and the time needed for maintaining the machines, the company receives requests from clients for one week and then schedules the use of its machines for the next week. When a client calls the company, he/she has to specify the number of hours he/she needs a printer, the preferred printing branch (1, 2, or 3), and his/her name.
The company wants to test different scheduling strategies and select the most beneficial one. These strategies include:
- First Come First Serve (FCFS): This strategy will not consider the preferences of the clients. However, it will consider the order of their requests. It will assign the earliest available printer to the client.
- Shortest Work Duration First (SWDF): This strategy will not consider the preferences of the clients. It will assign the printers by giving priority to the clients who requested the shortest work durations. Like in FCFS, the clients will be assigned to the earliest available printer.
- Longest Work Duration First (LWDF): This strategy will not consider the preferences of the clients. It will assign the printers by giving priority to the clients who requested the longest work durations. Like in FCFS, the clients will be assigned to the earliest available printer.
- Preference-Based (PB): This strategy will assign the printers to the clients according to their preferences.
In order to assess the performance of each strategy, the company will be using the following two measures
- Work duration: For each of the four strategies FCFS, SWDF, LWDF, and PB, the company will schedule the requests of clients in a way to optimize the use of its printers (finish all the jobs as early as possible).
- Client satisfaction: For the three strategies FCFS, SWDF, and LWDF, the company will calculate the satisfaction percentage (percentage of clients who were assigned to the printers in the locations they prefer).
Your work
- Implement each of the four strategies as a separate user-defined function.
- Implement the function main() that asks the user to enter as many printer reservations as he/she wishes. For each reservation, the user has to enter the name of the client, the requested duration for the use of the printer as well as the preferred working site. Once the user stops entering new reservations, the function main() will call successively FCFS, SWDF, LWDF, and then PB. The function main() will do the following tasks:
2
o For each printing site, display the order of client names as well as their starting and finishing job times. The result will be something like:
1. Client1 (S:0 , F:7) 2. Client2 (S:7 , F:15) 3. Client3 (S:15 , F:20) ....
Remark: Here S means Start and F means Finish.
o For each printing site, display the total time to finish the assigned jobs.
o For each strategy, display the time needed to finish all the jobs as well as the clients' satisfaction percentage.
o Display which strategy if the best to choose if the company is trying to minimize the printers working duration.
The output of your C++ program could be something similar to what follows:
Please enter the following information ...
>>> Client: Adel
>>> Job duration: 7
>>> Preferred site (1/2/3): 1
More reservations (Y/N): Y
>>> Client: Leila
>>> Job duration: 10
>>> Preferred site (1/2/3): 3
More reservations (Y/N): Y
...
<<< First Come First Serve (FCFS) >>>
Site 1 -----------
Order: 1. Adel (S:0 , F:7) ...........................
Duration: 75 hours, Satisfaction: 25%
Site 2 -----------
Order: 2. Leila (S:0 , F:10) .....................
Duration: 50 hours, Satisfaction: 35%
Site 3: ............................................................
<<< Shortest Work Duration First (SWDF) >>>
Site 1 -----------
Order: 1. ...........................
Duration: ....................., Satisfaction: .....................
Site 2 ............................................................
Site 3: ............................................................
3
<<< Longest Work Duration First (LWDF) >>>
..................................................................
<<< Preference-Based (PB) >>>
..................................................................
BEST STRATEGY FOR THE CURRENT JOB REQUESTS IS .................................

Data Structure, Computer Science

  • Category:- Data Structure
  • Reference No.:- M9453612

Have any Question?


Related Questions in Data Structure

Problem regarding the management program

Problem: Looks like its just adding a save and load feature to the same file you sent me for python 3.5 Until now, you have had to leave your team management program running on your computer indefinitely since you did no ...

Data Communication Delivering Information anywhere

Topic: Data Communication Delivering Information anywhere. Write a 9-12 pages paper in which you: Present an overview of the origin and history of the concept. Describe the current use of and attitude toward the concept. ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As