GithubHelp home page GithubHelp logo

shift-scheduler's Introduction

Shift-Scheduler

Synopsis

Shift-Scheduler is an employee shift scheduling program specifically designed for the Instructional Technology Center (ITC) of Haverford College. Given time slots that need to be covered, Shift-Scheduler generates a schedule based on workers' preferences. Shift-Scheduler was my first side project that I worked on after taking an introductory Computer Science course. The scheduler was used to schedule student workers' shifts from Fall 2015 to Spring 2017. Since I have graduated from Haverford College, the project is no longer maintained, but if any of ITC employees is interested in maintaining the project, I would be happy to provide any help needed.

Implementation

Shift-Scheduler uses a randomized greedy algorithm with heuristic in combination with iterative method. It attempts to assign a shift to the worker who prefers the shift the most while balancing the number of hours among workers and ensuring all time slots to be covered.

Input Format (csv)

A preference of a time slot for a worker is specified from 0 to a certain number, where 0 means unavailability, and higher number means stronger preference.

Example

time, Amy, Bob, Charles, Dave
MON-08:30-09:00, 0, 1, 2, 0
MON-09:00-09:30, 1, 1, 1, 0
MON-09:30-10:00, 1, 2, 0, 0
MON-10:00-10:30, 2, 2, 0, 3
MON-10:30-11:00, 2, 2, 2, 3
...

See sample_data_small.csv or sample_data_large.csv for detailed examples.

Usage

Basic Usage (with default iterations of 1000)

$python schedule.py input.csv output.csv 

To specify the number of iterations

$python schedule.py input.csv output.csv --iterations 2000

Constraints Customization

Constraints must be updated in accordance with a input file. Constraint variables can be found in models.py.

####Example

MAX_HOURS = 8.25 # targeted hours per worker
MIN_SHIFT_HOURS = 1 # minimum hours of a shift
MAX_SHIFT_HOURS = 4 # maximum hours of a shift

License

MIT

shift-scheduler's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.