IGJSP 1.1.9__py3-none-any.whl → 1.1.11__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.
IGJSP/generador.py CHANGED
@@ -159,7 +159,7 @@ class JSP:
159
159
  # tpm = [max(10, data) for data in np.random.normal(50, 20, self.numMchs)]
160
160
  # else:
161
161
  # tpm = expon(loc=10, scale=20).rvs(self.numMchs)
162
- energyPer, timePer = self._particionate_speed_space(speed)
162
+ _, timePer = self._particionate_speed_space(speed)
163
163
  self._generate_standar_operation_cost(distribution,tpm)
164
164
 
165
165
  self.ProcessingTime = np.zeros((self.numJobs, self.numMchs, self.speed), dtype=int)
@@ -185,7 +185,7 @@ class JSP:
185
185
  def _particionate_speed_space(self, speed):
186
186
  energyPer = np.linspace(0.5, 3, speed) if speed > 1 else [1]
187
187
  # timePer = [t(c) for c in energyPer]
188
- timePer = sorted([random.uniform(0, 100)/100 for _ in range(3)])
188
+ timePer = sorted([random.uniform(0, 100)/100 for _ in range(speed)])
189
189
  return energyPer, timePer
190
190
 
191
191
  def _generate_standar_operation_cost(self, distribution,tpm=[]):
@@ -225,7 +225,7 @@ class JSP:
225
225
  # time = max(1, self.operationCost[job, machine] * tper)
226
226
  # ans.append((time, max(1, f(time))))
227
227
  # ans.append((time, max(1, f(time))))
228
- timePer = sorted([random.uniform(0, 100)/100 for _ in range(3)])
228
+ timePer = sorted([random.uniform(0, 100)/100 for _ in range(self.speed)])
229
229
  return [(round(i*100),round((1-i)*100)) for i in timePer]
230
230
 
231
231
  def _release_due(self, duration, distribution):
@@ -657,9 +657,11 @@ class JSP:
657
657
  # for s in range(1,self.speed+1):
658
658
  s = self.speed
659
659
  s0, sf, sp = [0,s,1]
660
+
660
661
  time = data.ProcessingTime[:, :, s0:sf:sp]
661
662
  energy = data.EnergyConsumption[:, :, s0:sf:sp]
662
- precedence = np.full((data.numJobs, data.numMchs), 0)
663
+ # precedence = np.full((data.numJobs, data.numMchs), 0)
664
+ precedence = data.Orden
663
665
 
