IGJSP 1.1.4__tar.gz → 1.1.5__tar.gz
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-1.1.4 → igjsp-1.1.5}/PKG-INFO +1 -2
- {igjsp-1.1.4 → igjsp-1.1.5}/pyproject.toml +2 -3
- {igjsp-1.1.4 → igjsp-1.1.5}/src/IGJSP/generador.py +39 -18
- {igjsp-1.1.4 → igjsp-1.1.5}/.gitignore +0 -0
- {igjsp-1.1.4 → igjsp-1.1.5}/LICENSE +0 -0
- {igjsp-1.1.4 → igjsp-1.1.5}/README.md +0 -0
- {igjsp-1.1.4 → igjsp-1.1.5}/src/IGJSP/Minizinc/Models/RD/JSP0.mzn +0 -0
- {igjsp-1.1.4 → igjsp-1.1.5}/src/IGJSP/Minizinc/Models/RD/JSP1.mzn +0 -0
- {igjsp-1.1.4 → igjsp-1.1.5}/src/IGJSP/Minizinc/Models/RD/JSP2.mzn +0 -0
- {igjsp-1.1.4 → igjsp-1.1.5}/src/IGJSP/Minizinc/Types/RD/FJSP/type0.dzn +0 -0
- {igjsp-1.1.4 → igjsp-1.1.5}/src/IGJSP/Minizinc/Types/RD/FJSP/type1.dzn +0 -0
- {igjsp-1.1.4 → igjsp-1.1.5}/src/IGJSP/Minizinc/Types/RD/FJSP/type2.dzn +0 -0
- {igjsp-1.1.4 → igjsp-1.1.5}/src/IGJSP/Minizinc/Types/RD/JSP/type0.dzn +0 -0
- {igjsp-1.1.4 → igjsp-1.1.5}/src/IGJSP/Minizinc/Types/RD/JSP/type1.dzn +0 -0
- {igjsp-1.1.4 → igjsp-1.1.5}/src/IGJSP/Minizinc/Types/RD/JSP/type2.dzn +0 -0
- {igjsp-1.1.4 → igjsp-1.1.5}/src/IGJSP/Minizinc/Types/RD/JSP0.mzn +0 -0
- {igjsp-1.1.4 → igjsp-1.1.5}/src/IGJSP/Minizinc/Types/RD/JSP1.mzn +0 -0
- {igjsp-1.1.4 → igjsp-1.1.5}/src/IGJSP/Minizinc/Types/RD/JSP2.mzn +0 -0
- {igjsp-1.1.4 → igjsp-1.1.5}/src/IGJSP/main.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: IGJSP
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.5
|
|
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>
|
|
@@ -11,7 +11,6 @@ Classifier: Programming Language :: Python :: 3
|
|
|
11
11
|
Requires-Python: >=3.9
|
|
12
12
|
Requires-Dist: numpy
|
|
13
13
|
Requires-Dist: scipy
|
|
14
|
-
Requires-Dist: tqdm
|
|
15
14
|
Description-Content-Type: text/markdown
|
|
16
15
|
|
|
17
16
|
# Instance Generator for JSP & FJSP (Energy‑aware)
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "IGJSP"
|
|
7
|
-
version = "1.1.
|
|
7
|
+
version = "1.1.5"
|
|
8
8
|
authors = [
|
|
9
9
|
{ name = "GPS-UPV", email = "gps@dsic.upv.es" },
|
|
10
10
|
]
|
|
@@ -18,8 +18,7 @@ classifiers = [
|
|
|
18
18
|
]
|
|
19
19
|
dependencies = [
|
|
20
20
|
"numpy",
|
|
21
|
-
"scipy"
|
|
22
|
-
"tqdm",
|
|
21
|
+
"scipy"
|
|
23
22
|
]
|
|
24
23
|
|
|
25
24
|
[project.urls]
|
|
@@ -150,17 +150,17 @@ class JSP:
|
|
|
150
150
|
np.random.seed(seed)
|
|
151
151
|
self.rddd = rddd
|
|
152
152
|
self.speed = speed
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
153
|
+
#Elimino por que no hace caso del seed. Se tiene que hacer antes de llamar a esta función
|
|
154
|
+
# if not tpm or len(tpm) != self.numMchs:
|
|
155
|
+
# if distribution == "uniform":
|
|
156
|
+
# tpm = np.random.uniform(10, 100, self.numMchs)
|
|
157
|
+
# elif distribution == "normal":
|
|
158
|
+
# tpm = [max(10, data) for data in np.random.normal(50, 20, self.numMchs)]
|
|
159
|
+
# else:
|
|
160
|
+
# tpm = expon(loc=10, scale=20).rvs(self.numMchs)
|
|
161
161
|
energyPer, timePer = self._particionate_speed_space(speed)
|
|
162
|
-
self._generate_standar_operation_cost(distribution)
|
|
163
|
-
|
|
162
|
+
self._generate_standar_operation_cost(distribution,tpm)
|
|
163
|
+
|
|
164
164
|
self.ProcessingTime = np.zeros((self.numJobs, self.numMchs, self.speed), dtype=int)
|
|
165
165
|
self.EnergyConsumption = np.zeros((self.numJobs, self.numMchs, self.speed), dtype=int)
|
|
166
166
|
self.Orden = np.zeros((self.numJobs, self.numMchs), dtype=int)
|
|
@@ -186,13 +186,16 @@ class JSP:
|
|
|
186
186
|
timePer = [t(c) for c in energyPer]
|
|
187
187
|
return energyPer, timePer
|
|
188
188
|
|
|
189
|
-
def _generate_standar_operation_cost(self, distribution):
|
|
190
|
-
if
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
189
|
+
def _generate_standar_operation_cost(self, distribution,tpm=[]):
|
|
190
|
+
if np.array(tpm).shape != (self.numJobs, self.numMchs):
|
|
191
|
+
if distribution == "uniform":
|
|
192
|
+
self.operationCost = np.random.uniform(10, 100, (self.numJobs, self.numMchs))
|
|
193
|
+
elif distribution == "normal":
|
|
194
|
+
self.operationCost = np.array([max(10, x) for x in np.random.normal(50, 20, (self.numJobs, self.numMchs)).reshape(-1)]).reshape(self.numJobs, self.numMchs)
|
|
195
|
+
elif distribution == "exponential":
|
|
196
|
+
self.operationCost = np.random.exponential(10, (self.numJobs, self.numMchs))
|
|
197
|
+
else:
|
|
198
|
+
self.operationCost = tpm
|
|
196
199
|
|
|
197
200
|
def _jobToMachine(self, release_date_tasks, timePer, distribution):
|
|
198
201
|
for job in range(self.numJobs):
|
|
@@ -212,6 +215,7 @@ class JSP:
|
|
|
212
215
|
releaseDateTask += np.median(self.ProcessingTime[job, machine, :])
|
|
213
216
|
if self.rddd == 1:
|
|
214
217
|
self.ReleaseDueDate[job] = [initial, int(self._release_due(releaseDateTask, distribution))]
|
|
218
|
+
|
|
215
219
|
|
|
216
220
|
def _genProcEnergy(self, job, machine, timePer):
|
|
217
221
|
ans = []
|
|
@@ -1127,10 +1131,27 @@ class Generator:
|
|
|
1127
1131
|
jsp_instance = JSP(jobs = jobs, machines = machines)
|
|
1128
1132
|
case "FJSP":
|
|
1129
1133
|
jsp_instance = FJSP(jobs = jobs, machines = machines)
|
|
1134
|
+
|
|
1135
|
+
tpm_aux=[]
|
|
1136
|
+
orden_aux=[]
|
|
1137
|
+
for index in range(1, size + 1):
|
|
1138
|
+
if len(tpm) != machines:
|
|
1139
|
+
if distribution == "uniform":
|
|
1140
|
+
aux = np.random.uniform(10, 100, (jobs, machines))
|
|
1141
|
+
elif distribution == "normal":
|
|
1142
|
+
aux = np.array([max(10, x) for x in np.random.normal(50, 20, (jobs, machines)).reshape(-1)]).reshape(jobs, machines)
|
|
1143
|
+
elif distribution == "exponential":
|
|
1144
|
+
aux = np.random.exponential(10, (jobs, machines))
|
|
1145
|
+
tpm_aux.append(aux)
|
|
1146
|
+
|
|
1147
|
+
orden_aux.append([np.random.choice(range(machines), machines, replace=False) for job in range(jobs)])
|
|
1148
|
+
|
|
1149
|
+
orden_aux = np.array(orden_aux)
|
|
1130
1150
|
|
|
1131
1151
|
for index in range(1, size + 1):
|
|
1132
|
-
jsp_instance.fill_random_values(speed = speed, rddd = ReleaseDateDueDate, distribution = distribution, seed = seed,tpm = tpm)
|
|
1133
1152
|
|
|
1153
|
+
jsp_instance.fill_random_values(speed = speed, rddd = ReleaseDateDueDate, distribution = distribution, seed = seed,tpm = tpm_aux[index-1])
|
|
1154
|
+
jsp_instance.Orden = orden_aux[index-1]
|
|
1134
1155
|
# Determinar el nombre de salida basado en `outputName` y los parámetros actuales
|
|
1135
1156
|
problem_path = self.savepath.format(size = size, jobs =jobs, machines = machines, release_due_date = ReleaseDateDueDate, speed_scaling = speed, distribution = distribution, seed=seed)
|
|
1136
1157
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|