I've asked this over on Stack Overflow but thought that someone may have a GI point of view that may help:
As an over-simplified example I have a list of events that have a maximum attendance:
event | places =================== event_A | 1 event_B | 2 event_C | 1
And a list of attendees with the distance to the events:
attendee | event_A dist | event_B dist | event_C dist ========================================================== attendee_1 | 12 | 15 | 12 attendee_2 | 11 | 15 | 11 attendee_3 | 10 | 11 | 12
Can anyone suggest a (hopefully) simple method to produce a set of options providing the best case allocations based on shortest total distance and also on shortest mean distance?
I currently have the data held in Oracle Spatial database, but I'm open to suggestions.
In my actual data there will be more places than attendees, so the events do not have to be full, but they cannot be "over-full". For the possible solutions I'd like 2; one showing the lowest total distance (i.e. sum of all attendees' distances), the other showing the mean distance (i.e. sum of all attendees' distances / No. of attendees)
- Each atendee should be assigned to exactly one event
- Each event has a limit as to how many atendees are assigned to it
- Underfull or even empty events are no problem
- Each assignment between an event and an atendee corresponds to a given distance
- I want to minimize the overall distance for all assignments