Schedule workers to timeslots with ease.
Schedulous is intended to make scheduling easier. You provide a set of available workers and a set of timeslots to Schedulous (both in CSV format), along with a set of constraints you want met, and Schedulous finds a schedule for you.
You will need the following software installed:
- Scala (I use 2.11.7)
- SBT (I use 0.13.9)
- Z3 (I use 4.4.1)
how to use it
After you have installed the above prerequisites, you will need to create two CSVs.
- You will need a
events.csvfile containing all of the timeslots you need filled, one per line. It must have the at least the following header fields in any order:
date,start,end,duration,event,role,approval,person. Extra header fields will be ignored.
- You will need a
workers.csvfile containing all of the workers and their availability, one worker per line. It must have at least the following header fields in any order:
First Name,Last Nameas well as a set of fields indicating availability, e.g.,
Available Tue 6/14.
- For now, you will need to create/modify the
VolunteerCSVReaderto indicate how to interpret the
Available [date]fields. See here.
- Create a Scala program that reads in your event and worker data files, sets Schedulous configuration options, and then produces a schedule. Feel free to modify the example here.
- Run your program.
how it works
Schedulous is built on top of the Z3 constraint solver. Constraints are implemented in a simple SMTLIB DSL written in Scala. You can find a set of sample constraints in the
src/main/scala/Constraints folder. You can add constraints by implementing this trait and then by adding them to your Schedulous configuration.
The set of currently available constraints are:
- Ensure a "fair" workload. All workers work the same number of hours +/-
eof minutes (user-definable).
- Ensure that all timeslots are filled.
- Limit the total number of days that a worker works.
- Ensure that workers have at most
- Ensure that workers have at least
- Ensure that workers only work 1 assignment at a time (i.e., no concurrent assignments).
Schedulous is currently pretty rough around the edges, but it works. If you have modifications that help you---even trivial ones---I'd be happy to accept them. I am particularly interested in changes that make it easy to run this without having to modify source files.