Business class servers | My Assignment Tutor

Your task for this assignment is to investigate some of the properties of queues and theirmanagement.You should write a program which simulates the queuing and service of airline passengers.Your program should first read in a file name from standard input and then open this file andread data from the named file.The input file will contain the following data:? The number of first/business class servers in the system? The number of tourist class servers in the system? A set of passengers, each consisting of an arrival time, a class and a service time.o Class is an integer where 0 indicates a tourist class passenger and 1 indicatesa first/business class passenger.? This set is terminated by a dummy record with arrival time and service times all equalto 0.? Note: the arrival times are sorted in ascending order.The simulation is to be of an airline check in system with two sets of servers, first/businessclass and tourist class, with a single queue associated with each set. Customers arrive in thesystem and are served by a server of the appropriate class. If all servers of a particular typeare busy, the customer will enter either the first/business or tourist class queue as appropriate.The simulation should be run until the last customer has left the system.The simulation will run twice, in the first run each server will only serve passengers of theappropriate class. In the second run the first/business class servers will be able to servepassengers in the tourist class queue if no first/business class customers are waiting.Output, to standard output will consist of the following data for each run:? Number of people served.? Time last service request is completed.? Average total service time (this includes time spent in a queue).? Average total time in queue(s). Both overall and separate.? Average length of queue. For each queue and overall.? Maximum Length of queue. For each queue and overall.? Total idle time for each server.Notes: Do not use classes – structs are ok but no function pointers in them.Do not use the STLThere will be no more than twenty servers of each type (40 total)Each of the two queues will never have more than 500 people in themThe simulation should be discrete, i.e. event driven. There should not be a fixedlength ‘tick’.Programs may be written in any of C, C++, Java and Python. Programs which do not compileand run will receive no marks.Programs should be appropriately documented with comments.Programs should be submitted via moodle as ass2.ext where ext is one of c, cpp, java or py.sample.txt1 32.7388 0 2.46703.6384 1 24.59278.7844 0 10.687111.2892 0 2.650719.6054 1 16.897425.8811 0 8.008433.3780 1 3.459343.3384 0 9.178446.2163 0 19.023847.3548 0 17.232355.8328 0 2.447160.0882 0 1.495660.7434 1 11.269768.4218 0 12.018268.5855 0 8.108470.4307 0 6.010272.7153 0 1.372975.1113 0 14.343180.5883 1 19.412590.3511 0 18.110297.8430 0 7.1349101.0268 0 7.6361107.2454 0 6.2390116.3251 0 1.7595121.6605 0 21.4984126.9861 1 12.7225133.4377 0 10.0616141.4507 0 9.6894150.2640 0 21.5524154.1471 0 24.9565163.0784 0 23.9492172.2447 0 12.3279173.0574 0 22.8647173.6316 0 19.0945179.2535 0 5.5698184.7606 0 23.8030190.9555 0 6.2745200.4260 0 5.0256200.5650 0 22.2527205.7671 0 17.6058208.1635 0 21.0320210.4348 0 18.0509218.9224 0 15.3343227.9540 0 9.3745230.4761 0 11.9167232.1588 1 20.9174241.2872 0 24.4420249.2442 0 14.5648250.4246 1 4.0302252.8030 0 20.0261256.5938 0 15.5701263.5607 0 8.3969268.7178 0 5.0341278.0610 0 3.0989278.1877 0 2.9723281.4533 0 7.1109284.7317 0 22.8856285.6248 0 7.1387285.6866 0 18.9891293.7013 0 24.1526303.6481 0 24.1642307.3246 0 10.0625310.6378 0 20.1107311.4815 0 14.6697320.3446 1 18.6701326.7943 1 15.9900332.4731 0 24.3111336.6110 0 0.4531341.8605 0 6.2377350.6130 0 8.5424359.6167 0 21.0481367.7884 0 19.3669372.3824 0 16.6363375.0018 1 12.9653384.5417 0 2.4295386.5845 1 5.0650393.0889 0 6.6726394.1722 0 4.9903395.8895 0 16.6712399.0871 1 1.1224407.4454 0 24.7933408.4703 0 10.7673417.7299 0 10.7114424.6991 0 22.3767427.0056 0 10.1728431.4238 1 7.1673436.2789 1 22.6560439.6380 0 3.2466447.9529 0 20.6608453.6868 0 14.3944459.1031 0 23.4539468.6316 0 8.6101476.2365 0 7.6477483.2087 0 0.7634485.3300 0 9.0151486.1855 0 14.9351492.0770 1 16.8469493.8769 0 4.1308502.0673 0 9.7773509.4797 0 21.68160 0 0

QUALITY: 100% ORIGINAL PAPER – NO PLAGIARISM – CUSTOM PAPER

Leave a Reply

Your email address will not be published. Required fields are marked *