The Useless Products Division of UPCorp, a multinational manufacturing megaconglomerate, manufactures shingles made of vulcanized Mozzarella cheese at its plant in San Paco, California. The plant has four vulcanizing machines, designated as Bianca, Nero-A, Nero-B, and Verdi. The oldest of these machines, Bianca, can perform only level-1 and level-2 vulcanizations; the two Nero vulcanizers can perform vulcanizations at levels 1 through 5; and Verdi can vulcanize up to level 9, which is the highest level required for any of the shingles made at the plant.
Cheese slices arrive at the vulcanization area for processing in lots of various sizes. Each lot is labelled with (1) a six-digit identification number, (2) a specification of the number of slices in the lot, (3) the level of vulcanization required, which is the same for each slice in the lot, and (4) a priority indicator in the range from 1 to 12, with higher numbers indicating higher priorities. No more than 100 slices can be put through any of the vulcanizers at once, so many jobs will consist of several batches, each consisting of 100 slices or fewer. The number of minutes required to process the lot is given by the formula 5 + 2kn, where k is the level of vulcanization and n is the number of batches in the lot. To ensure consistent quality control, it is necessary to process all the slices in a lot in successive batches and on the same machine.
The scheduling of the work to be done by the four vulcanizing machines is guided by three principles: (1) No machine should ever be idle when there is a lot waiting that it could process. (2) If two or more lots are waiting for processing when a machine that can process them both becomes idle, the one with higher priority should be processed first. (3) If two or more machines are available for the same lot, and they differ in their capabilities, the lot should be processed by the least capable machine. (So, for example, if both Verdi and Nero-B are idle, and the only lot awaiting processing requires level-4 vulcanization, it should be processed by Nero-B.)
The file /u2/stone/datasets/vulcan.data contains information
about the lots that will be submitted in one day's operations at the
vulcanization area of the San Paco plant. Here are a couple of sample
lines:
8:30 209662 288 4 6 14:15 209874 1440 2 10The first line means that at 8:30 a.m., lot #209662 will arrive, comprising 288 slices for level-4 vulcanization, with a priority of 6. The second line means that at 2:15 p.m. (14:15 on a twenty-four-hour clock), lot #209874 will arrive, comprising 1440 slices for level-2 vulcanization, priority 10. From the formula above, we can calculate that lot #209662, divided into three batches, can be processed in 29 minutes (5 + 2 x 4 x 3) on Nero-A, Nero-B, or Verdi, while lot #209874, in fifteen batches, will require 65 minutes but can be processed on any of the four machines.
Your program should use the information in this file to construct a schedule of operations for each vulcanizing machine, showing which jobs it will be processing at what time of day. You may assume that it is possible for one job to begin as soon as the previous job ends (the 5 in the formula is the clearance time needed to set up the job and remove the vulcanized shingles from the machine at the end). Each schedule should be in a format that non-programmers, such as plant supervisors, can easily read.
This exercise will be due on Wednesday, May 8.