== DutyCal: Duty Scheduling Calendar Integrated With Google Calendar
=== Problem
This is similar to the https://en.wikipedia.org/wiki/Nurse_scheduling_problem[Nurse Scheduling Problem].
The goal is to schedule duty for participants in a fair way, where each participants are only available some of the time, and each participant is only allowed to have a maximum of one duty per day.
=== Usage
. Click "Login to Google" to access calendar information. . Enter availability of persons on the Availability tab. . Enter: .. scheduling dates (FROM, TO) .. how many duties per day (TIME and NUMBER) .. number of iterations to calculate . Once the schedule is created, display it . Click "Send to Google Calendar" to store it at the linked Google Calendar
=== Google Calendar Integration
Google Calendar is used to:
=== Definitions
P::
Array of people to assign duty to. There are n number of people, represented by P_0 ...P_n
.
S::
Array (continuous or disjoint) of schedulable days: S_0 ... S_m
.
A::
Array of person availability. Each person P_i
has available days A_p ... A_q
, where each A_x
is within S.
d::
Integer. The desired number of scheduled duties per day for every S_x
day.
D_{u, x}::
A duty assignment for day S_u
on the x
-th slot, where S_u
is within S and 0 <= x <= d
.
=== Constraints
==== HARD Constraints
d
duty slots a day.==== SOFT Constraints
Fairness::
The variance between number of duties of all P_i
and P_j
, i.e. Duties(P_i)
=> e
, Duties (P_j)
=> f
, |e - f|
must be minimal for all pairs.
Distributed::
The number of days of duty should be as spread out as evenly as possible, such that for P_i
's duty days, S_x
... S_y
where x
is between 0
and m
.
Stable::
Changing (adding, removing) one P_i
's A_x
where p <= x <= q
, should result in a minimal change in P_j
's schedules (preferably only another P_j
but not other P_
). Intent: one person's update would cause minimal changes to other people's schedule, so the impact to others' duties would be minimal.
Order of importance: Stability >>> Fairness > Distributed.
=== Output
For each person P_i
, output a schedule:
Where 0 <= u < w <= m
, 0 <= x, y <= d
, u
and w
are elements in {p ... q}
.
The goal is to find all L_{P_i}
for all i
, where 0 <= i <= n
.
=== Potential Techniques
https://en.wikipedia.org/wiki/Local_search_(optimization)[Local search] ** https://link.springer.com/chapter/10.1007/978-3-642-27245-5_25[Stochastic Local Search Approaches in Solving the Nurse Scheduling Problem, 2011]
https://en.wikipedia.org/wiki/Branch_and_bound[Branch-and-bound] ** http://ieeexplore.ieee.org/document/7021791/[New Solution for a Benchmark Nurse Scheduling Problem Using Integer Programming, 2014]
https://en.wikipedia.org/wiki/Simulated_annealing[Simulated Annealing] http://ieeexplore.ieee.org/document/4341767/[Simulated Annealing Algorithm for Daily Nursing Care Scheduling Problem, 2007] http://www.columbia.edu/~cs2035/courses/ieor4405.S17/p23.pdf
https://en.wikipedia.org/wiki/Genetic_algorithm[Genetic] http://ieeexplore.ieee.org/document/934317/[Genetic algorithm with the constraints for nurse scheduling problem, 2001] https://www.math.cmu.edu/~af1p/Teaching/OR2/Projects/P23/ORProject_Final_Copy.pdf
Mixed ** https://link.springer.com/article/10.1007/s40092-015-0111-0[Maximizing the nurses' preferences in nurse scheduling problem: mathematical modeling and a meta-heuristic algorithm, 2015]