job-shop-lib 1.6.0__py3-none-any.whl → 1.6.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- job_shop_lib/__init__.py +1 -1
- job_shop_lib/_schedule.py +13 -4
- {job_shop_lib-1.6.0.dist-info → job_shop_lib-1.6.1.dist-info}/METADATA +2 -3
- {job_shop_lib-1.6.0.dist-info → job_shop_lib-1.6.1.dist-info}/RECORD +6 -6
- {job_shop_lib-1.6.0.dist-info → job_shop_lib-1.6.1.dist-info}/LICENSE +0 -0
- {job_shop_lib-1.6.0.dist-info → job_shop_lib-1.6.1.dist-info}/WHEEL +0 -0
job_shop_lib/__init__.py
CHANGED
job_shop_lib/_schedule.py
CHANGED
@@ -405,10 +405,15 @@ class Schedule:
|
|
405
405
|
critical_path = deque([last_scheduled_op])
|
406
406
|
current_scheduled_op = last_scheduled_op
|
407
407
|
|
408
|
+
machine_op_index = {}
|
409
|
+
for machine_id, schedule_list in enumerate(self.schedule):
|
410
|
+
machine_op_index[machine_id] = {op: idx for idx, op in
|
411
|
+
enumerate(schedule_list)}
|
412
|
+
|
408
413
|
# 2. Trace backwards from the last operation
|
409
414
|
while True:
|
410
|
-
job_pred = None
|
411
|
-
machine_pred = None
|
415
|
+
job_pred: ScheduledOperation | None = None
|
416
|
+
machine_pred: ScheduledOperation | None = None
|
412
417
|
|
413
418
|
# Find job predecessor (the previous operation in the same job)
|
414
419
|
op_idx_in_job = current_scheduled_op.operation.position_in_job
|
@@ -423,9 +428,13 @@ class Schedule:
|
|
423
428
|
# Find machine predecessor (the previous operation on the same
|
424
429
|
# machine)
|
425
430
|
machine_schedule = self.schedule[current_scheduled_op.machine_id]
|
426
|
-
op_idx_on_machine =
|
431
|
+
op_idx_on_machine = (
|
432
|
+
machine_op_index
|
433
|
+
[current_scheduled_op.machine_id][current_scheduled_op])
|
427
434
|
if op_idx_on_machine > 0:
|
428
|
-
machine_pred = machine_schedule[
|
435
|
+
machine_pred = machine_schedule[
|
436
|
+
op_idx_on_machine - 1
|
437
|
+
]
|
429
438
|
|
430
439
|
# 3. Determine the critical predecessor
|
431
440
|
# The critical predecessor is the one that finished latest, as it
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: job-shop-lib
|
3
|
-
Version: 1.6.
|
3
|
+
Version: 1.6.1
|
4
4
|
Summary: An easy-to-use and modular Python library for the Job Shop Scheduling Problem (JSSP)
|
5
5
|
License: MIT
|
6
6
|
Author: Pabloo22
|
@@ -17,8 +17,7 @@ Requires-Dist: imageio[ffmpeg] (>=2.34.1,<3.0.0)
|
|
17
17
|
Requires-Dist: matplotlib (>=3,<4)
|
18
18
|
Requires-Dist: networkx (>=3,<4)
|
19
19
|
Requires-Dist: numpy (>=1.26.4,<3.0.0)
|
20
|
-
Requires-Dist: ortools (>=9.9,<
|
21
|
-
Requires-Dist: ortools (>=9.9,<9.13) ; sys_platform == "darwin"
|
20
|
+
Requires-Dist: ortools (>=9.9,<9.13)
|
22
21
|
Requires-Dist: pyarrow (>=15,<21)
|
23
22
|
Requires-Dist: pygraphviz (>=1.12,<2.0) ; extra == "pygraphviz"
|
24
23
|
Requires-Dist: simanneal (>=0.5.0,<0.6.0)
|
@@ -1,8 +1,8 @@
|
|
1
|
-
job_shop_lib/__init__.py,sha256=
|
1
|
+
job_shop_lib/__init__.py,sha256=_kA4WyA9KQUW4ZXB4anAXrhQfvhrLj38YLLHovGvFfA,639
|
2
2
|
job_shop_lib/_base_solver.py,sha256=8CCSiA2-DegCKRXhMw7yYyI8iPauTSuLku2LQ8dU-9U,1382
|
3
3
|
job_shop_lib/_job_shop_instance.py,sha256=_92orxdi70645J7cQlRE1I0PebvpHRCP6958q9j2h18,24261
|
4
4
|
job_shop_lib/_operation.py,sha256=JI5WjvRXNBeSpPOv3ZwSrUJ4jsVDJYKfMaDHYOaFYts,5945
|
5
|
-
job_shop_lib/_schedule.py,sha256=
|
5
|
+
job_shop_lib/_schedule.py,sha256=jvidw6iIh05QGe2OeA6JkiQuCzLoOtgqny8zj95_sGA,18173
|
6
6
|
job_shop_lib/_scheduled_operation.py,sha256=czrGr87EOTlO2NPolIN5CDigeiCzvQEyra5IZPwSFZc,2801
|
7
7
|
job_shop_lib/benchmarking/__init__.py,sha256=JPnCw5mK7sADAW0HctVKHEDRw22afp9caNh2eUS36Ys,3290
|
8
8
|
job_shop_lib/benchmarking/_load_benchmark.py,sha256=-cgyx0Kn6uAc3KdGFSQb6eUVQjQggmpVKOH9qusNkXI,2930
|
@@ -73,7 +73,7 @@ job_shop_lib/visualization/gantt/_plot_gantt_chart.py,sha256=_4UGUTRuIw0tLzsJD9G
|
|
73
73
|
job_shop_lib/visualization/graphs/__init__.py,sha256=HUWzfgQLeklNROtjnxeJX_FIySo_baTXO6klx0zUVpQ,630
|
74
74
|
job_shop_lib/visualization/graphs/_plot_disjunctive_graph.py,sha256=L9_ZGgvCFpGc2rTOdZESdtydFQqShjqedimIOhqZx6Y,16209
|
75
75
|
job_shop_lib/visualization/graphs/_plot_resource_task_graph.py,sha256=nkkdZ-9_OBevw72Frecwzv1y3WyhGZ9r9lz0y9MXvZ8,13192
|
76
|
-
job_shop_lib-1.6.
|
77
|
-
job_shop_lib-1.6.
|
78
|
-
job_shop_lib-1.6.
|
79
|
-
job_shop_lib-1.6.
|
76
|
+
job_shop_lib-1.6.1.dist-info/LICENSE,sha256=9mggivMGd5taAu3xbmBway-VQZMBzurBGHofFopvUsQ,1069
|
77
|
+
job_shop_lib-1.6.1.dist-info/METADATA,sha256=4cuNTeLFoaVOMBqGvymRzwXKgTHQSt3ZgQ-iKr0Xs1s,19159
|
78
|
+
job_shop_lib-1.6.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
79
|
+
job_shop_lib-1.6.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|