IGJSP 0.0.7__tar.gz → 0.0.9__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-0.0.7 → igjsp-0.0.9}/PKG-INFO +1 -1
- {igjsp-0.0.7 → igjsp-0.0.9}/pyproject.toml +1 -1
- {igjsp-0.0.7 → igjsp-0.0.9}/src/IGJSP/generador.py +88 -8
- {igjsp-0.0.7 → igjsp-0.0.9}/.gitattributes +0 -0
- {igjsp-0.0.7 → igjsp-0.0.9}/.gitignore +0 -0
- {igjsp-0.0.7 → igjsp-0.0.9}/.vscode/settings.json +0 -0
- {igjsp-0.0.7 → igjsp-0.0.9}/LICENSE +0 -0
- {igjsp-0.0.7 → igjsp-0.0.9}/README.md +0 -0
- {igjsp-0.0.7 → igjsp-0.0.9}/src/IGJSP/Minizinc/Models/RD/JSP0.mzn +0 -0
- {igjsp-0.0.7 → igjsp-0.0.9}/src/IGJSP/Minizinc/Models/RD/JSP1.mzn +0 -0
- {igjsp-0.0.7 → igjsp-0.0.9}/src/IGJSP/Minizinc/Models/RD/JSP2.mzn +0 -0
- {igjsp-0.0.7 → igjsp-0.0.9}/src/IGJSP/Minizinc/Types/RD/JSP0.mzn +0 -0
- {igjsp-0.0.7 → igjsp-0.0.9}/src/IGJSP/Minizinc/Types/RD/JSP1.mzn +0 -0
- {igjsp-0.0.7 → igjsp-0.0.9}/src/IGJSP/Minizinc/Types/RD/JSP2.mzn +0 -0
- {igjsp-0.0.7 → igjsp-0.0.9}/src/IGJSP/Minizinc/Types/RD/type0.dzn +0 -0
- {igjsp-0.0.7 → igjsp-0.0.9}/src/IGJSP/Minizinc/Types/RD/type1.dzn +0 -0
- {igjsp-0.0.7 → igjsp-0.0.9}/src/IGJSP/Minizinc/Types/RD/type2.dzn +0 -0
- {igjsp-0.0.7 → igjsp-0.0.9}/src/IGJSP/main.py +0 -0
|
@@ -44,7 +44,7 @@ class JSP:
|
|
|
44
44
|
tpm = [max(10, data) for data in np.random.normal(50, 20, self.numMchs)]
|
|
45
45
|
else:
|
|
46
46
|
tpm = expon(loc=10, scale=20).rvs(self.numMchs)
|
|
47
|
-
|
|
47
|
+
|
|
48
48
|
energyPer, timePer = self._particionate_speed_space(speed)
|
|
49
49
|
self._generate_standar_operation_cost(distribution)
|
|
50
50
|
|
|
@@ -67,6 +67,7 @@ class JSP:
|
|
|
67
67
|
|
|
68
68
|
self._jobToMachine(release_date_tasks, timePer, distribution)
|
|
69
69
|
self.generate_maxmin_objective_values()
|
|
70
|
+
self.vectorization()
|
|
70
71
|
|
|
71
72
|
def _particionate_speed_space(self, speed):
|
|
72
73
|
energyPer = np.linspace(0.5, 3, speed) if speed > 1 else [1]
|
|
@@ -277,16 +278,16 @@ class JSP:
|
|
|
277
278
|
return new_object
|
|
278
279
|
|
|
279
280
|
def generate_maxmin_objective_values(self):
|
|
280
|
-
max_makespan = sum([max(self.ProcessingTime[job, machine, :]) for job in range(self.numJobs) for machine in range(self.numMchs)])
|
|
281
|
+
self.max_makespan = sum([max(self.ProcessingTime[job, machine, :]) for job in range(self.numJobs) for machine in range(self.numMchs)])
|
|
281
282
|
self.min_makespan = max([sum([min(self.ProcessingTime[job, machine, :]) for machine in range(self.numMchs)]) for job in range(self.numJobs)])
|
|
282
|
-
self.max_min_makespan = max_makespan - self.min_makespan
|
|
283
|
-
max_energy = sum([max(self.EnergyConsumption[job, machine, :]) for job in range(self.numJobs) for machine in range(self.numMchs)])
|
|
283
|
+
self.max_min_makespan = self.max_makespan - self.min_makespan
|
|
284
|
+
self.max_energy = sum([max(self.EnergyConsumption[job, machine, :]) for job in range(self.numJobs) for machine in range(self.numMchs)])
|
|
284
285
|
self.min_energy = sum([min(self.EnergyConsumption[job, machine, :]) for job in range(self.numJobs) for machine in range(self.numMchs)])
|
|
285
|
-
self.max_min_energy = max_energy - self.min_energy
|
|
286
|
+
self.max_min_energy = self.max_energy - self.min_energy
|
|
286
287
|
if self.rddd == 1:
|
|
287
|
-
self.max_tardiness = sum([max(0, max_makespan - self.ReleaseDueDate[job, 1]) for job in range(self.numJobs)])
|
|
288
|
+
self.max_tardiness = sum([max(0, self.max_makespan - self.ReleaseDueDate[job, 1]) for job in range(self.numJobs)])
|
|
288
289
|
elif self.rddd == 2:
|
|
289
|
-
self.max_tardiness = np.sum([max(0, np.int64(max_makespan - self.ReleaseDueDate[job, machine, 1])) for job in range(self.numJobs) for machine in range(self.numMchs)])
|
|
290
|
+
self.max_tardiness = np.sum([max(0, np.int64(self.max_makespan - self.ReleaseDueDate[job, machine, 1])) for job in range(self.numJobs) for machine in range(self.numMchs)])
|
|
290
291
|
|
|
291
292
|
def norm_makespan(self, makespan):
|
|
292
293
|
return (makespan - self.min_makespan) / self.max_min_makespan
|
|
@@ -388,7 +389,86 @@ class JSP:
|
|
|
388
389
|
|
|
389
390
|
def generate_schedule_image(self, schedule):
|
|
390
391
|
pass
|
|
391
|
-
|
|
392
|
+
|
|
393
|
+
def vectorization(self):
|
|
394
|
+
vectorization = {}
|
|
395
|
+
# Caracteristicas básicas
|
|
396
|
+
vectorization["jobs"] = self.numJobs
|
|
397
|
+
vectorization["machines"] = self.numMchs
|
|
398
|
+
vectorization["rddd"] = self.rddd
|
|
399
|
+
vectorization["speed"] = self.speed
|
|
400
|
+
vectorization["max_makespan"] = self.max_makespan
|
|
401
|
+
vectorization["min_makespan"] = self.min_makespan
|
|
402
|
+
vectorization["max_sum_energy"] = self.max_energy
|
|
403
|
+
vectorization["min_sum_energy"] = self.min_energy
|
|
404
|
+
vectorization["max_tardiness"] = self.max_tardiness if self.rddd != 0 else 0
|
|
405
|
+
vectorization["min_window"] = 0
|
|
406
|
+
vectorization["max_window"] = 0
|
|
407
|
+
vectorization["mean_window"] = 0
|
|
408
|
+
vectorization["overlap"] = 0
|
|
409
|
+
|
|
410
|
+
# Caracteristicas complejas
|
|
411
|
+
if self.rddd == 0:
|
|
412
|
+
vectorization["min_window"] = -1
|
|
413
|
+
vectorization["max_window"] = -1
|
|
414
|
+
vectorization["mean_window"] = -1
|
|
415
|
+
vectorization["overlap"] = -1
|
|
416
|
+
else:
|
|
417
|
+
if self.rddd == 1:
|
|
418
|
+
# Ventana de cada trabajo
|
|
419
|
+
for job in range(self.numJobs):
|
|
420
|
+
tproc_min = np.sum(np.min(self.ProcessingTime[job,machine,:]) for machine in range(self.numMchs))
|
|
421
|
+
tproc_max = np.sum(np.max(self.ProcessingTime[job,machine,:]) for machine in range(self.numMchs))
|
|
422
|
+
tproc_mean = np.sum(np.mean(self.ProcessingTime[job,machine,:]) for machine in range(self.numMchs))
|
|
423
|
+
window = self.ReleaseDueDate[job,1] - self.ReleaseDueDate[job,0]
|
|
424
|
+
vectorization["min_window"] += window / tproc_max
|
|
425
|
+
vectorization["max_window"] += window / tproc_min
|
|
426
|
+
vectorization["mean_window"] += window / tproc_mean
|
|
427
|
+
vectorization["min_window"] = vectorization["min_window"] / self.numJobs
|
|
428
|
+
vectorization["max_window"] = vectorization["max_window"] / self.numJobs
|
|
429
|
+
vectorization["mean_window"] = vectorization["mean_window"] / self.numJobs
|
|
430
|
+
# Overlap entre trabajos
|
|
431
|
+
for job in range(self.numJobs):
|
|
432
|
+
for job2 in range(job + 1, self.numJobs):
|
|
433
|
+
diff = min(self.ReleaseDueDate[job,1],self.ReleaseDueDate[job2,1])-max(self.ReleaseDueDate[job,0], self.ReleaseDueDate[job2,0])
|
|
434
|
+
if diff > 0:
|
|
435
|
+
vectorization["overlap"] += diff / (self.ReleaseDueDate[job,1] - self.ReleaseDueDate[job,0])
|
|
436
|
+
vectorization["overlap"] += diff / (self.ReleaseDueDate[job2,1] - self.ReleaseDueDate[job2,0])
|
|
437
|
+
vectorization["overlap"] = vectorization["overlap"] / (self.numJobs * (self.numJobs - 1))
|
|
438
|
+
else:
|
|
439
|
+
# Ventana de cada operacion
|
|
440
|
+
for job in range(self.numJobs):
|
|
441
|
+
for machine in range(self.numMchs):
|
|
442
|
+
tproc_min = np.min(self.ProcessingTime[job,machine,:])
|
|
443
|
+
tproc_max = np.max(self.ProcessingTime[job,machine,:])
|
|
444
|
+
tproc_mean = np.mean(self.ProcessingTime[job,machine,:])
|
|
445
|
+
window = self.ReleaseDueDate[job,machine,1] - self.ReleaseDueDate[job,machine,0]
|
|
446
|
+
vectorization["min_window"] += window / tproc_max
|
|
447
|
+
vectorization["max_window"] += window / tproc_min
|
|
448
|
+
vectorization["mean_window"] += window / tproc_mean
|
|
449
|
+
vectorization["min_window"] = vectorization["min_window"] / (self.numJobs * self.numMchs)
|
|
450
|
+
vectorization["max_window"] = vectorization["max_window"] / (self.numJobs * self.numMchs)
|
|
451
|
+
vectorization["mean_window"] = vectorization["mean_window"] / (self.numJobs * self.numMchs)
|
|
452
|
+
# Overlap entre operaciones
|
|
453
|
+
for job1 in range(self.numJobs):
|
|
454
|
+
for machine1 in range(self.numMchs):
|
|
455
|
+
for job2 in range(job1 + 1, self.numJobs):
|
|
456
|
+
diff = min(self.ReleaseDueDate[job1,machine1,1],self.ReleaseDueDate[job2,machine1,1])-max(self.ReleaseDueDate[job1,machine1,0], self.ReleaseDueDate[job2,machine1,0])
|
|
457
|
+
if diff > 0:
|
|
458
|
+
vectorization["overlap"] += diff / (self.ReleaseDueDate[job1,machine1,1] - self.ReleaseDueDate[job1,machine1,0])
|
|
459
|
+
vectorization["overlap"] += diff / (self.ReleaseDueDate[job2,machine1,1] - self.ReleaseDueDate[job2,machine1,0])
|
|
460
|
+
vectorization["overlap"] = vectorization["overlap"] / (self.numJobs * (self.numJobs - 1) * self.numMchs)
|
|
461
|
+
# Estadísticos de los datos
|
|
462
|
+
vectorization["max_processing_time_value"] = np.max(self.ProcessingTime)
|
|
463
|
+
vectorization["min_processing_time_value"] = np.min(self.ProcessingTime)
|
|
464
|
+
vectorization["mean_processing_time_value"] = np.mean(self.ProcessingTime)
|
|
465
|
+
|
|
466
|
+
vectorization["max_energy_value"] = np.max(self.ProcessingTime)
|
|
467
|
+
vectorization["min_energy_value"] = np.min(self.ProcessingTime)
|
|
468
|
+
vectorization["mean_energy_value"] = np.mean(self.ProcessingTime)
|
|
469
|
+
self.features = vectorization
|
|
470
|
+
return vectorization
|
|
471
|
+
|
|
392
472
|
def disjuntive_graph(self):
|
|
393
473
|
vertex = list(range(self.numJobs * self.numMchs + 2))
|
|
394
474
|
A = {v: [] for v in vertex}
|
|
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
|