IGJSP 0.0.8__py3-none-any.whl → 0.0.10__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
@@ -12,7 +12,11 @@ import networkx as nx
12
12
  import numpy as np
13
13
  from scipy.stats import expon, norm, uniform
14
14
  from pprint import pprint
15
+ import sys
15
16
 
17
+ import importlib_resources
18
+ from importlib.resources import read_text
19
+ minizinc_files = importlib_resources.files("IGJSP")
16
20
 
17
21
  def f(x):
18
22
  return int(np.exp(-int(x)/100)*100)
@@ -67,6 +71,7 @@ class JSP:
67
71
 
68
72
  self._jobToMachine(release_date_tasks, timePer, distribution)
69
73
  self.generate_maxmin_objective_values()
74
+ self.vectorization()
70
75
 
71
76
  def _particionate_speed_space(self, speed):
72
77
  energyPer = np.linspace(0.5, 3, speed) if speed > 1 else [1]
@@ -181,8 +186,8 @@ class JSP:
181
186
  "machines": data.numMchs,
182
187
  "jobs": data.numJobs,
183
188
  "Speed": s,
184
- "time": list(time.flatten()),
185
- "energy": list(energy.flatten())
189
+ "time": list(map(int,time.flatten())),
190
+ "energy": list(map(int,energy.flatten()))
186
191
  }
187
192
  if t == 1:
188
193
  replace_data["releaseDate"] = [data.ReleaseDueDate[job, 0] for job in range(data.numJobs)]
@@ -194,11 +199,12 @@ class JSP:
194
199
  for job in range(data.numJobs):
195
200
  for i, prioridad in enumerate(range(data.numMchs)):
196
201
  precedence[job, data.Orden[job, prioridad]] = i
197
- replace_data["precedence"] = list(precedence.flatten())
202
+ replace_data["precedence"] = list(map(int,precedence.flatten()))
198
203
 
199
- new_object = data.change_rddd_type(t).select_speeds(list(range(s0, sf, sp)))
200
- with open(f"./Minizinc/Types/RD/type{t}.dzn", "r", encoding="utf-8") as file:
204
+ # new_object = data.change_rddd_type(t).select_speeds(list(range(s0, sf, sp)))
205
+ with open(minizinc_files.joinpath("Minizinc/Types/RD", f"type{t}.dzn"), "r", encoding="utf-8") as file:
201
206
  filedata = file.read()
207
+ # filedata = file
202
208
  for kk, v in replace_data.items():
203
209
  filedata = filedata.replace("{" + kk + "}", str(v))
204
210
 
@@ -400,7 +406,7 @@ class JSP:
400
406
  vectorization["min_makespan"] = self.min_makespan
401
407
  vectorization["max_sum_energy"] = self.max_energy
402
408
  vectorization["min_sum_energy"] = self.min_energy
403
- vectorization["max_tardiness"] = self.max_tardiness
409
+ vectorization["max_tardiness"] = self.max_tardiness if self.rddd != 0 else 0
404
410
  vectorization["min_window"] = 0
405
411
  vectorization["max_window"] = 0
406
412
  vectorization["mean_window"] = 0
@@ -465,7 +471,7 @@ class JSP:
465
471
  vectorization["max_energy_value"] = np.max(self.ProcessingTime)
466
472
  vectorization["min_energy_value"] = np.min(self.ProcessingTime)
467
473
  vectorization["mean_energy_value"] = np.mean(self.ProcessingTime)
468
-
474
+ self.features = vectorization
469
475
  return vectorization
470
476
 
471
477
  def disjuntive_graph(self):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: IGJSP
