Skip to main content

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

Project description

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

ProcessScheduler

A python library to compute resource-constrained task schedules. Express your scheduling problem in terms of tasks, resources and constraints, ProcessScheduler computes one/the best schedule that satisfies the requirements.

The computation is based on a set of constraints expressed under the form of first-order logic assertions. Problem solving is performed by the SAT/SMT Z3 Theorem Prover.

Documentation

User-end documentation available at https://processscheduler.readthedocs.io/

Features

  • tasks: zero duration task, fixed duration task, variable duration task, work amount, optional task,
  • resources: worker, cumulative workers, workers selection, productivity attribute,
  • advanced cost functions,
  • buffer: NonConcurrentBuffer,
  • task constraints: precedence, start synced, end synced, start at, end at, start after, end before,
  • resource constraints: AllSameSelected, AllDifferentSelected,
  • everything can be set as optional (tasks, resources, constraints),
  • first-order-logic operations (not, or, xor, and, implies, if/then/else) between task or resource constraints,
  • builtin and customized indicators (resource utilization, resource cost),
  • single and multiobjective optimization (makespan, flowtime, earliest, latest, resource cost, etc.),
  • exporters: smtlib2.0, json
  • Gantt chart rendering using matplotlib or plotly

Install

Install with pip.

pip install ProcessScheduler

The Z3 theorem prover is the only required dependency.

Optional dependencies (install either with pip or conda):

  • matplotlib (Gantt chart rendering),
  • plotly (Gantt chart rendering),
  • numpy

Try online

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

Helloworld

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()

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

png

Code quality

ProcessScheduler uses the following tools to ensure code quality:

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

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.9.1.tar.gz (70.2 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.9.1-py3-none-any.whl (104.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ProcessScheduler-0.9.1.tar.gz
  • Upload date:
  • Size: 70.2 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.9.1.tar.gz
Algorithm Hash digest
SHA256 7f1d77eeb43a9fdbc95bac84d4465bb5472a0b1fcecd7e54ad124d94b06660dc
MD5 835fc49c47fe0117dce8d356f4055e3c
BLAKE2b-256 9ad083fe4ceb8375d2b6a9bd751ec1669ea2103ba89198c9043ede07bbb989e7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ProcessScheduler-0.9.1-py3-none-any.whl
  • Upload date:
  • Size: 104.5 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.9.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3a36bce4aba86f4fb4872a4df7c3f5e723240c4ee6d2565d0d40c385c8009d5c
MD5 c97ba2b1922891e690cf5600512a15a3
BLAKE2b-256 74a488edf2fb13aaaa48ff404abdc7c29902dc136594c7ad38ded41532c7dbac

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