I've got a real-world problem that I'm trying to represent and automate. I've simplified and abstracted it down to the following:
- There are n places of work (P1, P2, ..., Pn).
- Each place, Pn has a key, Kn.
- There are m Workers, (W1, W2, ..., Wm).
- In order to work at Pn, a worker must hold Kn.
- Each key can either be held by a worker, or left at the Exchange, E.
A worker can make a trip to the Exchange at any time to pick up some unclaimed keys or drop off some keys for others to use.
Now, there is an exogenous work schedule that must be completed in a strict order. For example:
- 2016-04-21 W1 must work at P6
- 2016-04-21 W2 must work at P3
- ** exchange of keys required **
- 2016-04-22 W3 must work at P3
- 2016-04-22 W2 must work at P6
Any number of workers might have to work at Pn at some point in their schedule, although never on the same day
We know:
- The starting location of all the keys, either with workers or at E
- The future work orders that each worker will have to fulfil
So, I'm struggling to model this whole situation. Can you suggest data structures and algorithms I should be looking at in order to get a grip on it and start to optimise the trips to the exchange for each worker?
What I want to minimise is the total number of trips to E. A secondary goal would be to ensure that no worker makes a disproportionate number of trips.
Thanks in advance!!