Thanks to visit codestin.com
Credit goes to github.com

Skip to content

PyJobShop/PyJobShop

Repository files navigation

PyJobShop logo

PyPI License CI DOC Codecov

PyJobShop is a Python library for solving scheduling problems with constraint programming. It currently supports the following scheduling problems:

  • Resource environments: single machines, parallel machines, hybrid flow shops, open shops, job shops, flexible job shops, distributed shops, renewable resources and consumable resources.
  • Constraints: release dates, deadlines, due dates, multiple modes, permutations, sequence-dependent setup times, no-wait, no-idle, blocking, breaks, optional task selection, and arbitrary precedence constraints.
  • Objective functions: minimizing makespan, total flow time, number of tardy jobs, total tardiness, total earliness, maximum tardiness, and total setup times.

You can find PyJobShop on the Python Package Index under the name pyjobshop. To install it, simply run:

pip install pyjobshop

The documentation is available here.

Tip

If you are new to scheduling or constraint programming, you might benefit from first reading the introduction to scheduling and introduction to constraint programming pages.

Constraint programming solvers

PyJobShop uses OR-Tools' CP-SAT solver as its default constraint programming solver. We also provide support for CP Optimizer. See our documentation for instructions on how to install PyJobShop with CP Optimizer.

Examples

We provide example notebooks that show how PyJobShop may be used to solve scheduling problems.

  • A short tutorial and introduction to PyJobShop's modeling interface, available here. This is a great way to get started with PyJobShop.
  • Notebooks solving the classical machine scheduling problems such as the flexible job shop problem (here), the hybrid flow shop (here), and the permutation flow shop (here).
  • A notebook showing how to solve different project scheduling problems, here.
  • A notebook showing how to solve scheduling problems with optional tasks, here.
  • A notebook showing how to solve scheduling problems with resource breaks, here.
  • An overview of supported objective functions, here.

Contributing

We are very grateful for any contributions you are willing to make. Please have a look here to get started. If you aim to make a large change, it is helpful to discuss the change first in a new GitHub issue. Feel free to open one!

Getting help

Feel free to open an issue or a new discussion thread here on GitHub. Please do not e-mail us with questions, modeling issues, or code examples. Those are much easier to discuss via GitHub than over e-mail. When writing your issue or discussion, please follow the instructions here.

How to cite PyJobShop

If you use PyJobShop in your research, please consider citing the following paper:

Lan, L., and Berkhout, J. (2025). PyJobShop: Solving scheduling problems with constraint programming in Python. https://arxiv.org/abs/2502.13483

Or, using the following BibTeX entry:

@misc{Lan_Berkhout_2025,
      title={{PyJobShop}: Solving scheduling problems with constraint programming in {Python}}, 
      author={Leon Lan and Joost Berkhout},
      year={2025},
      url={https://arxiv.org/abs/2502.13483}, 
      archivePrefix="arXiv",
      eprint={2502.13483},
}