Skip to main content

A parser for project scheduling instances.

Project description

PyPI version CI

PSPLIB

This library implements parsers for various project scheduling benchmark instances, including:

  • Resource-Constrained Project Scheduling Problem (RCPSP)
  • Multi-Mode RCPSP (MMRCPSP)
  • RCPSP with Minimal and Maximal Time Lags (RCPSP/max)
  • Resource-Constrained Multi Project Scheduling Problem (RCMPSP)
  • RCPSP with flexible project structure (RCPSP-PS) and RCPSP with alternative subgraphs (RCPSP-AS)

psplib has no dependencies and can be installed in the usual way:

pip install psplib

Example usage

>>> from psplib import parse
>>> instance = parse("data/j301_1.sm", instance_format="psplib") 
>>> instance.num_resources
4

>>> instance.resources
[Resource(capacity=12, renewable=True), ..., Resource(capacity=12, renewable=True)]

>>> instance.num_activities
32

>>> instance.activities
[Activity(modes=[Mode(duration=0, demands=[0, 0, 0, 0])], successors=[1, 2, 3], delays=None, name=''), 
 Activity(modes=[Mode(duration=8, demands=[4, 0, 0, 0])], successors=[5, 10, 14], delays=None, name=''),
 ...,
 Activity(modes=[Mode(duration=0, demands=[0, 0, 0, 0])], successors=[], delays=None, name='')]

See this notebook for a slightly longer example demonstration of PSPLIB.

Instance formats

psplib implements parsers for commonly used project scheduling instance formats, listed below. To parse a specific instance format, set the instance_format argument in parse.

  1. psplib: The PSPLIB format is used by the PSPLIB library to describe RCPSP and MMRCPSP instances.
  2. patterson: The Patterson format: used for RCPSP instances, mostly used by the OR&S library. See this website for more details.
  3. rcpsp_max: The RCPSP/max format is used for RCPSP/max instances from TU Clausthal.
  4. mplib: The MPLIB format is used for RCMPSP instances from the MPLIB library.
  5. rcpsp_ps: The RCPSP-PS format is the format used by Van der Beek et al. (2024). Specifically, we included an extra line that defines for each task whether it is optional or not.
  6. aslib: The ASLIB format is the format used by RCPSP-AS instances from the ASLIB instance set at OR&S project database. ASLIB consist of three different parts (a, b, c). To use this parser, you have to merge parts (a) and (b) into a single file - part (c) is not parsed.

Instance databases

The following websites host widely-used project scheduling benchmark instances.

  • PSPLIB contains different problem sets for various types of resource constrained project scheduling problems as well as optimal and heuristic solutions.

  • OR&S project database is the research data website of the Operations Research and Scheduling (OR&S) Research group of the Faculty of Economics and Business Administration at Ghent University (Belgium). OR&S is very active in the field of project scheduling and has published instances for many project scheduling variants.

  • TU Clausthal provides RCPSP/max benchmark instances.

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

psplib-0.3.0.tar.gz (51.7 kB view details)

Uploaded Source

Built Distribution

psplib-0.3.0-py3-none-any.whl (12.5 kB view details)

Uploaded Python 3

File details

Details for the file psplib-0.3.0.tar.gz.

File metadata

  • Download URL: psplib-0.3.0.tar.gz
  • Upload date:
  • Size: 51.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.4.27

File hashes

Hashes for psplib-0.3.0.tar.gz
Algorithm Hash digest
SHA256 d5c74df35c2e58174974c650a3f9fcb3d1a4a822532e87f95fe5b94f006eb10d
MD5 176c8a08dac15943e0a1c53936571e9c
BLAKE2b-256 de22a1d203b2b492072d13d360a34d1196f95c1ebaabce7499e9e6f1a7d85e04

See more details on using hashes here.

File details

Details for the file psplib-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: psplib-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 12.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.4.27

File hashes

Hashes for psplib-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 48dc9f9c7960b9f46e4c58ce8d52044f8b823ab1677ab5cd3850879813113c5d
MD5 1fa9b66b80db608e5e34a4be75be465e
BLAKE2b-256 82825220f10cf6217c9b5bb5e2e73714dfbce66e74fbb727d748c68e8bbaf487

See more details on using hashes here.

Supported by

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