psplib


Namepsplib JSON
Version 0.1.1 PyPI version JSON
download
home_pageNone
SummaryA parser for project scheduling instances.
upload_time2024-11-06 08:46:52
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseMIT License
keywords psplib project scheduling
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![PyPI version](https://img.shields.io/pypi/v/psplib?style=flat-square&label=PyPI)](https://pypi.org/project/psplib/)
[![CI](https://img.shields.io/github/actions/workflow/status/PyJobShop/PSPLIB/.github%2Fworkflows%2FCI.yml?branch=main&style=flat-square&logo=github&label=CI)](https://github.com/PyJobShop/PSPLIB/actions/workflows/CI.yml)

# PSPLIB

This library implements parsers for various project scheduling benchmark instances, including:
- Resource-Constrained Project Scheduling Problem (RCPSP)
- Multi-Mode Resource-Constrained Project Scheduling Problem (MMRCPSP)
- Resource-Constrained Multi Project Scheduling Problem (RCMPSP)

`psplib` only depends on `numpy` and can be installed in the usual way:

```
pip install psplib
```


## Example usage

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

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

>>> instance.num_projects
1

>>> instance.projects
[Project(activities=[0, 1, ..., 31], release_date=0)]

>>> instance.num_activities
32

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

All parsers return an instance of the [`ProjectInstance`](https://github.com/PyJobShop/PSPLIB/blob/main/psplib/ProjectInstance.py) class, which is an instance representation of the multi-project, multi-mode, resource-constrained project scheduling problem (MP-MM-RCPSP). 

## Instance formats

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

1. **PSPLIB format**: used by the [PSPLIB](https://www.om-db.wi.tum.de/psplib/) library to describe RCPSP and MMRCPSP instances.
2. **Patterson format**: used for RCPSP instances, mostly used by the [OR&S](https://www.projectmanagement.ugent.be/research/data) library. See [this](http://www.p2engine.com/p2reader/patterson_format) website for more details.
3. **MPLIB format**: used for RCMPSP instances from the [MPLIB](https://www.projectmanagement.ugent.be/research/data) library.

## Instance databases

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

- [PSPLIB](https://www.om-db.wi.tum.de/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](https://www.projectmanagement.ugent.be/research/data) 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.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "psplib",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "psplib, project scheduling",
    "author": null,
    "author_email": "Leon Lan <l.lan@vu.nl>",
    "download_url": "https://files.pythonhosted.org/packages/45/f0/b3f98388dad15b60dea566e16232fbd287513d6cdac5e5a0684d5d0e6f94/psplib-0.1.1.tar.gz",
    "platform": null,
    "description": "[![PyPI version](https://img.shields.io/pypi/v/psplib?style=flat-square&label=PyPI)](https://pypi.org/project/psplib/)\n[![CI](https://img.shields.io/github/actions/workflow/status/PyJobShop/PSPLIB/.github%2Fworkflows%2FCI.yml?branch=main&style=flat-square&logo=github&label=CI)](https://github.com/PyJobShop/PSPLIB/actions/workflows/CI.yml)\n\n# PSPLIB\n\nThis library implements parsers for various project scheduling benchmark instances, including:\n- Resource-Constrained Project Scheduling Problem (RCPSP)\n- Multi-Mode Resource-Constrained Project Scheduling Problem (MMRCPSP)\n- Resource-Constrained Multi Project Scheduling Problem (RCMPSP)\n\n`psplib` only depends on `numpy` and can be installed in the usual way:\n\n```\npip install psplib\n```\n\n\n## Example usage\n\n``` python\n>>> from psplib import parse\n>>> instance = parse(\"j301_1.sm\", instance_format=\"psplib\") \n>>> instance.num_resources\n4\n\n>>> instance.resources\n[Resource(capacity=12, renewable=True), ..., Resource(capacity=12, renewable=True)]\n\n>>> instance.num_projects\n1\n\n>>> instance.projects\n[Project(activities=[0, 1, ..., 31], release_date=0)]\n\n>>> instance.num_activities\n32\n\n>>> instance.activities\n[Activity(modes=[Mode(duration=0, demands=[0, 0, 0, 0])], successors=[1, 2, 3], name=''), \n Activity(modes=[Mode(duration=8, demands=[4, 0, 0, 0])], successors=[5, 10, 14], name=''),\n ...,\n Activity(modes=[Mode(duration=0, demands=[0, 0, 0, 0])], successors=[], name='')]\n```\n\nAll parsers return an instance of the [`ProjectInstance`](https://github.com/PyJobShop/PSPLIB/blob/main/psplib/ProjectInstance.py) class, which is an instance representation of the multi-project, multi-mode, resource-constrained project scheduling problem (MP-MM-RCPSP). \n\n## Instance formats\n\n`psplib` implements parsers for three commonly used instance formats, listed below. \nTo parse a specific instance format, set the `instance_format` argument in `parse`.\n\n1. **PSPLIB format**: used by the [PSPLIB](https://www.om-db.wi.tum.de/psplib/) library to describe RCPSP and MMRCPSP instances.\n2. **Patterson format**: used for RCPSP instances, mostly used by the [OR&S](https://www.projectmanagement.ugent.be/research/data) library. See [this](http://www.p2engine.com/p2reader/patterson_format) website for more details.\n3. **MPLIB format**: used for RCMPSP instances from the [MPLIB](https://www.projectmanagement.ugent.be/research/data) library.\n\n## Instance databases\n\nThe following websites host widely-used project scheduling benchmark instances.\n\n- [PSPLIB](https://www.om-db.wi.tum.de/psplib/) contains different problem sets for various types of resource constrained project scheduling problems as well as optimal and heuristic solutions.\n\n- [OR&S project database](https://www.projectmanagement.ugent.be/research/data) 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.\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "A parser for project scheduling instances.",
    "version": "0.1.1",
    "project_urls": null,
    "split_keywords": [
        "psplib",
        " project scheduling"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "eb20f9536d4850a4e35fab2d6cc7795ba1458bc286314c49821159a43a700f03",
                "md5": "72a3ba37fcf1ff295ca6382751174a83",
                "sha256": "9def68d7ec09854f200a0cc9628bbf90bc67ac05b9c216e3d939dafb5fa5dfc6"
            },
            "downloads": -1,
            "filename": "psplib-0.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "72a3ba37fcf1ff295ca6382751174a83",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 9806,
            "upload_time": "2024-11-06T08:46:50",
            "upload_time_iso_8601": "2024-11-06T08:46:50.741439Z",
            "url": "https://files.pythonhosted.org/packages/eb/20/f9536d4850a4e35fab2d6cc7795ba1458bc286314c49821159a43a700f03/psplib-0.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "45f0b3f98388dad15b60dea566e16232fbd287513d6cdac5e5a0684d5d0e6f94",
                "md5": "9817891ab0f616fb51ec5eac7cd3edc5",
                "sha256": "107f7ef30a0ab66c0af319d3c32b0165b7b946e8c1f97fcec443e8ac7d25672a"
            },
            "downloads": -1,
            "filename": "psplib-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "9817891ab0f616fb51ec5eac7cd3edc5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 7173,
            "upload_time": "2024-11-06T08:46:52",
            "upload_time_iso_8601": "2024-11-06T08:46:52.029094Z",
            "url": "https://files.pythonhosted.org/packages/45/f0/b3f98388dad15b60dea566e16232fbd287513d6cdac5e5a0684d5d0e6f94/psplib-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-06 08:46:52",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "psplib"
}
        
Elapsed time: 0.36613s