This is a work-in-progress to bulk-schedule meetings with a fixed number of time slots and meeting locations. It roughly aims to be a genetic approach to solving a Conference Scheduling bounty. If this algorithm can reliably generate such schedules, I'll throw together a simple wrapper to transform input and output to align with the bounty's expectations).
- Recent change allows a mutation or crossover to accidentally delete meetings (i.e. not schedule all meetings)
- Initial population is completely random, and for large inputs, generates too many initial conflicts to resolve through the current genetic crossovers and mutations without a ridiculous number of iterations (i.e very very long time).
- Is not very effective at optimizing schedules
- Perf is mediocre and inconsistent
- meetings_needed: an array of arrays of strings that identify people that need meetings scheduled. This algorithm will schedule a meeting for each of these groups of people.
- total_locations: the number of locations available. In the response, locations will be identified by a number between 0 and total_locations-1.
- total_slots: the number of time slots available. In the response, slots will be identified by a number between 0 and total_slots-1.
- unavailable: a JSON object mapping people to time slots that they are not available. Note, the algorithm will return an error if you specify any time slot that is greater than total_slots-1.
- fitness: larger fitness implies a more ideal schedule. positive fitness implies the schedule has no conflicts. negative fitness implies one or more conflicts. The magnitude of fitness is a work in progress to optimize certain schedule characteristics.
- meetings.location: location id of a meeting. Will be between 0 and total_locations-1.
- meetings.slot: time slot id of a meeting. Will be between 0 and total_slots-1.
- meetings.people: the people scheduled for a particular meeting location and time slot. This field will be one of the meetings_needed groupings provided as input.