dabke TypeScript DSL for OR-Tools CP-SAT workforce scheduling
#5034
Unanswered
christianklotz
asked this question in
Show and tell
Replies: 1 comment
-
|
Nice! I’ve done some scheduling work with ORTools too, so I’ll give a look when I get some time. From the readme, it looks promising. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I've open-sourced https://github.com/christianklotz/dabke, a TypeScript library that provides a declarative DSL for workforce scheduling on top of CP-SAT.
The core idea: Instead of writing individual low-level OR-Tools constraint implementations for each scheduling problem, dabke gives you a higher-level abstraction. You describe employees, shift patterns, coverage requirements, and composable rules. The
ModelBuildercompiles all of that down to a CP-SAT model and sends it to the solver.How it works: Each rule implements a
compile(builder)method that emits constraints into the model. Rules are composable and scopeable, so you can target a constraint at specific employees, roles, skills, days of the week, or date ranges, or a combination of which. Adding a new scheduling constraint means writing a new rule, not reworking the model.The rule system is extensible — you can write custom rules that hook into the same builder API. It also supports semantic time (named periods like "lunch" that vary by day of week) and pre/post-solve validation.
It comes with a Docker setup for getting started quickly.
Beta Was this translation helpful? Give feedback.
All reactions