664
666
  replace_data = {
665
667
  "machines": data.numMchs,
@@ -677,9 +679,12 @@ class JSP:
677
679
  replace_data["releaseDate"] = str(data.ReleaseDueDate[:,:, 0].flatten()).replace(" ",", ")
678
680
  replace_data["dueDate"] = str(data.ReleaseDueDate[:, :, 1].flatten()).replace(" ",", ")
679
681
 
680
- for job in range(data.numJobs):
681
- for i, prioridad in enumerate(range(data.numMchs)):
682
- precedence[job, data.Orden[job, prioridad]] = i
682
+
683
+ # print(data.JSP["timeEnergy"])
684
+ # quit()
685
+ # for job in range(data.numJobs):
686
+ # for i, prioridad in enumerate(range(data.numMchs)):
687
+ # precedence[job, data.Orden[job, prioridad]] = i
683
688
 
684
689
  replace_data["precedence"] = str(precedence.flatten()).replace(" ", ", ")
685
690
 
@@ -1169,23 +1174,23 @@ class Generator:
1169
1174
 
1170
1175
  if self.single_folder_output:
1171
1176
  if self.json:
1172
- jsp_instance.saveJsonFile(problem_path + jm_path.split("/")[0] + f"_{j}x{m}_{i}.json")
1177
+ jsp_instance.saveJsonFile(problem_path + jm_path.split("/")[0] + f"_{j}x{m}_{i}_{index}.json")
1173
1178
  if self.dzn:
1174
- pkl_path = f"{problem_path}/" + jm_path.split("/")[0] + f"_{j}x{m}_{i}.pkl"
1179
+ pkl_path = f"{problem_path}/" + jm_path.split("/")[0] + f"_{j}x{m}_{i}_{index}.pkl"
1175
1180
  jsp_instance.savePythonFile(pkl_path)
1176
1181
  jsp_instance.saveDznFile(pkl_path, problem_path + jm_path,index)#f"{j}x{m}_{i}")
1177
1182
  os.remove(pkl_path)
1178
1183
  if self.taillard:
1179
- jsp_instance.saveTaillardStandardFile(problem_path + jm_path.split("/")[0] + f"_{j}x{m}_{i}.txt")
1184
+ jsp_instance.saveTaillardStandardFile(problem_path + jm_path.split("/")[0] + f"_{j}x{m}_{i}_{index}.txt")
1180
1185
  else:
1181
1186
  if self.json:
1182
- jsp_instance.saveJsonFile(f"{problem_path}/JSON/" + jm_path.split("/")[0] + f"_{j}x{m}_{i}.json")
1187
+ jsp_instance.saveJsonFile(f"{problem_path}/JSON/" + jm_path.split("/")[0] + f"_{j}x{m}_{i}_{index}.json")
1183
1188
  if self.dzn:
1184
- pkl_path = f"{problem_path}/" + jm_path.split("/")[0] + f"_{j}x{m}_{i}.pkl"
1189
+ pkl_path = f"{problem_path}/" + jm_path.split("/")[0] + f"_{j}x{m}_{i}_{index}.pkl"
1185
1190
  jsp_instance.savePythonFile(pkl_path)
1186
1191
  jsp_instance.saveDznFile(pkl_path,f"{problem_path}/DZN/" + jm_path,index)#f"{j}x{m}_{i}")
1187
1192
  os.remove(pkl_path)
1188
1193
  if self.taillard:
1189
- jsp_instance.saveTaillardStandardFile(f"{problem_path}/TAILLARD/" + jm_path.split("/")[0] + f"_{j}x{m}_{i}.txt")
1194
+ jsp_instance.saveTaillardStandardFile(f"{problem_path}/TAILLARD/" + jm_path.split("/")[0] + f"_{j}x{m}_{i}_{index}.txt")
1190
1195
  instances.append(copy.deepcopy(jsp_instance))
1191
1196
  return instances
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: IGJSP
3
- Version: 1.1.9
3
+ Version: 1.1.11
4
4
  Summary: Instance generator for JSP
5
5
  Project-URL: Homepage, https://gps.blogs.upv.es/
6
6
  Author-email: GPS-UPV <gps@dsic.upv.es>
@@ -1,4 +1,4 @@
1
- IGJSP/generador.py,sha256=bXDnW5Bg23PqfFfDYDRGm53YK7L2uiktaRBjrhtPFxY,52152
1
+ IGJSP/generador.py,sha256=mmZFV6qL5pAfd0TB7t5HRrq-t4hTctKxjsEiWQtlBdA,52333
2
2
  IGJSP/main.py,sha256=Sia5Ss8O3HWBdshvPLJKUMaZIoQPHy6x8yzvojojPFo,2838
3
3
  IGJSP/Minizinc/Models/RD/JSP0.mzn,sha256=cfN_E3RQ6nBulGfaOOYTd-zAgA5SI6E2saDlYtKCflg,2282
4
4
  IGJSP/Minizinc/Models/RD/JSP1.mzn,sha256=5B8cyw2WyKR8yEL1fFd0TaCAVhjPoxEJRJDPPEjJGEk,2840
@@ -12,7 +12,7 @@ IGJSP/Minizinc/Types/RD/FJSP/type2.dzn,sha256=Wz1MnkSL5GUPsbh1eq0leoaQRImkNqQqkX
12
12
  IGJSP/Minizinc/Types/RD/JSP/type0.dzn,sha256=wNuPQkXBXPSpPaPz2WFhp4pGDgfSimtg4I93UfwC01Q,263
13
13
  IGJSP/Minizinc/Types/RD/JSP/type1.dzn,sha256=Xbt9StzCgEqqh_HS9tWGrTVtu-OEnf5Yq5Ty91AkzoM,333
14
14
  IGJSP/Minizinc/Types/RD/JSP/type2.dzn,sha256=L2nc7bPJEhyuaEwgw0ZCpC52CpVJILQU_WQdKn8GUZs,379
15
- igjsp-1.1.9.dist-info/METADATA,sha256=G5NdAy5zieIPPeOBfcA7xGFH6IBscNZLm3EIDg1CqOs,10589
16
- igjsp-1.1.9.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
17
- igjsp-1.1.9.dist-info/licenses/LICENSE,sha256=f7RDRO-z_nMoooAya7NAb8sXtrHR6WnttYtyUc9fB-c,1116
18
- igjsp-1.1.9.dist-info/RECORD,,
15
+ igjsp-1.1.11.dist-info/METADATA,sha256=FEGPzq7UdzmEwMzfFWTKd7tIJKFHieAf9ySx5ySwUqI,10590
16
+ igjsp-1.1.11.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
17
+ igjsp-1.1.11.dist-info/licenses/LICENSE,sha256=f7RDRO-z_nMoooAya7NAb8sXtrHR6WnttYtyUc9fB-c,1116
18
+ igjsp-1.1.11.dist-info/RECORD,,
File without changes