Skip to main content

A package to solve resource-constrained scheduling problems using SMT theory/solver.

Project description

Codacy Badge codecov Azure Build Status Binder Documentation Status PyPI version DOI

ProcessScheduler

A python library to compute resource-constrained task schedules. Documentation at https://processscheduler.readthedocs.io/

pip install ProcessScheduler

About

The computation is based on a set of constraints expressed under the form of first-order logic assertions. Problem solving is performed by the SMT Z3Prover. This project was inspired by the work from Tim Nonner at https://github.com/timnon/pyschedule.

import processscheduler as ps
# a simple problem, without horizon (solver will find it)
pb = ps.SchedulingProblem('HelloWorldProcessScheduler')

# add two tasks
task_hello = ps.FixedDurationTask('Process', duration=2)
task_world = ps.FixedDurationTask('Scheduler', duration=2)

# precedence constraint: task_world must be scheduled
# after task_hello
c1 = ps.TaskPrecedence(task_hello, task_world, offset=0)
pb.add_constraint(c1) # explicitly add this constraint to the problem

# solve
solver = ps.SchedulingSolver(pb)
solution = solver.solve()

# displays solution, ascii or matplotlib gantt diagram
solution.render_gantt_matplotlib()

png

Features

  • tasks: zero duration task, fixed duration task, variable duration task, work amount, optional task,
  • resources: worker, cumulative workers, workers selection, cost_per_period and productivity attributes,
  • task constraints: precedence, start synced, end synced, start at, end at, start after, end before,
  • optional tasks,
  • optional task constraints: task schedule condition, tasks schedule dependencies,
  • resource constraints: AllSameSelected, AllDifferentSelected,
  • optional resource constraints,
  • first-order-logic operations (not, or, xor, and, implies, if/then/else) between task or resource constraints,
  • builtin indicators (resource utilization, resource cost),
  • customized indicators,
  • SAT/SMT solver with or without optimization,
  • objective (makespan, flowtime, earliest, latest, resource cost).

Jupyter notebooks

There are some Jupypter notebooks. They can be executed online at myBinder.org

Code quality

ProcessScheduler uses the following tools/methods to ensure code quality:

  • unittests,
  • code coverage (coverage.py, codecov.io),
  • continuous-integration at MS azure,
  • static code analysis (codacy),
  • spelling mistakes tracking (codespell)

License/Author

ProcessScheduler is distributed under the terms of the GNU General Public License v3 or (at your option) any later version. It is currently developed and maintained by Thomas Paviot (tpaviot@gmail.com).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ProcessScheduler-0.4.0.tar.gz (43.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ProcessScheduler-0.4.0-py3-none-any.whl (62.1 kB view details)

Uploaded Python 3

File details

Details for the file ProcessScheduler-0.4.0.tar.gz.

File metadata

  • Download URL: ProcessScheduler-0.4.0.tar.gz
  • Upload date:
  • Size: 43.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.6

File hashes

Hashes for ProcessScheduler-0.4.0.tar.gz
Algorithm Hash digest
SHA256 c578ddd0bc9f7e16ac57768d7b92ff175eb1616da05c95dbc18f7012da6087c3
MD5 2ecdd78a73562abc4c09190b9105e775
BLAKE2b-256 6d717774d4b75974c90a3b133f36cc6bd9d13b10ed5189ce16949a0d626209ae

See more details on using hashes here.

File details

Details for the file ProcessScheduler-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: ProcessScheduler-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 62.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.6

File hashes

Hashes for ProcessScheduler-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 645b2d5187f87a51dee54bfecaf93d73eb8f9c79ab262fb622e28988508e2892
MD5 e4e8a68801ea3ee27421f84bcd978e01
BLAKE2b-256 9b6af33c42b139513c9cc34583e221fd6bde8685c1fb3aaefaa3c0adeeb0098b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page