job_shop_lib.benchmarking¶
Contains functions to load benchmark instances.
Loads all benchmark instances available. |
|
|
Loads a specific benchmark instance. |
Loads the raw JSON file containing the benchmark instances. |
You can load a benchmark instance from the library:
from job_shop_lib.benchmarking import load_benchmark_instance
ft06 = load_benchmark_instance("ft06")
This package contains functions to load the instances from the file
and return them as JobShopInstance
objects without having to download
them manually.
The contributions to this benchmark dataset are as follows:
abz5-9
: by Adams et al. (1988).ft06
,ft10
,ft20
: by Fisher and Thompson (1963).la01-40
: by Lawrence (1984)orb01-10
: by Applegate and Cook (1991).swb01-20
: by Storer et al. (1992).yn1-4
: by Yamada and Nakano (1992).ta01-80
: by Taillard (1993).
The metadata from these instances has been updated using data from: https://github.com/thomasWeise/jsspInstancesAndResults
- It includes the following information:
"optimum" (
int | None
): The optimal makespan for the instance."lower_bound" (
int
): The lower bound for the makespan. If optimality is known, it is equal to the optimum."upper_bound" (
int
): The upper bound for the makespan. If optimality is known, it is equal to the optimum."reference" (
str
): The paper or source where the instance was first introduced.
>>> ft06.metadata
{'optimum': 55,
'upper_bound': 55,
'lower_bound': 55,
'reference': "J.F. Muth, G.L. Thompson. 'Industrial scheduling.',
Englewood Cliffs, NJ, Prentice-Hall, 1963."}
References
J. Adams, E. Balas, and D. Zawack, "The shifting bottleneck procedure for job shop scheduling," Management Science, vol. 34, no. 3, pp. 391–401, 1988.
J.F. Muth and G.L. Thompson, Industrial scheduling. Englewood Cliffs, NJ: Prentice-Hall, 1963.
S. Lawrence, "Resource constrained project scheduling: An experimental investigation of heuristic scheduling techniques (Supplement)," Carnegie-Mellon University, Graduate School of Industrial Administration, Pittsburgh, Pennsylvania, 1984.
D. Applegate and W. Cook, "A computational study of job-shop scheduling," ORSA Journal on Computer, vol. 3, no. 2, pp. 149–156, 1991.
R.H. Storer, S.D. Wu, and R. Vaccari, "New search spaces for sequencing problems with applications to job-shop scheduling," Management Science, vol. 38, no. 10, pp. 1495–1509, 1992.
T. Yamada and R. Nakano, "A genetic algorithm applicable to large-scale job-shop problems," in Proceedings of the Second International Workshop on Parallel Problem Solving from Nature (PPSN'2), Brussels, Belgium, pp. 281–290, 1992.
E. Taillard, "Benchmarks for basic scheduling problems," European Journal of Operational Research, vol. 64, no. 2, pp. 278–285, 1993.
- load_all_benchmark_instances()[source]¶
Loads all benchmark instances available.
- Returns:
A dictionary containing the names of the benchmark instances as keys and the corresponding
JobShopInstance
objects as values.- Return type:
dict[str, JobShopInstance]
- load_benchmark_instance(name)[source]¶
Loads a specific benchmark instance.
Calls to
load_benchmark_json()
to load the benchmark instances from the JSON file. The instance is then loaded from the dictionary using the provided name. Since load_benchmark_json is cached, the file is only read once.- Parameters:
name (str) -- The name of the benchmark instance to load. Can be one of the following: "abz5-9", "ft06", "ft10", "ft20", "la01-40", "orb01-10", "swb01-20", "yn1-4", or "ta01-80".
- Return type:
- load_benchmark_json()[source]¶
Loads the raw JSON file containing the benchmark instances.
Results are cached to avoid reading the file multiple times.
Each instance is represented as a dictionary with the following keys and values:
name
(str
): The name of the instance.duration_matrix
(list[list[int]]
): The matrix containing the durations for each operation.machines_matrix
(list[list[int]]
): The matrix containing the machines for each operation.metadata
(dict[str, Any]
): A dictionary containing metadata about the instance. The keys are:optimum
(int | None
)lower_bound
(int
)upper_bound
(int
)reference
(str
)
Note
This dictionary is the standard way to represent instances in JobShopLib. You can obtain the dictionary of each instance with
JobShopInstance
'sto_dict()
method.- Returns:
The dictionary containing the benchmark instances represented as dictionaries.
- Return type:
dict[str, dict[str, Any]]