Morning refill lists for a vending machine company
Your task
Your company runs 2,500 snack machines across a city. Each machine has 40 slots, and each slot holds up to 12 of one product. Every 30 minutes, a machine sends its new sales over a mobile network. Each sale has its slot, product and time. If a send fails, the machine keeps those sales and sends them again with its next batch.
A driver refilling a machine fills every slot to the top, then presses a button on the machine to log the refill. The refill goes out with the machine's next batch. Each driver covers about 100 machines and can visit about 40 a day. They start with the machines that have the most items missing.
At 06:00 every driver needs a list of the machines to visit and how many of each product to load into the van.
How do you know what is left in each slot at 06:00, and what goes into each driver's list?
It covers
- Machine sales
- Stock levels
- Refill lists