Skip to content

Commit 5f3e4b1

Browse files
committed
Example notebook and updated README
1 parent 6b9b808 commit 5f3e4b1

File tree

8 files changed

+1350
-15
lines changed

8 files changed

+1350
-15
lines changed

README.md

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,33 +6,26 @@
66
This library implements parsers for various project scheduling benchmark instances, including:
77
- Resource-Constrained Project Scheduling Problem (RCPSP)
88
- Multi-Mode Resource-Constrained Project Scheduling Problem (MMRCPSP)
9-
- Resource-Constrained Multi Project Scheduling Problem (RCMPSP)
109
- Resource-Constrained Project Scheduling Problem with Minimal and Maximal Time Lags (RCPSP/max)
10+
- Resource-Constrained Multi Project Scheduling Problem (RCMPSP)
1111

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

1414
```
1515
pip install psplib
1616
```
1717

18-
1918
## Example usage
2019

2120
``` python
2221
>>> from psplib import parse
23-
>>> instance = parse("j301_1.sm", instance_format="psplib")
22+
>>> instance = parse("data/j301_1.sm", instance_format="psplib")
2423
>>> instance.num_resources
2524
4
2625

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

30-
>>> instance.num_projects
31-
1
32-
33-
>>> instance.projects
34-
[Project(activities=[0, 1, ..., 31], release_date=0)]
35-
3629
>>> instance.num_activities
3730
32
3831

@@ -43,7 +36,7 @@ pip install psplib
4336
Activity(modes=[Mode(duration=0, demands=[0, 0, 0, 0])], successors=[], delays=None, name='')]
4437
```
4538

46-
All parsers return an instance of the [`ProjectInstance`](https://github.com/PyJobShop/PSPLIB/blob/main/psplib/ProjectInstance.py) class.
39+
See [this](https://github.com/PyJobShop/PSPLIB/blob/main/example.ipynb) notebook for a slightly longer example demonstration of PSPLIB.
4740

4841
## Instance formats
4942

@@ -52,8 +45,8 @@ To parse a specific instance format, set the `instance_format` argument in `pars
5245

5346
1. `psplib`: The **PSPLIB format** is used by the [PSPLIB](https://www.om-db.wi.tum.de/psplib/) library to describe RCPSP and MMRCPSP instances.
5447
2. `patterson`: The **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.
55-
3. `mplib`: The **MPLIB format** is used for RCMPSP instances from the [MPLIB](https://www.projectmanagement.ugent.be/research/data) library.
56-
4. `rcpsp_max`: The **RCPSP/max format** is used for RCPSP/max instances from [TU Clausthal](https://www.wiwi.tu-clausthal.de/en/ueber-uns/abteilungen/betriebswirtschaftslehre-insbesondere-produktion-und-logistik/research/research-areas/project-generator-progen/max-and-psp/max-library/single-mode-project-duration-problem-rcpsp/max).
48+
3. `rcpsp_max`: The **RCPSP/max format** is used for RCPSP/max instances from [TU Clausthal](https://www.wiwi.tu-clausthal.de/en/ueber-uns/abteilungen/betriebswirtschaftslehre-insbesondere-produktion-und-logistik/research/research-areas/project-generator-progen/max-and-psp/max-library/single-mode-project-duration-problem-rcpsp/max).
49+
4. `mplib`: The **MPLIB format** is used for RCMPSP instances from the [MPLIB](https://www.projectmanagement.ugent.be/research/data) library.
5750

5851
## Instance databases
5952

0 commit comments

Comments
 (0)