DOCS is a computer program which generates
the staff schedule. An accounting framework is
combined with an optimization technique that searches
for a schedule in which all accounts are simultaneously
in balance. The search is accomplished using a Monte-Carlo
process which shuffles staff within the schedule.
The shuffling is biased according to each staffer's
account balance: the staffer who owes the most is
most likely to be scheduled.
Staff scheduling is arduous and time consuming.
The scheduler must: assign staff according to their
relative obligations; apply often intricate rotation rules;
distribute the burden of premium daytypes such as
weekends and holidays; satisfy on/off requests; and
provide an adequate accounting report.
Doctors On-Call Schedule (DOCS) is a
computer program which generates and optimizes the
staff on-call and daily duty schedule.  DOCS is built
around a framework of rigorous accounting principles.
A ledger of accounts is created with one account for
each staffer/ task/daytype combination. Every month,
each account is assigned a debit according to the
staffer's work requirement and receives a credit for
days worked. The account balance, equal to debit
minus credit, measures the amount of work owed by
each staffer to each task for each daytype. A positive
balance means a staffer has not worked enough days
to fulfill his work requirement, while a negative balance
means a staffer has worked more than enough days.
The account balance is carried over from month to
month, so that the ending balance for the prior month
is the beginning balance for the next month.
In order to illustrate the accounting framework used
by DOCS, we present in Table 1 an example comprising
a group of five staff who must cover a single task every
day for a thirty day scheduling period. (Here, for
simplicity, we ignore the daytype dimension, and
assume that all days of the thirty day period are the
same daytype.) The first column of the table identifies
the staff (A, B, C, D, E). Column 2 shows the relative
obligation of each staffer: B, C and E have twice the
obligation of A and D. Column 3 shows the work
requirement (debit) in days; this is calculated by
multiplying each staffer's relative obligation by the total
number of days to be scheduled (30) and dividing by the total relative
obligation (8). Column 4 shows the number of days
actually worked (credit) during the month. Column 5
shows the month-end account balance, equal to debit
minus credit (Column 3 minus Column 4). The individual
account balances total to zero, as they must.