Coverage for moptipy / examples / jssp / __init__.py: 100%

7 statements  

« prev     ^ index     » next       coverage.py v7.12.0, created at 2025-11-24 08:49 +0000

1""" 

2The Job Shop Scheduling Problem is a good example for optimization tasks. 

3 

4The JSSP is one of the most well-known combinatorial optimization tasks. 

5Here we provide the well-known and often-used set of benchmark instances 

6(:mod:`~moptipy.examples.jssp.instance`) for this problem. Moreover, we 

7also run a fully-fledged example experiment applying many metaheuristics 

8to eight selected JSSP instances in module 

9:mod:`~moptipy.examples.jssp.experiment` and evaluate the data gathered from 

10this experiment in :mod:`~moptipy.examples.jssp.evaluation`. Be aware that 

11actually executing this experiment will take a very long time. However, you 

12can also find the complete experiment, every single algorithm used, and all 

13conclusions drawn with in-depth discussions in our online book "Optimization 

14Algorithms" at https://thomasweise.github.io/oa. 

15 

16Anyway, here you have many JSSP benchmark instances, a useful search space, 

17and the common objective function. You can use them for your own research, if 

18you want: The JSSP benchmark instances can be loaded from a package-internal 

19resource by name using module :mod:`~moptipy.examples.jssp.instance`. 

20Solutions to a JSSP instances are :class:`~moptipy.examples.jssp.gantt.Gantt` 

21charts, i.e., diagrams which assign each operation of a job to a machine and 

22time slot. The :class:`~moptipy.examples.jssp.gantt_space.GanttSpace` is a 

23space operating on such charts and the 

24:class:`~moptipy.examples.jssp.makespan.Makespan` is the typical objective 

25function when solving JSSPs. Gantt charts can be encoded as permutations 

26with repetitions using the :mod:`~moptipy.examples.jssp.ob_encoding`. 

27 

281. Ronald Lewis Graham, Eugene Leighton Lawler, Jan Karel Lenstra, Alexander 

29 Hendrik George Rinnooy Kan. Optimization and Approximation in Deterministic 

30 Sequencing and Scheduling: A Survey. *Annals of Discrete Mathematics* 

31 5:287-326, 1979. doi: https://doi.org/10.1016/S0167-5060(08)70356-X. 

32 https://ir.cwi.nl/pub/18052/18052A.pdf. 

332. Eugene Leighton Lawler, Jan Karel Lenstra, Alexander Hendrik George Rinnooy 

34 Kan, and David B. Shmoys. Sequencing and Scheduling: Algorithms and 

35 Complexity. Chapter 9 in Stephen C. Graves, Alexander Hendrik George 

36 Rinnooy Kan, and Paul H. Zipkin, editors, *Handbook of Operations Research 

37 and Management Science,* volume IV: *Production Planning and Inventory,* 

38 1993, pages 445-522. Amsterdam, The Netherlands: North-Holland Scientific 

39 Publishers Ltd. doi: https://doi.org/10.1016/S0927-0507(05)80189-6. 

40 http://alexandria.tue.nl/repository/books/339776.pdf. 

413. Eugene Leighton Lawler. Recent Results in the Theory of Machine Scheduling. 

42 Chapter 8 in Achim Bachem, Bernhard Korte, and Martin Grötschel, editors, 

43 *Math Programming: The State of the Art,* 1982, pages 202-234. 

44 Bonn, Germany/New York, NY, USA: Springer-Verlag GmbH. 

45 ISBN: 978-3-642-68876-8. doi: https://doi.org/10.1007/978-3-642-68874-4_9. 

464. Éric D. Taillard. Benchmarks for Basic Scheduling Problems. *European 

47 Journal of Operational Research (EJOR)* 64(2):278-285, January 1993. 

48 doi: https://doi.org/10.1016/0377-2217(93)90182-M. 

49 http://mistic.heig-vd.ch/taillard/articles.dir/Taillard1993EJOR.pdf. 

505. Jacek Błażewicz, Wolfgang Domschke, and Erwin Pesch. The Job Shop 

51 Scheduling Problem: Conventional and New Solution Techniques. *European 

52 Journal of Operational Research (EJOR)* 93(1):1-33, August 1996. 

53 doi: https://doi.org/10.1016/0377-2217(95)00362-2. 

546. Thomas Weise. *Optimization Algorithms.* 2021-2023. Hefei, Anhui, China: 

55 Institute of Applied Optimization, School of Artificial Intelligence and 

56 Big Data, Hefei University. https://thomasweise.github.io/oa 

57""" 

58 

59 

60def __lang_setup() -> None: 

61 """Perform the language setup.""" 

62 from moptipy.utils.lang import DE, EN, ZH # pylint: disable=C0415 # noqa 

63 

64 # the English language strings 

65 EN.extend({ 

66 "gantt_info": "{gantt.instance.name} ({gantt.instance.jobs} " 

67 "jobs \u00D7 {gantt.instance.machines} machines), " 

68 "makespan {gantt[:,:,2].max()}", 

69 "gantt_info_no_ms": "{gantt.instance.name} ({gantt.instance.jobs} " 

70 "jobs \u00D7 {gantt.instance.machines} machines)", 

71 "gantt_info_short": "{gantt.instance.name} / {gantt[:,:,2].max()}", 

72 "machine": "machine", 

73 "makespan": "makespan", 

74 }) 

75 # the German language strings 

76 DE.extend({ 

77 "gantt_info": "{gantt.instance.name} ({gantt.instance.jobs} " 

78 "Jobs \u00D7 {gantt.instance.machines} Maschinen), " 

79 "Makespan {gantt[:,:,2].max()}", 

80 "gantt_info_no_ms": "{gantt.instance.name} ({gantt.instance.jobs} " 

81 "Jobs \u00D7 {gantt.instance.machines} Maschinen)", 

82 "gantt_info_short": "{gantt.instance.name} / {gantt[:,:,2].max()}", 

83 "machine": "Maschine", 

84 "makespan": "Makespan", 

85 }) 

86 # the Chinese language strings 

87 ZH.extend({ 

88 "gantt_info": "{gantt.instance.name} ({gantt.instance.jobs}份作业" 

89 "\u00D7{gantt.instance.machines}台机器), " 

90 "最大完工时间{gantt[:,:,2].max()}", 

91 "gantt_info_no_ms": 

92 "{gantt.instance.name} ({gantt.instance.jobs}份作业" 

93 "\u00D7{gantt.instance.machines}台机器) ", 

94 "gantt_info_short": "{gantt.instance.name} / {gantt[:,:,2].max()}", 

95 "machine": "机器", 

96 "makespan": "最大完工时间", 

97 }) 

98 

99 

100__lang_setup() # invoke the language setup 

101del __lang_setup # delete the language setup routine