Constrained Resource Education Scheduling (CORES): a new approach to complex
Corey Wirun, System Architect, OHMES, University of Calgary
David Topps, Medical Director, OHMES, University of Calgary
This paper describes key factors in the design of an automated scheduling system within the
context of Community-Based Curriculum (CBC). CBC scheduling has unique characteristics
in the field of Medical Education because the concept of learner and learning events is
different than traditional classroom or course-centric scheduling: topic exposure is
determined by experiential factors; learners do not all follow the same trajectory; resources
are often much more geographically dispersed.(1–3) These differences make it more
technically challenging in that the dimensionality of the inputs to the schedule generation are
much more complex.
In addition, the mechanics of CBC schedule generation are equally reliant on workflows as
part of the scheduling process. These workflows can take the form of post hoc ‘what-if’
scheduling scenarios, where program secretaries and directors have to balance multiple
conflicting requests, and have just as much influence on the system technical design as the
mechanics of schedule generation itself.
At the most basic level, a medical education schedule (CBC, or otherwise) consists of a set
of learners and the distribution of those learners across learning events (rotations) in a
manner that meets defined schedule criteria. Schedule criteria are classified as hard or soft
- meaning that some criteria are critical to schedule acceptance (hard), whereas other
criteria are open to various levels of compromise (soft).
Rotations are often considered as hard constraints because they are dictated by academic
requirements. They may also include continuity-of-care characteristics such as contiguous
blocks, physical location restrictions, location re-usability, duration, or fixed/floating
placement within the academic year.
On the ‘softer’ side of scheduling criteria is the availability of the preceptors who preside over
rotations throughout the academic year.(4) Preceptors are responsible for declaring learner
capacity for a given learning event, i.e. how many learners can be supported for a rotation,
at a given learning location, and academic period?
Factoring in site or preceptor capacity in a medical education schedule is not trivial.
Capacity may vary over the academic year due to preceptor resilience or logistical
considerations. In addition, capacity may not be exact, but defined as a range for a learning
event, the desire being the incorporation of utilization targets that reflect learner throughput,
educational goals, or economic drivers.
Learner capacity falls into a ‘softer’ type of constraint because meeting capacity numbers
may not be critical to the schedule feasibility. For example, a capacity overrun for a specific
rotation at a specific location may not be a show-stopper but still has to be flagged as a
schedule exception. However, the schedule generation can still proceed with this exception
in place - for further examination by the scheduler.(5)
This differs from hard criteria violations, where the schedule generation should stop and
attempts to address the violation before continuing. If the schedule generation cannot
correct the violation, the entire schedule is thrown out.
At a certain point, the success, or fitness, of an automated schedule starts to become
questionable as the number of requirement dimensions increase. Also, the requirements will
inevitably start to overlap, where the complexity of an evaluation/prioritizing process rapidly
escalates. Of equal concern is that, as the requirements’ complexity increases, the ‘quality’,
or fit, of a generated solution decreases exponentially because the factors are too
constrained. Herein lies the major risk to scheduling system design: can enough of the
desired schedule constraints be accommodated to generate a schedule that is satisfactory
and practical for use?
Scheduling as an Automation Opportunity
The design of automated systems that support scheduling in the field of Medical Education
pose unique challenges.(6–9) To the software architect, it is a both a boon and a curse that
scheduling is a very active research topic - a simple Google search will uncover dozens of
academic papers that have been written on the subject. While these materials are helpful in
giving the system implementer an appreciation of the problem of scheduling, they will only
go so far.(10) There will still be significant design work to address the nuances of the
specific problem domain.
Effective scheduling algorithms, from a computer science perspective, have long been
considered to be of the non-deterministic variety. This class of algorithm states that for the
same set of inputs, consecutive iterations of a program on those inputs may yield completely
different results, or may not complete at all. These are classically hard problems for
computers to solve e.g. Traveling Salesman problem, the Knapsack Problem.
To many, this seems counter-intuitive as to why this approach is feasible – software works,
or it does not. However, the paradigm of non-deterministic algorithms grew out of necessity
– to address the limitations imposed by traditional deterministic algorithms.
As an illustration of a deterministic approach to schedule design, one might innocently
attempt a ‘divide-and-conquer’ methodology: for a given problem space, implement
individual schedule criteria in code with the end goal of meeting all schedule criteria at the
finish line. While, at the onset, it may be conceivable a solution will eventually be reached, it
is more likely that the complexity of the solution becomes prohibitive as constraints add up
and start compounding on each other. As a by-product of the increasing complexity,
performance starts to suffer as the solution has to do more and more work.
The rationale behind the initial gravitation to a deterministic approach could be attributed to
the fact that deterministic algorithms are often easier to visualize, and mistakenly, easier to
implement. Conversely, non-deterministic approaches tend to be more abstract (the
antithesis to the software developer mindset), and have a theoretical basis that requires a
deeper level of thinking to design and implement.
At the onset, it is vital that there be as complete an understanding as possible of the
complexity of the problem set. Unfortunately, diligent understanding of the problem still may
not guarantee success. This applies equally to deterministic and non-deterministic
approaches. It not uncommon in schedule automation development that, as functionality is
added (i.e. more constraints are addressed), the system abruptly stops improving in quality
or the performance of solution starts to decrease. This is especially true when exploring a
new scheduling domain where it is unknown at design time if success is achievable at all.
All that a software architect can do is develop the system in a manner where there is
flexibility in the design. The software must be flexible to accommodate, in the least invasive
manner possible, taking ‘steps backward’ in order to move forward again.
Up to now, this paper has concentrated on schedule generation as a key activity in an
automated scheduling system. What appears to be under-appreciated in scheduling
literature is how schedules are managed after the schedule is generated and operational
(i.e. in-flight). This may be partly explained by the fact that these workflows are highly
domain specific and not of general interest. It may also be because these activities are more
deterministic, and thus fall below the radar of academic computing interest.
In any case, a system-generated schedule will undoubtedly be complex in nature. The
resulting relationships between rows and columns of the schedule will be extremely fragile
as a result of the application of its hard and soft scheduling criteria. Because of this, it is
highly doubtful that manual manipulation of the schedule will be able to maintain these
relationships. Automated tools, of at least the same complexity as the generation process,
will be required to manage the schedule once it is in-flight. It is impractical to expect manual
manipulation to be effective as it will likely be time intensive and will compromise schedule
In the context of CBC, scheduling systems must be agile enough such that schedule criteria
can be modified and re-applied at any point in the life of an in-flight schedule. Some
common in-flight changes could be:
· Addition and removal of learners (e.g. extended leave, off-cycle learners)
· Addition/removal/reallocation of learning locations (e.g. location unavailability due to
· Changes in teaching capacity (e.g. preceptor availability changes)
Equally important is that in-flight changes must have a localizable effect – minimizing the
invasiveness of the change on other locations, rotations, teachers or learners (the “innocent
bystanders”), to a scope deemed appropriate by the scheduler. For the purposes of this
paper, this capability is called Controllable Schedule Re-entrancy (CSR).
Controllable Schedule Re-entrancy
In the functional sense, CSR is defined as being able to take an existing schedule (or a
partial schedule), and having the ability to regenerate the schedule, in its entirety, or in-part,
using different schedule criteria. Unfortunately, schedule feasibility (i.e. how well the
schedule meets the criteria) now becomes a philosophically challenging topic. From an
algorithmic perspective, it may be complicated to infer an overall schedule feasibility when
different portions of the schedule are evaluated using different criteria. More striking,
however, are the potential ramifications of modifying the hard constraints and what the end
effect is on the schedule. Hard constraints, by definition, are mandatory, rigid declarations of
rules applicable to an entire schedule. One could argue that a schedule with different hard
constraints is a completely different schedule. To mitigate this problem, and still facilitate
CSR, limiting schedule criteria changes to soft constraints is a reasonable compromise.
The concept of CSR is one that is not readily found in scheduling academic literature. Most
literature concentrates on the definition and setup of schedule criteria in advance of
schedule generation. As examples, papers by Cohn et al,(6) and Topaloglu (9) describe
medical education scheduling problems very similar to CBC. In their papers, they refer to
the modelling of schedule criteria, in its entirety, before submission to the schedule
generation is performed. CSR is not practical in this scenario since schedule constraints
must be able to be dynamic and ad hoc - supporting an iterative scheduling process.
This leads to another important differentiator of this discussion from current literature. As
part of the CBC scheduling process, initial and in-flight schedule criteria are defined and
executed by the end-user, who may not be technically savvy. Presenting the scheduler with
an efficient, iterative scheduling process promotes the investigation of dynamic ‘what-if’
scheduling scenarios in a time-efficient fashion - without the need for technical/development
resources to reconfigure/model revised schedule criteria..
It makes sense that there is significant functional overlap between the processes involved in
initial schedule generation and those involved in schedule re-generation as a result of CSR.
In a pseudo-deterministic sense, schedule generation becomes a black box that takes an
initial schedule (empty, complete or partial), a set of criteria, and then generates a new
revision of the schedule for presentation to the user.. From a system design perspective,
schedule generation process becomes a reusable component, which has significant benefits
to system testability and sustainability.
For all intents and purposes, this solution becomes a blueprint for a generic scheduling
platform, versus a built-to-purpose program - and is much more scalable.
The project inspiring this paper was originally conceived as a schedule automation effort.
Significant business analysis time was spent taking inventory of hard and soft criteria which,
previously, existed only in spreadsheets.
As schedule constraints started to be implemented in code, solution technical
understandability started as being relatively simple, but became difficult as the schedule
criteria accumulated. Each new criteria required an increase in code complexity. There was
initial success using deterministic methods, but at a certain point, schedule viability suddenly
stalled and performance started to drop in attempts to accommodate. This breakdown was
attributed to a critical mass of constraints being reached that precluded the current design
methodology from being able to keep pace. In non-technical terms, the design painted itself
into a corner.
After a refactoring effort, it was found that non-deterministic algorithms ended up being much
more scalable. As the constraint set grew more complex, the platform proved itself to be
more agile to be able to accommodate the increased demands. This was attributed to the
observation that incremental increases in schedule criteria complexity yielded much smaller
increases in code complexity in non-deterministic systems versus deterministic ones.
The following table illustrates results taken at regular intervals as solution development
evolved. Initial solution development concentrated on deterministic algorithms for a limited
learner size. As criteria complexity and sample set size was increased, schedule
fitness/viability and system performance prematurely plateaued. Non-deterministic
approaches were then investigated and implemented.
Hardware acceleration added (multi-core computing)
Hardware upgrade to industrial RISC server
D - deterministic algorithm
ND - non-deterministic algorithm
Notes/conclusions from this table:
● As the complexity of constraints increased, a plateau was reached using
deterministic algorithms where further complexity had a negative effect on
viability/fitness and no further progress was achievable.
● Deterministic algorithms had linear performance related to number of learners,
whereas non-deterministic performance was not linear.
● Physical hardware and hardware acceleration in software have a huge impact on
● Non-deterministic algorithms showed improved performance and solution feasibility
It is interesting to note that, in the non-deterministic solutions, the variability of the schedule
fitness significantly varied between successive runs. This could easily be explained by the
prevalence of randomness in many non-deterministic algorithms.
Looking back at the methodology of the design process itself, the concept of CSR should
have been addressed much earlier in this phase. If it had, it might have disqualified the use
of the deterministic approach very early on - the prohibitive complexity designing both
aspects of schedule generation and CSR should have been immediately obvious.
When the methodology took on a non-deterministic track, having the dual goals of schedule
generation and schedule re-entrancy at the forefront lead to a much more informed decision
when it came time to selecting a non-deterministic approach.
Scheduling medical residents in Community-Based Learning is challenging both from a
technical as well as workflow perspective. The onus is on the solution implementer to
ensure that the technical design reflects not only the results of detailed schedule analysis,
but an understanding of the work processes involved after a schedule goes live.
Jeanine Robinson - Department of Family Medicine, Alberta Health Services – for subject
matter expertise and input on scheduling workflows.
1. Strasser RP, Lanphear JH, McCready WG, Topps MH, Hunt DD, Matte MC. Canada’s
new medical school: The Northern Ontario School of Medicine: social accountability
through distributed community engaged learning. Acad Med. United States;
2. Ford JC, Pinder KE, Ovalle WK, Li CH. Pathology education in a multisite urban/rural
distributed curriculum. Hum Pathol [Internet]. W.B. Saunders; 2008 Jun 1 [cited 2019
Mar 9];39(6):811–6. Available from:
3. Flexner A. The Flexner Report: Medical Education in the United States and Canada
[Internet]. 1910 [cited 2019 Mar 9]. Available from:
4. Lewallen LP, DeBrew JK, Stump MR. Regulation and Accreditation Requirements for
Preceptor Use in Undergraduate Education. J Contin Educ Nurs [Internet]. SLACK
Incorporated; 2014 Aug 1 [cited 2019 Mar 10];45(9):386–90. Available from:
5. Phan K, Brown S. Decreased Continuity in a Residency Clinic: A Consequence of
Open Access Scheduling. Fam Med [Internet]. 2009 [cited 2019 Mar 10];41(1):46–50.
6. Cohn A, Root S, Kymissis C, Esses J, Westmoreland N. Scheduling Medical
Residents at Boston University School of Medicine. Interfaces (Providence) [Internet].
2009 [cited 2019 Mar 6];39(3):186–95. Available from: https://search-proquest-
7. Topaloglu S. A shift scheduling model for employees with different seniority levels and
an application in healthcare. Eur J Oper Res [Internet]. North-Holland; 2009 Nov 1
[cited 2019 Mar 6];198(3):943–57. Available from: https://www-sciencedirect-
8. Smalley HK, Keskinocak P. Automated medical resident rotation and shift scheduling
to ensure quality resident education and patient care. Health Care Manag Sci
[Internet]. 2016 Mar 30 [cited 2019 Mar 6];19(1):66–88. Available from: https://search-
9. Topaloglu S, Ozkarahan I. A constraint programming-based solution approach for
medical resident scheduling problems. Comput Oper Res [Internet]. 2011 Jan [cited
2019 Mar 6];38(1):246–55. Available from:
10. Day TE, Napoli JT, Kuo PC. Scheduling the Resident 80-Hour Work Week: An
Operations Research Algorithm. Curr Surg [Internet]. Elsevier; 2006 Mar 1 [cited 2019
Mar 10];63(2):136–41. Available from: