Skip to content

Getting Started (Light)

Super Light Version

If you are only interest in viewing one example solution, simply download the file ExampleSolutionView.html from Github and open it with your standard browser. Then you can view a found solution, which is based on the data given in cases/3.

Light Version

Prerequisites

Before setting up the project, make sure the following tools are installed on your system:

1. Install Python 3.10+

This project requires Python 3.10 or higher.

Open your terminal (Mac) or Command Prompt (Windows). Check whether and which version of python you have installed by running:

python3 --version

If not installed, download it from the official website: https://www.python.org/downloads/ and install it.

2. Install uv

uv is a fast Python package manager used to create and manage isolated environments. You can install it following the instructions in the official documentation:

https://docs.astral.sh/uv/getting-started/installation/


Installation

Follow these steps to set up the development environment.

1. Download our Project

In order to use our application you need to download the code from Github. If you are familiar with Github, you can simply clone the project, if not, you can click on the green "Code" button and choose to download as zip file, which you need to unpack. Then open a command line tool (terminal or command prompt) to navigate to the project folder.

2. Install dependencies

Make sure uv is installed.

uv sync

This will install all required dependencies.


Usage

1. Solving

After installing dependencies, you can start solving staff scheduling problems by running

uv run staff-scheduling solve 3 01.11.2024 30.11.2024
The three corresponds to the case_id meaning in the folder cases/3. If you want to create your own case simply copy the folder 3 and rename it to another integer. Then you can change the number of employees etc., see configuration.

The algorithm needs 5 minutes to find a solution.

2. Viewing

After the algorithm found a solution you can view it by running

uv run staff-scheduling plot 3
If you have created your own case, you need to change the integer 3 to your new case. You can then view the solution by opening the link you see in the terminal, probably http://127.0.0.1:5020.

Next to the assigned shift, our visualization offers some more insights.

  • colored small dot: employee is forbidden to work that specific shift (hard)
  • red background: employee is forbidden to work that day (hard), e.g. vacation day
  • colored small diamond: employee wishes to have shift corresponding to the color off
  • brown triangle: employee wished to have the whole day off
  • green background: wish for specific shift off was granted
  • yellow background: wish for complete day off was granted