3
- Version: 0.0.8
3
+ Version: 0.0.10
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>
@@ -0,0 +1,24 @@
1
+ IGJSP/generador.py,sha256=lOgB0hDKLboO-eubDL8DV7dvK8XfnQ2MvXRc_CkkZdk,27747
2
+ IGJSP/main.py,sha256=qnpAdI9Nymfbb2t674EHKCZr1vG80tGyVT5RKMiGvZM,2727
3
+ IGJSP/Minizinc/Models/RD/JSP0.mzn,sha256=cfN_E3RQ6nBulGfaOOYTd-zAgA5SI6E2saDlYtKCflg,2282
4
+ IGJSP/Minizinc/Models/RD/JSP1.mzn,sha256=5B8cyw2WyKR8yEL1fFd0TaCAVhjPoxEJRJDPPEjJGEk,2840
5
+ IGJSP/Minizinc/Models/RD/JSP2.mzn,sha256=ATqpg-Ow_VzjQJ_hZSSXiTXmwmqNqFsq81TZgcnjTks,2941
6
+ IGJSP/Minizinc/Types/RD/JSP0.mzn,sha256=cfN_E3RQ6nBulGfaOOYTd-zAgA5SI6E2saDlYtKCflg,2282
7
+ IGJSP/Minizinc/Types/RD/JSP1.mzn,sha256=5B8cyw2WyKR8yEL1fFd0TaCAVhjPoxEJRJDPPEjJGEk,2840
8
+ IGJSP/Minizinc/Types/RD/JSP2.mzn,sha256=ATqpg-Ow_VzjQJ_hZSSXiTXmwmqNqFsq81TZgcnjTks,2941
9
+ IGJSP/Minizinc/Types/RD/type0.dzn,sha256=alo54TrPd2svp-YeOq8rNhb42Aj5w4N1y1WYRxZ-aWM,225
10
+ IGJSP/Minizinc/Types/RD/type1.dzn,sha256=r3f1uOoDnscjpXHbpvOWPGhGN0tmwkJ3NYIRP-NGk5M,298
11
+ IGJSP/Minizinc/Types/RD/type2.dzn,sha256=ddJxLqR_WlUpycHhA_QulxiTx3o9neIzNESEt59VUx0,344
12
+ IGJSP/Minizinc/Models/RD/JSP0.mzn,sha256=cfN_E3RQ6nBulGfaOOYTd-zAgA5SI6E2saDlYtKCflg,2282
13
+ IGJSP/Minizinc/Models/RD/JSP1.mzn,sha256=5B8cyw2WyKR8yEL1fFd0TaCAVhjPoxEJRJDPPEjJGEk,2840
14
+ IGJSP/Minizinc/Models/RD/JSP2.mzn,sha256=ATqpg-Ow_VzjQJ_hZSSXiTXmwmqNqFsq81TZgcnjTks,2941
15
+ IGJSP/Minizinc/Types/RD/JSP0.mzn,sha256=cfN_E3RQ6nBulGfaOOYTd-zAgA5SI6E2saDlYtKCflg,2282
16
+ IGJSP/Minizinc/Types/RD/JSP1.mzn,sha256=5B8cyw2WyKR8yEL1fFd0TaCAVhjPoxEJRJDPPEjJGEk,2840
17
+ IGJSP/Minizinc/Types/RD/JSP2.mzn,sha256=ATqpg-Ow_VzjQJ_hZSSXiTXmwmqNqFsq81TZgcnjTks,2941
18
+ IGJSP/Minizinc/Types/RD/type0.dzn,sha256=alo54TrPd2svp-YeOq8rNhb42Aj5w4N1y1WYRxZ-aWM,225
19
+ IGJSP/Minizinc/Types/RD/type1.dzn,sha256=r3f1uOoDnscjpXHbpvOWPGhGN0tmwkJ3NYIRP-NGk5M,298
20
+ IGJSP/Minizinc/Types/RD/type2.dzn,sha256=ddJxLqR_WlUpycHhA_QulxiTx3o9neIzNESEt59VUx0,344
21
+ igjsp-0.0.10.dist-info/METADATA,sha256=cAMGyVrod2bEHE5AUU5OG5uR96i3tVS8C162l07hCzA,7407
22
+ igjsp-0.0.10.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
23
+ igjsp-0.0.10.dist-info/licenses/LICENSE,sha256=f7RDRO-z_nMoooAya7NAb8sXtrHR6WnttYtyUc9fB-c,1116
24
+ igjsp-0.0.10.dist-info/RECORD,,
@@ -1,15 +0,0 @@
1
- IGJSP/generador.py,sha256=ON81bJF8VpNISN9RdUcQncyzfXVm-YZqLEpdjwRQoKg,27425
2
- IGJSP/main.py,sha256=qnpAdI9Nymfbb2t674EHKCZr1vG80tGyVT5RKMiGvZM,2727
3
- IGJSP/Minizinc/Models/RD/JSP0.mzn,sha256=cfN_E3RQ6nBulGfaOOYTd-zAgA5SI6E2saDlYtKCflg,2282
4
- IGJSP/Minizinc/Models/RD/JSP1.mzn,sha256=5B8cyw2WyKR8yEL1fFd0TaCAVhjPoxEJRJDPPEjJGEk,2840
5
- IGJSP/Minizinc/Models/RD/JSP2.mzn,sha256=ATqpg-Ow_VzjQJ_hZSSXiTXmwmqNqFsq81TZgcnjTks,2941
6
- IGJSP/Minizinc/Types/RD/JSP0.mzn,sha256=cfN_E3RQ6nBulGfaOOYTd-zAgA5SI6E2saDlYtKCflg,2282
7
- IGJSP/Minizinc/Types/RD/JSP1.mzn,sha256=5B8cyw2WyKR8yEL1fFd0TaCAVhjPoxEJRJDPPEjJGEk,2840
8
- IGJSP/Minizinc/Types/RD/JSP2.mzn,sha256=ATqpg-Ow_VzjQJ_hZSSXiTXmwmqNqFsq81TZgcnjTks,2941
9
- IGJSP/Minizinc/Types/RD/type0.dzn,sha256=alo54TrPd2svp-YeOq8rNhb42Aj5w4N1y1WYRxZ-aWM,225
10
- IGJSP/Minizinc/Types/RD/type1.dzn,sha256=r3f1uOoDnscjpXHbpvOWPGhGN0tmwkJ3NYIRP-NGk5M,298
11
- IGJSP/Minizinc/Types/RD/type2.dzn,sha256=ddJxLqR_WlUpycHhA_QulxiTx3o9neIzNESEt59VUx0,344
12
- igjsp-0.0.8.dist-info/METADATA,sha256=g9Jp-YJgIbHm7PzWZRZZumUgdlB73MsohPKJqzt4XMU,7406
13
- igjsp-0.0.8.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
14
- igjsp-0.0.8.dist-info/licenses/LICENSE,sha256=f7RDRO-z_nMoooAya7NAb8sXtrHR6WnttYtyUc9fB-c,1116
15
- igjsp-0.0.8.dist-info/RECORD,,
File without changes