job-shop-lib 1.0.3__py3-none-any.whl → 1.0.4__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 +18 -2
- {job_shop_lib-1.0.3.dist-info → job_shop_lib-1.0.4.dist-info}/METADATA +1 -1
- {job_shop_lib-1.0.3.dist-info → job_shop_lib-1.0.4.dist-info}/RECORD +6 -6
- {job_shop_lib-1.0.3.dist-info → job_shop_lib-1.0.4.dist-info}/LICENSE +0 -0
- {job_shop_lib-1.0.3.dist-info → job_shop_lib-1.0.4.dist-info}/WHEEL +0 -0
job_shop_lib/__init__.py
CHANGED
job_shop_lib/_schedule.py
CHANGED
@@ -121,7 +121,23 @@ class Schedule:
|
|
121
121
|
job_sequences: list[list[int]],
|
122
122
|
metadata: dict[str, Any] | None = None,
|
123
123
|
) -> Schedule:
|
124
|
-
"""Creates a schedule from a dictionary representation.
|
124
|
+
"""Creates a schedule from a dictionary representation.
|
125
|
+
|
126
|
+
Args:
|
127
|
+
instance:
|
128
|
+
The instance to create the schedule for. Can be a dictionary
|
129
|
+
representation of a :class:`JobShopInstance` or a
|
130
|
+
:class:`JobShopInstance` object.
|
131
|
+
job_sequences:
|
132
|
+
A list of lists of job ids. Each list of job ids represents the
|
133
|
+
order of operations on the machine. The machine that the list
|
134
|
+
corresponds to is determined by the index of the list.
|
135
|
+
metadata:
|
136
|
+
A dictionary with additional information about the schedule.
|
137
|
+
|
138
|
+
Returns:
|
139
|
+
A :class:`Schedule` object with the given job sequences.
|
140
|
+
"""
|
125
141
|
if isinstance(instance, dict):
|
126
142
|
instance = JobShopInstance.from_matrices(**instance)
|
127
143
|
schedule = Schedule.from_job_sequences(instance, job_sequences)
|
@@ -157,7 +173,7 @@ class Schedule:
|
|
157
173
|
dispatcher.reset()
|
158
174
|
raw_solution_deques = [deque(job_ids) for job_ids in job_sequences]
|
159
175
|
|
160
|
-
while
|
176
|
+
while any(job_seq for job_seq in raw_solution_deques):
|
161
177
|
at_least_one_operation_scheduled = False
|
162
178
|
for machine_id, job_ids in enumerate(raw_solution_deques):
|
163
179
|
if not job_ids:
|
@@ -1,8 +1,8 @@
|
|
1
|
-
job_shop_lib/__init__.py,sha256=
|
1
|
+
job_shop_lib/__init__.py,sha256=zWF6F4xUFWnXRts5vTslUlMDw4VqfsPHNn9LYNu_7WY,639
|
2
2
|
job_shop_lib/_base_solver.py,sha256=p17XmtufNc9Y481cqZUT45pEkUmmW1HWG53dfhIBJH8,1363
|
3
3
|
job_shop_lib/_job_shop_instance.py,sha256=RWibh5_lVTHj0DEkMw94O4jYZhwRReYYpVVIbT0cYtQ,18353
|
4
4
|
job_shop_lib/_operation.py,sha256=lwCjgXwWlgESFuV3Yh4SCVofPGCd3hJU4vnK7peREac,4235
|
5
|
-
job_shop_lib/_schedule.py,sha256=
|
5
|
+
job_shop_lib/_schedule.py,sha256=pY02c-VF7cHxR29dFAktrn32mFi0cmRIcDAGsoekK8g,11941
|
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
|
@@ -67,7 +67,7 @@ job_shop_lib/visualization/gantt/_plot_gantt_chart.py,sha256=_4UGUTRuIw0tLzsJD9G
|
|
67
67
|
job_shop_lib/visualization/graphs/__init__.py,sha256=HUWzfgQLeklNROtjnxeJX_FIySo_baTXO6klx0zUVpQ,630
|
68
68
|
job_shop_lib/visualization/graphs/_plot_disjunctive_graph.py,sha256=YyNEKgg1ol34JYu8Ej1kKonsuFu7zDav4uuUzU_FS4Q,15905
|
69
69
|
job_shop_lib/visualization/graphs/_plot_resource_task_graph.py,sha256=Sp1aokyM_8QZb39QCLrjQECcbDHkdcYw7wMZILWxN9o,13191
|
70
|
-
job_shop_lib-1.0.
|
71
|
-
job_shop_lib-1.0.
|
72
|
-
job_shop_lib-1.0.
|
73
|
-
job_shop_lib-1.0.
|
70
|
+
job_shop_lib-1.0.4.dist-info/LICENSE,sha256=9mggivMGd5taAu3xbmBway-VQZMBzurBGHofFopvUsQ,1069
|
71
|
+
job_shop_lib-1.0.4.dist-info/METADATA,sha256=aC5I_ZNljvgILK5oD9ymxtJsYWHobe6e1MfW4LPBRAk,16460
|
72
|
+
job_shop_lib-1.0.4.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
73
|
+
job_shop_lib-1.0.4.dist-info/RECORD,,
|
File without changes
|
File without changes
|