Skip to content

Heusor

A constraint solver for planning and scheduling, driven from Python. Staff rosters, school timetables, vehicle routes: you describe the problem with ordinary dataclasses and the rules with constraint streams; Heusor searches for the assignment with the best score, within the time you give it.

pip install heusor

Python 3.11 or newer, on Linux x86-64, macOS on Apple silicon or Windows x86-64.

Why it is built this way

  • Your rules are compiled, not interpreted. Lambdas are read from their source and compiled once, when the problem is built. No Python runs while the solver searches, so a solve runs at the engine's speed.
  • Mistakes surface early. A lambda the compiler does not translate fails when the problem is built, naming the file and line — not halfway through a solve. A rule whose weight goes negative is refused rather than silently turned into a reward.
  • Answers you can explain. Every score breaks down by rule, and each rule's matches name your own objects.
  • Reproducible when you need it. A step limit with a seed gives the same answer on Linux, macOS and Windows.

Start here

  • Getting started — a small staff schedule, from nothing to a solved, explained answer.
  • Concepts — the few ideas behind every model.
  • Constraint cookbook — one recipe per common rule.
  • Examples — school timetabling, employee scheduling, vehicle routing, complete and downloadable.
  • Reference — every stream step, solve option and error code.

Heusor is proprietary software by Shiftmind Limited, free to use including commercially — see the licence. Questions: licensing@heusor.com.