Title: Distributed Timetabling
1Distributed Timetabling
- Eliezer Kaplansky and Amnon Meisels
- Dept. of Computer Science
- Ben-Gurion University
2Overview
- The need for Distributed Timetabling
- Two real world examples
- University timetabling
- Employee timetabling
- Current status of DisTTP at BGU
- Distributed search for DisETP
- Iterative improvement of transportation cost
- Cooperative schedules improvement by SAs
- What next ?
3The need
- Many real world Timetabling Problems (TTPs) are
composed of organizational parts that need to
timetable their activities in an independent way,
while adhering to some global constraints - The timetables of all the parts must be combined
to yield a coherent, consistent solution
4Why not solve as a single problem ?
- Organization The work-flow of the organization
is distributed - Privacy There are private constraints that
employees prefer to keep inside the department - Local control Department head wants the final
say on the weight of local constraints and
quality of solution - Too big Central management refuses to take into
account local details
5Two Case studies
- Over the last two years we have investigated two
large scale problems - BGU Course timetabling at Ben-Gurion University
- Departmental timetables (per semester)
- Conflicts among shared courses
- Shared rooms over all campus
- Soroka Nurse timetabling transportation in
Soroka hospital, Beer-sheva - Weekly timetables for each ward
- Transportation sharing among multiple wards
6Departmental Schedules
- University Departments prefer to do their Course
Scheduling independently (dynamic private...) - Departmental Schedules are constrained by other
departments - Students groups take courses in several
departments ? - conflicting classes between two departments
- Conflicts can arise from teachers that teach
courses to different departments
7CS Dept. - a typical (large) example
- Schedule done every semester
- 120 classes are scheduled PLUS 400 TA sessions
- About 100 weekly time-slots
- Four study programs x 3 years 12 different
student groups (some mixing occurs) - TA sessions conflict with graduate courses (TAs
are graduate students) - Teachers (and TAs) have preferences and personal
constraints that rule out multiple time-slots
from the domains of the classes - Typical Objectives lunch break, less than 8
hours per day finish early on Thursday time to
prepare
8 CS Math. (1st year) Engineering
- Many courses are taken by students of all 3
departments, at multiple levels - Any change of schedule generates a need for
changes in other departments, that share a common
course - Conflicts among schedules are negotiated by the
Programs of CS., Math., SE, BioInformatics,
Engineering - Schedulers spend a few weeks of negotiations
9 Rooms a global constraint
- Scheduler submits a list of required
lecture-halls, based on a complete schedule - The central room authority collects all
departmental requirements in the university - BGU has 80 departments and 180 lecture halls in
the university pool - Using a simple data base, the central authority
grants most requests and rejects some - Typically, the CS scheduler will receive a few
rejections (10)
10 Rooms the negotiation process
- Departmental schedulers try to move rejected
sessions to less popular time-slots - Moving scheduled classes clashes with personal
constraints, with conflicting classes, with TA
sessions - schedulers must negotiate the proposed changes
with constraining schedulers - no central information on options to exchange
scarce lecture-halls among different schedules is
available i.e. a waiting list - Many departments are forced to break some
constraints in order to get rooms for all classes
11Multi-Agent Systems (MAS)
- A new paradigm for modeling, designing, and
implementing software solutions - Agents are sophisticated computer programs that
act autonomously on behalf of their users, across
distributed environments - A MAS is a loosely coupled network of software
agents that interact to solve a global problem
that is beyond the individual capacities or
knowledge of each agent
12Scheduling Agents for BGU
- A separate agent monitors the schedule of each
department first generating it - Cooperates with constraining departments to
arrive at the best feasible schedule - Every departmental agent negotiates with the
rooms authority limited room capacity - Currently, 13 departments are test-running the
departmental course timetabling construction and
solving program - The departmental system is complex, including all
assignments, preferences, courses, etc. on a
distributed database server
13Nurses Timetabling
- Multiple hospital wards
- Nurses have a weekly timetable
- Each ward schedules its nurses independently
- Hospital regulations require certain (combined)
number of nurses of specific seniority and
expertise for each shift - Timetables of wards must be coordinated, to
reduce transportation cost
14The Nurses ETP
- wards timetable 30 nurses to shifts
- Three shifts per day plus weekend shifts
- Nurses have different qualifications and are
assigned to certain tasks in shifts - Each nurse is assigned 3-5 shifts per week
- Each nurse is assigned 3-5 shifts per week
- Nurses have preferred shifts for each week and
forbidden shifts, due to personal constraints - Problem size 100 weekly assignments
15Nurses transportation
- Nurses are scheduled independently by each ward
- The hospital works 3 shifts a day, 7 days a week
- Transportation for nurses, for each shift
- Transportation lines grouped into destinations
- Cab/bus capacities are fixed
- To achieve cost effectiveness, the Scheduling
Agents (SAs) must coordinate their timetables - SAs are not aware of inter-ward transportation
constraints
16Scheduling Agents for ETPs
- Each SA solves the weekly timetable of one ward
- to achieve coordination with other SAs many
alternative solutions are needed - Standard distributed search algorithms assume
very simple agents that generate solutions in
negligible time - Distributed search algorithms for complex SAs
must be investigated
17Inter-agent Cooperation
- Important Need improvement steps in the quality
of the global solution - Search mixes the global improvement with local
schedules quality - To enable an efficient search, appoint one
responsible agent for each resource - In Soroka we use a line manager for each
transportation line
18Choosing A Resource Manager
- Among all resource-users select the Agent with
the more complex problem to solve - It makes sense to let a ward that has 7 nurses
that live in a nearby town (compared to an
average of 1 per ward) to manage the
transportation line to that town - The line manager sets the days the line is
available and waits for other wards to request a
change
19Inter-agent Cooperation
- First stage Find a local solution for the
timetabling problem of each agent - Second stage Improve the cost of transportation
for shared lines - Run the improvement process concurrently for all
resources (seats on transportation lines) - Third stage Enable SAs to improve their
schedules, controlling transportation costs
20Stage 2 Distributed iterative improvement
- Each transportation line has a number of
requested seats, per each shift, from every ward - To improve the cost of a given line, some of its
consumer wards have to change their schedules - Changed schedules (satisfying imposed seats
constraints) have different qualities - An improvement step must have an overall quality
that is above a given threshold
21Stage 3 Requests for Change
- Each agent tries to improve its local timetable
by re-solving its local problem - When it finds a better solution, it sends a
Request for Change (RfC) to the Resource Manager
- The RfC message is accompanied by an Expected
Gain (EG) and a list of changes in needed
seats, for all shifts - line manager approves RfCs with a lower
transportation cost and a non-lower total quality
22Toy problem experiment one line
- 4 wards, each with 30 nurses
- 21 shifts per week
- 5 lines of transportation
- Cabs have a capacity of 1-7 passengers
- Different costs for lines (and shifts)
- Transportation cost is the sum of the number of
needed cabs in each line - filling-up cabs leads to optimality of cost
- The number of passengers depends on all SAs
Timetables
23Search for a better cost (Toy problem)
24Managing one line
- To avoid cabs with one passenger, add a
constraint to the SAs, limit number of nurses for
the line - Add a constraint that prevents the SA from
adding a nurse to a line with full cabs - SAs solve dynamic CSPs
- A structural change to SAs
- Add/remove constraints
- Improve quality of timetable
- SAs can be either local searchers or IRAs
25Dynamically adding constraints
26Transportation Cost vs. Quality of Schedules
27Distributed nature of management
- Line manager can request participating SAs
sequentially or concurrently - Sequential improvement can be complete
- Changing schedules is too complex to enforce
completeness - Requesting changes concurrently generates a need
for coordination, but, can save time
28Synchronized protocol ? 10 SA utilization
29Concurrent protocol ? 50 SA utilization
30Concurrency generates improvement faster
31Controlling concurrency
- In stage 3 SAs request changes, trying to
improve the quality of their schedules - Requests are naturally concurrent
- Must be treated carefully, as requests of
different agents are conflicting - Currently, requests are processed one at a time
- Agents are committed to their proposed changes,
as part of their requests
32Some degree of freedom to SAs
- Enable SAs to express special quality
differences about parts of their schedules - Such personal quality differences must have an
impact on the coordinated schedules - Different SAs assign a different value to the
use of the shared resource, for special parts of
their schedule - Can be expressed by bidding for the resource
- Make it fair by distributing a fixed amount of
tokens for each SA
33Bidding for resources
- Enables SAs to fine-tune their schedules
- High quality local improvements are achieved by
paying high for the resource - Explored for university room sharing (among
departments) by Andrea Schaerf et al. - In Udine bidding is for rooms of other
departments, schedules are not involved - A mechanism for bidding is still unexplored
- binary vs. resource-wide
- fixed of tokens vs. Dynamic
(difficulty-based)
34Conclusions
- Two real world distributed timetabling problems
have been identified - University DisTTPs occur twice a year
- Room sharing is managed globally and can benefit
from interacting departmental schedules - Medical DisETPs are common shared
transportation shared employees - Weekly schedules generate frequent use
- Concurrent resource managers can create a large
improvement in shared costs
35Distributed resource management