IGJSP 1.1.0__tar.gz → 1.1.1__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.0 → igjsp-1.1.1}/PKG-INFO +1 -1
- {igjsp-1.1.0 → igjsp-1.1.1}/pyproject.toml +1 -1
- {igjsp-1.1.0 → igjsp-1.1.1}/src/IGJSP/generador.py +36 -0
- {igjsp-1.1.0 → igjsp-1.1.1}/.gitattributes +0 -0
- {igjsp-1.1.0 → igjsp-1.1.1}/.gitignore +0 -0
- {igjsp-1.1.0 → igjsp-1.1.1}/.vscode/settings.json +0 -0
- {igjsp-1.1.0 → igjsp-1.1.1}/LICENSE +0 -0
- {igjsp-1.1.0 → igjsp-1.1.1}/README.md +0 -0
- {igjsp-1.1.0 → igjsp-1.1.1}/src/IGJSP/Minizinc/Models/RD/JSP0.mzn +0 -0
- {igjsp-1.1.0 → igjsp-1.1.1}/src/IGJSP/Minizinc/Models/RD/JSP1.mzn +0 -0
- {igjsp-1.1.0 → igjsp-1.1.1}/src/IGJSP/Minizinc/Models/RD/JSP2.mzn +0 -0
- {igjsp-1.1.0 → igjsp-1.1.1}/src/IGJSP/Minizinc/Types/RD/FJSP/type0.dzn +0 -0
- {igjsp-1.1.0 → igjsp-1.1.1}/src/IGJSP/Minizinc/Types/RD/FJSP/type1.dzn +0 -0
- {igjsp-1.1.0 → igjsp-1.1.1}/src/IGJSP/Minizinc/Types/RD/FJSP/type2.dzn +0 -0
- {igjsp-1.1.0 → igjsp-1.1.1}/src/IGJSP/Minizinc/Types/RD/JSP/type0.dzn +0 -0
- {igjsp-1.1.0 → igjsp-1.1.1}/src/IGJSP/Minizinc/Types/RD/JSP/type1.dzn +0 -0
- {igjsp-1.1.0 → igjsp-1.1.1}/src/IGJSP/Minizinc/Types/RD/JSP/type2.dzn +0 -0
- {igjsp-1.1.0 → igjsp-1.1.1}/src/IGJSP/Minizinc/Types/RD/JSP0.mzn +0 -0
- {igjsp-1.1.0 → igjsp-1.1.1}/src/IGJSP/Minizinc/Types/RD/JSP1.mzn +0 -0
- {igjsp-1.1.0 → igjsp-1.1.1}/src/IGJSP/Minizinc/Types/RD/JSP2.mzn +0 -0
- {igjsp-1.1.0 → igjsp-1.1.1}/src/IGJSP/main.py +0 -0
|
@@ -26,6 +26,42 @@ def t(c):
|
|
|
26
26
|
return 4.0704 * np.log(2) / np.log(1 + (c* 2.5093)**3)
|
|
27
27
|
|
|
28
28
|
|
|
29
|
+
# ------- Helpers internos para el DZN -------
|
|
30
|
+
|
|
31
|
+
def _parse_int_var(text, name, default=None):
|
|
32
|
+
"""
|
|
33
|
+
Busca una variable escalar tipo: name = 10;
|
|
34
|
+
"""
|
|
35
|
+
m = re.search(rf'\b{name}\b\s*=\s*([0-9]+)', text)
|
|
36
|
+
if m:
|
|
37
|
+
return int(m.group(1))
|
|
38
|
+
if default is not None:
|
|
39
|
+
return default
|
|
40
|
+
raise ValueError(f"No se encontró la variable entera '{name}' en el fichero DZN.")
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def _parse_array_var(text, name):
|
|
44
|
+
"""
|
|
45
|
+
Busca una variable array tipo:
|
|
46
|
+
name = [1, 2, 3];
|
|
47
|
+
o
|
|
48
|
+
name = [1 2 3];
|
|
49
|
+
Devuelve un np.array de ints o None si no está.
|
|
50
|
+
"""
|
|
51
|
+
m = re.search(rf'\b{name}\b\s*=.*?\[(.*?)\];', text, re.DOTALL)
|
|
52
|
+
if not m:
|
|
53
|
+
return None
|
|
54
|
+
|
|
55
|
+
inner = m.group(1).strip()
|
|
56
|
+
if not inner:
|
|
57
|
+
return np.array([], dtype=int)
|
|
58
|
+
|
|
59
|
+
# Separar por comas o espacios
|
|
60
|
+
tokens = re.split(r'[\s,]+', inner)
|
|
61
|
+
tokens = [t for t in tokens if t != '']
|
|
62
|
+
|
|
63
|
+
return np.array([int(t) for t in tokens], dtype=int)
|
|
64
|
+
|
|
29
65
|
#################################################################################
|
|
30
66
|
# #
|
|
31
67
|
# JSP #
|
|
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
|
|
File without changes
|
|
File without changes
|