metadata
title: Employee Scheduling (Rust)
emoji: 📅
colorFrom: yellow
colorTo: red
sdk: docker
app_port: 7860
pinned: false
license: apache-2.0
short_description: SolverForge Quickstart for Employee Scheduling in Rust
Employee Scheduling (Rust)
Schedule shifts to employees, accounting for employee availability and shift skill requirements.
Prerequisites
Install Rust (1.70 or later):
$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Run the application
Git clone the solverforge-quickstarts repo and navigate to this directory:
$ git clone https://github.com/SolverForge/solverforge-quickstarts.git ... $ cd solverforge-quickstarts/rust/employee-schedulingBuild and run the application:
$ cargo run --releaseVisit http://localhost:7860 in your browser.
Click on the Solve button.
Test the application
Run tests:
$ cargo test
Docker
You can also run the application using Docker:
# From repository root
$ docker build -f rust/employee-scheduling/Dockerfile -t employee-scheduling-rust .
$ docker run -p 7860:7860 employee-scheduling-rust
Then visit http://localhost:7860 in your browser.
REST API
GET /demo-data- List available demo datasetsGET /demo-data/{id}- Get specific demo dataPOST /schedules- Start solving (returns job ID)GET /schedules/{id}- Get current solutionDELETE /schedules/{id}- Stop solvingPUT /schedules/analyze- Analyze constraint violations
Constraints
Hard Constraints (must be satisfied):
- Required skill match
- No overlapping shifts
- Minimum 10 hours between shifts
- One shift per day per employee
- Respect unavailable dates
Soft Constraints (optimized):
- Avoid undesired dates
- Prefer desired dates
- Balance shift assignments across employees
More information
Visit solverforge.org.