Skip to main content

A package containg benchmark instances for the Job Shop Scheduling Problem (JSP) scraped from

Project description


Job Shop Scheduling Problem Benchmark Instances

About The Project

This project contains all Job Shop Scheduling Problem (JSP) benchmark instances from http://jobshop.jjvh.nl/ and some utility functions to work with JSP instances. The project contains a parser to read the instances in the .txt files with JPS instances in taillard and standard format. For more info about the formatting see: http://jobshop.jjvh.nl/explanation.php The benchmark instances can be imported as a numpy array. The instances have the shape (2, n_jobs, n_machines), where the last dimension contains the processing time and the release time of the job on the machine. So the instance-numpy-array consists of two numpy arrays, the first array contains the order of the machines and the second array contains the processing times of the tasks on the machines. here is a minimal example of how to define a instance:

import numpy as np
custom_jsp_instance = np.array([
    [
        [0, 1, 2, 3],  # job 0 (machine0, machine1, machine2, machine3)
        [0, 2, 1, 3]  # job 1 (machine0, machine1, machine2, machine3)
    ],
    [
        [11, 3, 3, 12],  # task durations of job 0
        [5, 16, 7, 4]  # task durations of job 1
    ]
])

Installation

Install the package with pip:

   pip install jsp-instance-utils

Importing a JSP instance OR-tools Solver

jsp-instance-utils contains provides a implementation of the OR-tools solver for the JSP in the numpy array format provided by jsp-instance-utils. The following example shows how to import and solve the ft06 instance with the OR-tools solver:

from jsp_instance_utils.instances import ft06
from jsp_instance_utils.jsp_or_tools_solver import solve_jsp

makespan, status, *_ = solve_jsp(jsp_instance=ft06, plot_results=True)

assert status == "OPTIMAL"
assert makespan == 55

The code above yields the following output, if the plot_results flag is set to True:

Available Instances

All instances are available in the jsp_instance_utils.instances module. You can also find them on this website: http://jobshop.jjvh.nl/

More Examples

For more examples you can have a look at the test files in the tests directory.

License

Distributed under the MIT License. See LICENSE.txt for more information. [screenshot]: resources/readme_images/screenshot.png

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

jsp_instance_utils-1.0.1.tar.gz (839.3 kB view hashes)

Uploaded Source

Built Distribution

jsp_instance_utils-1.0.1-py3-none-any.whl (324.6 kB view hashes)

Uploaded Python 3

Supported by

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