GAS STATIONS
An oil company possesses a number of gas stations spread across the country. Customers can pay their refuel turn in cash at the counter or with a personal credit card, but they can also ask for a refuel card.  When using their refuel card, customers do not pay the refuel turn immediately. Rather, at the end of each month, the holder of the fuel card receives a monthly invoice with the amounts of all the refuel turns paid with the refuel card.  On the monthly invoice discounts are given depending on the turnover of the customer during the invoiced month.  Invoicing and paying occurs in any order: one can already receive a second invoice before having paid the first one.  But obviously, each invoice must first have been sent before a payment can be received. Each refuel turn only appears on the invoice of the month of the refuel turn. If a customer doesn't pay the invoice, the unpaid refuel turns are not added to the next month’s invoice. Instead, the invoice is simply sent again to the customer to remind him/her of the payment due. If a customer repeatedly does not pay the invoices (e.g. two months in a row), then the customer is suspended and his/her card is blocked until the bills have been paid.
Each gas station has a number of pumps that each contain a particular type of gasoline. Obviously only one customer can refuel his/her car at a time at a given pump. When the nozzle is taken, the refueling can start. When the nozzle is put back the refueling is stopped. Between those two moments, no other customer can use this pump. As soon as the nozzle is put back, the pump becomes available for the next customer.
Each pump has a separate reservoir that must be refilled when the quantity of gasoline drops below a certain preset reordering level.  Refilling can occur at any time.  The system should produce a daily report indicating which pump needs to be refilled and for each pump the current level of gasoline and the quantity to order. As the bottom of a tank can contain dirt, when the fuel drops below a critical level, the pump is automatically blocked so that no refueling can occur with this pump. For the same reason, when refilling a tank that was still above the critical level, the pump is temporarily blocked by the gas station responsible for approximatively an hour, so that dirt can sink to the bottom. The pump is released when the gas station responsible deems that refueling with this pump is safe again.
