CSC407/2103 Assignment 1
Requirements Statement


Create a computer program that assists an online grocery-store in scheduling grocery deliveries from its warehouse to its customers.

Customers order a set of items for delivery within a specific time window on a specific day (the time windows are 9-12, 12-3, 3-6, 6-9). All orders are finalized at 11 p.m. the previous day, and may not be changed after that time. Orders are delivered to customers using a fleet of cube vans. Individual orders are carried in the vans in two types of 12 cubic foot bins: frozen and ambient. To speed up drop-off, no two customers have their goods mixed into the same bin.

All customers are near to one another, and near to the warehouse. When given a list of customers to deliver to, the drivers can always arrange things so that the average drive between customers is 10 minutes, and the average time to drop off groceries is 10 minutes. The company has a fleet of 6 cube vans: 2 each of small, medium and large vans. Small vans can accommodate up to 12 ambient and 6 frozen bins, medium vans up to 24 ambient and 12 frozen, and large vans up to 36 ambient and 18 frozen. The vans are designated S1,S2,M1,M2,L1,L2.

Groceries are picked from the warehouse and put into bins by employees called "pickers". The bins are shunted to the loading bay and loaded into the vans by "loaders". The loading bay is large, and can simultaneously accommodate many more vans than we currently have. On average, vans can be loaded at the rate of 3 bins per minute. Since pickers and loaders don't cost very much, this number can be considered independent of the number of vans that need to be loaded at once. Bins are designated by an identifier hand-written on a peel-off sticker affixed to the bin. Bins are reused, however each time a bin is recycled, it is given a new designator. The designators have the letter "A" or "F" (for ambient or frozen), followed by a numerical id that starts at 1 for the first bin of its category that day, and goes up from there (e.g., "A12" or "F34").

Given a list of customers, their orders, and their time windows, print out the following reports:

  1. a schedule for when the individual vans should arrive and leave the loading bay;
  2. for each arrival of each van, the list of bins they should load ordered by customer name;
  3. for each bin throughout the day, a list of its contents;
  4. total profit and average profitability per cubic foot of van space for that day, broken out by van size;
  5. a list of customers that cannot be accommodated that day.

Your program will have access to a database of grocery items that specify their volumetric displacement in cubic inches, the cost of each item to the customer, and the cost we pay to our suppliers. The corporate standard is Java, so use that. Reports should be in ASCII, printed to standard output.

A different team is working on the database and classes for accessing it, so don't code those. Instead, mock up a random grocery database with a good spread of item sizes and costs, and generate customer orders randomly. Pick items and quantities randomly from the database in such a way that the total cost to the customer of the orders are drawn from a Normal distribution with average cost $150 and a standard deviation of $50, with a cutoff at $40 minimum and $500 maximum order. Take as input the number of orders in each time window. e.g.,
    java GroceryReports 100 100 150 300

*Thanks to grocerygateway.com for the use of their logo