|
@@ -306,7 +306,6 @@ def suma_abs(lista):
|
|
|
|
|
|
|
|
return total
|
|
return total
|
|
|
|
|
|
|
|
-num_permanentes = 0
|
|
|
|
|
|
|
|
|
|
#se obtiene el numero de cargas que son permanentes
|
|
#se obtiene el numero de cargas que son permanentes
|
|
|
for iter, per in enumerate(restricciones_df.loc[:,"Permanentes"]):
|
|
for iter, per in enumerate(restricciones_df.loc[:,"Permanentes"]):
|
|
@@ -330,16 +329,7 @@ def CrearCombo(nombre, numero, combo, coef):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-combos_ELUP = []
|
|
|
|
|
-combos_ELUA = []
|
|
|
|
|
-combos_ELUS = []
|
|
|
|
|
-combos_ELSC = []
|
|
|
|
|
-combos_ELSF = []
|
|
|
|
|
-combos_ELSCP = []
|
|
|
|
|
-minorados_ELUP = []
|
|
|
|
|
-minorados_ELSC = []
|
|
|
|
|
-minorados_ELSF = []
|
|
|
|
|
-minorados_ELSCP = []
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
|
for combo in combinaciones_validas:
|
|
for combo in combinaciones_validas:
|
|
@@ -351,17 +341,16 @@ for combo in combinaciones_validas:
|
|
|
coeficientes_ELSF = np.zeros(len(patrones))
|
|
coeficientes_ELSF = np.zeros(len(patrones))
|
|
|
coeficientes_ELSCP = np.zeros(len(patrones))
|
|
coeficientes_ELSCP = np.zeros(len(patrones))
|
|
|
n_var = 0
|
|
n_var = 0
|
|
|
- n_acc = 0
|
|
|
|
|
|
|
|
|
|
- for i in range(len(combo)):
|
|
|
|
|
|
|
+ for i in range(combo):
|
|
|
|
|
|
|
|
|
|
|
|
|
if norma_proyecto == "IAPF":
|
|
if norma_proyecto == "IAPF":
|
|
|
#primero se comprueba si la carga es permanente o no
|
|
#primero se comprueba si la carga es permanente o no
|
|
|
- if restricciones_df.loc[i,"Permanentes"]:
|
|
|
|
|
|
|
+ if restricciones_df.loc[i+1,"Permanentes"]:
|
|
|
#luego constante o no
|
|
#luego constante o no
|
|
|
- if restricciones_df.loc[i,"Tipo"] == "Constante":
|
|
|
|
|
- if restricciones_df.loc[i,"Direccion"] == "Desfavorable":
|
|
|
|
|
|
|
+ if restricciones_df.loc[i+1,"Tipo"] == "Constante":
|
|
|
|
|
+ if restricciones_df.loc[i+1,"Direccion"] == "Desfavorable":
|
|
|
#ELU
|
|
#ELU
|
|
|
coeficientes_ELUP[i] = normas["IAPF"]["ELU"]["Desfavorable"]["Persistente"]["Cte"]
|
|
coeficientes_ELUP[i] = normas["IAPF"]["ELU"]["Desfavorable"]["Persistente"]["Cte"]
|
|
|
coeficientes_ELUA[i] = normas["IAPF"]["ELU"]["Desfavorable"]["Accidental"]["Cte"]
|
|
coeficientes_ELUA[i] = normas["IAPF"]["ELU"]["Desfavorable"]["Accidental"]["Cte"]
|
|
@@ -370,7 +359,7 @@ for combo in combinaciones_validas:
|
|
|
coeficientes_ELSC[i] = normas["IAPF"]["ELS"]["Desfavorable"]["Persistente"]["Cte"]
|
|
coeficientes_ELSC[i] = normas["IAPF"]["ELS"]["Desfavorable"]["Persistente"]["Cte"]
|
|
|
coeficientes_ELSF[i] = normas["IAPF"]["ELS"]["Desfavorable"]["Persistente"]["Cte"]
|
|
coeficientes_ELSF[i] = normas["IAPF"]["ELS"]["Desfavorable"]["Persistente"]["Cte"]
|
|
|
coeficientes_ELSCP[i] = normas["IAPF"]["ELS"]["Desfavorable"]["Persistente"]["Cte"]
|
|
coeficientes_ELSCP[i] = normas["IAPF"]["ELS"]["Desfavorable"]["Persistente"]["Cte"]
|
|
|
- elif restricciones_df.loc[i,"Direccion"] == "Favorable":
|
|
|
|
|
|
|
+ elif restricciones_df.loc[i+1,"Direccion"] == "Favorable":
|
|
|
#ELU
|
|
#ELU
|
|
|
coeficientes_ELUP[i] = normas["IAPF"]["ELU"]["Favorable"]["Persistente"]["Cte"]
|
|
coeficientes_ELUP[i] = normas["IAPF"]["ELU"]["Favorable"]["Persistente"]["Cte"]
|
|
|
coeficientes_ELUA[i] = normas["IAPF"]["ELU"]["Favorable"]["Accidental"]["Cte"]
|
|
coeficientes_ELUA[i] = normas["IAPF"]["ELU"]["Favorable"]["Accidental"]["Cte"]
|
|
@@ -379,8 +368,8 @@ for combo in combinaciones_validas:
|
|
|
coeficientes_ELSC[i] = normas["IAPF"]["ELS"]["Favorable"]["Persistente"]["Cte"]
|
|
coeficientes_ELSC[i] = normas["IAPF"]["ELS"]["Favorable"]["Persistente"]["Cte"]
|
|
|
coeficientes_ELSF[i] = normas["IAPF"]["ELS"]["Favorable"]["Persistente"]["Cte"]
|
|
coeficientes_ELSF[i] = normas["IAPF"]["ELS"]["Favorable"]["Persistente"]["Cte"]
|
|
|
coeficientes_ELSCP[i] = normas["IAPF"]["ELS"]["Favorable"]["Persistente"]["Cte"]
|
|
coeficientes_ELSCP[i] = normas["IAPF"]["ELS"]["Favorable"]["Persistente"]["Cte"]
|
|
|
- elif restricciones_df.loc[i,"Tipo"] == "No Constante":
|
|
|
|
|
- if restricciones_df.loc[i,"Direccion"] == "Desfavorable":
|
|
|
|
|
|
|
+ elif restricciones_df.loc[i+1,"Tipo"] == "No Constante":
|
|
|
|
|
+ if restricciones_df.loc[i+1,"Direccion"] == "Desfavorable":
|
|
|
#ELU
|
|
#ELU
|
|
|
coeficientes_ELUP[i] = normas["IAPF"]["ELU"]["Desfavorable"]["Persistente"]["NoCte"]
|
|
coeficientes_ELUP[i] = normas["IAPF"]["ELU"]["Desfavorable"]["Persistente"]["NoCte"]
|
|
|
coeficientes_ELUA[i] = normas["IAPF"]["ELU"]["Desfavorable"]["Accidental"]["NoCte"]
|
|
coeficientes_ELUA[i] = normas["IAPF"]["ELU"]["Desfavorable"]["Accidental"]["NoCte"]
|
|
@@ -389,7 +378,7 @@ for combo in combinaciones_validas:
|
|
|
coeficientes_ELSC[i] = normas["IAPF"]["ELS"]["Desfavorable"]["Persistente"]["NoCte"]
|
|
coeficientes_ELSC[i] = normas["IAPF"]["ELS"]["Desfavorable"]["Persistente"]["NoCte"]
|
|
|
coeficientes_ELSF[i] = normas["IAPF"]["ELS"]["Desfavorable"]["Persistente"]["NoCte"]
|
|
coeficientes_ELSF[i] = normas["IAPF"]["ELS"]["Desfavorable"]["Persistente"]["NoCte"]
|
|
|
coeficientes_ELSCP[i] = normas["IAPF"]["ELS"]["Desfavorable"]["Persistente"]["NoCte"]
|
|
coeficientes_ELSCP[i] = normas["IAPF"]["ELS"]["Desfavorable"]["Persistente"]["NoCte"]
|
|
|
- elif restricciones_df.loc[i,"Direccion"] == "Favorable":
|
|
|
|
|
|
|
+ elif restricciones_df.loc[i+1,"Direccion"] == "Favorable":
|
|
|
coeficientes_ELUP[i] = normas["IAPF"]["ELU"]["Favorable"]["Persistente"]["NoCte"]
|
|
coeficientes_ELUP[i] = normas["IAPF"]["ELU"]["Favorable"]["Persistente"]["NoCte"]
|
|
|
coeficientes_ELUA[i] = normas["IAPF"]["ELU"]["Favorable"]["Accidental"]["NoCte"]
|
|
coeficientes_ELUA[i] = normas["IAPF"]["ELU"]["Favorable"]["Accidental"]["NoCte"]
|
|
|
coeficientes_ELUS[i] = normas["IAPF"]["ELU"]["Favorable"]["Accidental"]["NoCte"]
|
|
coeficientes_ELUS[i] = normas["IAPF"]["ELU"]["Favorable"]["Accidental"]["NoCte"]
|
|
@@ -397,9 +386,8 @@ for combo in combinaciones_validas:
|
|
|
coeficientes_ELSC[i] = normas["IAPF"]["ELS"]["Favorable"]["Persistente"]["NoCte"]
|
|
coeficientes_ELSC[i] = normas["IAPF"]["ELS"]["Favorable"]["Persistente"]["NoCte"]
|
|
|
coeficientes_ELSF[i] = normas["IAPF"]["ELS"]["Favorable"]["Persistente"]["NoCte"]
|
|
coeficientes_ELSF[i] = normas["IAPF"]["ELS"]["Favorable"]["Persistente"]["NoCte"]
|
|
|
coeficientes_ELSCP[i] = normas["IAPF"]["ELS"]["Favorable"]["Persistente"]["NoCte"]
|
|
coeficientes_ELSCP[i] = normas["IAPF"]["ELS"]["Favorable"]["Persistente"]["NoCte"]
|
|
|
- elif restricciones_df.loc[i,"Tipo"] == "Accidental":
|
|
|
|
|
- if combo[i] == 1: n_acc += 1
|
|
|
|
|
- if restricciones_df.loc[i,"Direccion"] == "Desfavorable":
|
|
|
|
|
|
|
+ elif restricciones_df.loc[i+1,"Tipo"] == "Accidental":
|
|
|
|
|
+ if restricciones_df.loc[i+1,"Direccion"] == "Desfavorable":
|
|
|
#ELU
|
|
#ELU
|
|
|
coeficientes_ELUP[i] = 0
|
|
coeficientes_ELUP[i] = 0
|
|
|
coeficientes_ELUA[i] = normas["IAPF"]["ELU"]["Desfavorable"]["Accidental"]["Accidental"]
|
|
coeficientes_ELUA[i] = normas["IAPF"]["ELU"]["Desfavorable"]["Accidental"]["Accidental"]
|
|
@@ -408,7 +396,7 @@ for combo in combinaciones_validas:
|
|
|
coeficientes_ELSC[i] = 0
|
|
coeficientes_ELSC[i] = 0
|
|
|
coeficientes_ELSF[i] = 0
|
|
coeficientes_ELSF[i] = 0
|
|
|
coeficientes_ELSCP[i] = 0
|
|
coeficientes_ELSCP[i] = 0
|
|
|
- elif restricciones_df.loc[i,"Direccion"] == "Favorable":
|
|
|
|
|
|
|
+ elif restricciones_df.loc[i+1,"Direccion"] == "Favorable":
|
|
|
#ELU
|
|
#ELU
|
|
|
coeficientes_ELUP[i] = 0
|
|
coeficientes_ELUP[i] = 0
|
|
|
coeficientes_ELUA[i] = normas["IAPF"]["ELU"]["Favorable"]["Accidental"]["Accidental"]
|
|
coeficientes_ELUA[i] = normas["IAPF"]["ELU"]["Favorable"]["Accidental"]["Accidental"]
|
|
@@ -417,9 +405,9 @@ for combo in combinaciones_validas:
|
|
|
coeficientes_ELSC[i] = 0
|
|
coeficientes_ELSC[i] = 0
|
|
|
coeficientes_ELSF[i] = 0
|
|
coeficientes_ELSF[i] = 0
|
|
|
coeficientes_ELSCP[i] = 0
|
|
coeficientes_ELSCP[i] = 0
|
|
|
- elif restricciones_df.loc[i,"Tipo"] == "Variable":
|
|
|
|
|
- if combo[i] == 1: n_var += 1
|
|
|
|
|
- if restricciones_df.loc[i,"Direccion"] == "Desfavorable":
|
|
|
|
|
|
|
+ elif restricciones_df.loc[i+1,"Tipo"] == "Variable":
|
|
|
|
|
+ n_var += 1
|
|
|
|
|
+ if restricciones_df.loc[i+1,"Direccion"] == "Desfavorable":
|
|
|
#ELU
|
|
#ELU
|
|
|
coeficientes_ELUP[i] = normas["IAPF"]["ELU"]["Desfavorable"]["Persistente"]["Variable"]
|
|
coeficientes_ELUP[i] = normas["IAPF"]["ELU"]["Desfavorable"]["Persistente"]["Variable"]
|
|
|
coeficientes_ELUA[i] = normas["IAPF"]["ELU"]["Desfavorable"]["Accidental"]["Variable"]
|
|
coeficientes_ELUA[i] = normas["IAPF"]["ELU"]["Desfavorable"]["Accidental"]["Variable"]
|
|
@@ -428,7 +416,7 @@ for combo in combinaciones_validas:
|
|
|
coeficientes_ELSC[i] = normas["IAPF"]["ELS"]["Desfavorable"]["Persistente"]["Variable"]
|
|
coeficientes_ELSC[i] = normas["IAPF"]["ELS"]["Desfavorable"]["Persistente"]["Variable"]
|
|
|
coeficientes_ELSF[i] = normas["IAPF"]["ELS"]["Desfavorable"]["Persistente"]["Variable"]
|
|
coeficientes_ELSF[i] = normas["IAPF"]["ELS"]["Desfavorable"]["Persistente"]["Variable"]
|
|
|
coeficientes_ELSCP[i] = normas["IAPF"]["ELS"]["Desfavorable"]["Persistente"]["Variable"]
|
|
coeficientes_ELSCP[i] = normas["IAPF"]["ELS"]["Desfavorable"]["Persistente"]["Variable"]
|
|
|
- elif restricciones_df.loc[i,"Direccion"] == "Favorable":
|
|
|
|
|
|
|
+ elif restricciones_df.loc[i+1,"Direccion"] == "Favorable":
|
|
|
#ELU
|
|
#ELU
|
|
|
coeficientes_ELUP[i] = normas["IAPF"]["ELU"]["Favorable"]["Persistente"]["Variable"]
|
|
coeficientes_ELUP[i] = normas["IAPF"]["ELU"]["Favorable"]["Persistente"]["Variable"]
|
|
|
coeficientes_ELUA[i] = normas["IAPF"]["ELU"]["Favorable"]["Accidental"]["Variable"]
|
|
coeficientes_ELUA[i] = normas["IAPF"]["ELU"]["Favorable"]["Accidental"]["Variable"]
|
|
@@ -439,186 +427,69 @@ for combo in combinaciones_validas:
|
|
|
coeficientes_ELSCP[i] = normas["IAPF"]["ELS"]["Favorable"]["Persistente"]["Variable"]
|
|
coeficientes_ELSCP[i] = normas["IAPF"]["ELS"]["Favorable"]["Persistente"]["Variable"]
|
|
|
elif norma_proyecto == "IAP":
|
|
elif norma_proyecto == "IAP":
|
|
|
pass
|
|
pass
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- minorados_ELUP.clear()
|
|
|
|
|
- minorados_ELSC.clear()
|
|
|
|
|
- minorados_ELSF.clear()
|
|
|
|
|
- minorados_ELSCP.clear()
|
|
|
|
|
-
|
|
|
|
|
- if n_var == 1:
|
|
|
|
|
- coef_var_ELSF = np.ones(len(patrones))
|
|
|
|
|
- coef_var_ELSCP = np.ones(len(patrones))
|
|
|
|
|
- for i in range(len(combo)):
|
|
|
|
|
- if restricciones_df.loc[i,"Tipo"] == "Variable":
|
|
|
|
|
- if restricciones_df.loc[i,"Accion IAPF"] == "Trafico":
|
|
|
|
|
- coef_var_ELSF[i] = normas["IAPF"]["CoefVar"]["Trafico"]["psi1"][vias_cargadas if int(vias_cargadas) < 4 else "3"]
|
|
|
|
|
- coef_var_ELSCP[i] = normas["IAPF"]["CoefVar"]["Trafico"]["psi2"]
|
|
|
|
|
- else:
|
|
|
|
|
- coef_var_ELSF[i] = normas["IAPF"]["CoefVar"]["Resto"]["psi1"]
|
|
|
|
|
- coef_var_ELSCP[i] = normas["IAPF"]["CoefVar"]["Resto"]["psi2"]
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- while n_var > 1:
|
|
|
|
|
- minorados_ELUP.clear()
|
|
|
|
|
- minorados_ELSC.clear()
|
|
|
|
|
- minorados_ELSF.clear()
|
|
|
|
|
- minorados_ELSCP.clear()
|
|
|
|
|
- n_var -= 1
|
|
|
|
|
- #se busca la primera variable en el combo y se asigna el coeficiente
|
|
|
|
|
- for i in range(len(combo)):
|
|
|
|
|
- coef_var_ELUP = np.ones(len(patrones))
|
|
|
|
|
- coef_var_ELSC = np.ones(len(patrones))
|
|
|
|
|
- coef_var_ELSF = np.ones(len(patrones))
|
|
|
|
|
- coef_var_ELSCP = np.ones(len(patrones))
|
|
|
|
|
- if restricciones_df.loc[i,"Tipo"] == "Variable":
|
|
|
|
|
- if restricciones_df.loc[i,"Accion IAPF"] == "Trafico":
|
|
|
|
|
- coef_var_ELSF[i] = normas["IAPF"]["CoefVar"]["Trafico"]["psi1"][vias_cargadas if int(vias_cargadas) < 4 else "3"]
|
|
|
|
|
- coef_var_ELSCP[i] = normas["IAPF"]["CoefVar"]["Trafico"]["psi2"]
|
|
|
|
|
- else:
|
|
|
|
|
- coef_var_ELSF[i] = normas["IAPF"]["CoefVar"]["Resto"]["psi1"]
|
|
|
|
|
- coef_var_ELSCP[i] = normas["IAPF"]["CoefVar"]["Resto"]["psi2"]
|
|
|
|
|
- for j in range(len(combo)):
|
|
|
|
|
- if (restricciones_df.loc[j,"Tipo"] == "Variable") and (j != i):
|
|
|
|
|
- #se asigna el coeficiente de la variable al resto de variables
|
|
|
|
|
- if restricciones_df.loc[j,"Accion IAPF"] == "Trafico":
|
|
|
|
|
- coef_var_ELUP[j] = normas["IAPF"]["CoefVar"]["Trafico"]["psi0"]
|
|
|
|
|
- coef_var_ELSC[j] = normas["IAPF"]["CoefVar"]["Trafico"]["psi0"]
|
|
|
|
|
- coef_var_ELSF[j] = normas["IAPF"]["CoefVar"]["Trafico"]["psi2"]
|
|
|
|
|
- coef_var_ELSCP[j] = normas["IAPF"]["CoefVar"]["Trafico"]["psi2"]
|
|
|
|
|
- else:
|
|
|
|
|
- coef_var_ELUP[j] = normas["IAPF"]["CoefVar"]["Resto"]["psi0"]
|
|
|
|
|
- coef_var_ELSC[j] = normas["IAPF"]["CoefVar"]["Resto"]["psi0"]
|
|
|
|
|
- coef_var_ELSF[j] = normas["IAPF"]["CoefVar"]["Resto"]["psi2"]
|
|
|
|
|
- coef_var_ELSCP[j] = normas["IAPF"]["CoefVar"]["Resto"]["psi2"]
|
|
|
|
|
- minorados_ELUP.append(coef_var_ELUP)
|
|
|
|
|
- minorados_ELSC.append(coef_var_ELSC)
|
|
|
|
|
- minorados_ELSF.append(coef_var_ELSF)
|
|
|
|
|
- minorados_ELSCP.append(coef_var_ELSCP)
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
|
- if minorados_ELUP:
|
|
|
|
|
- for minorado in minorados_ELUP:
|
|
|
|
|
- combos_ELUP.append(np.multiply(np.multiply(coeficientes_ELUP, combo),minorado))
|
|
|
|
|
- for minorado in minorados_ELSC:
|
|
|
|
|
- combos_ELSC.append(np.multiply(np.multiply(coeficientes_ELSC, combo),minorado))
|
|
|
|
|
- for minorado in minorados_ELSF:
|
|
|
|
|
- combos_ELSF.append(np.multiply(np.multiply(coeficientes_ELSF, combo),minorado))
|
|
|
|
|
- for minorado in minorados_ELSCP:
|
|
|
|
|
- combos_ELSCP.append(np.multiply(np.multiply(coeficientes_ELSCP, combo),minorado))
|
|
|
|
|
- else:
|
|
|
|
|
- combos_ELUP.append(np.multiply(coeficientes_ELUP, combo))
|
|
|
|
|
- combos_ELSC.append(np.multiply(coeficientes_ELSC, combo))
|
|
|
|
|
- combos_ELSF.append(np.multiply(coeficientes_ELSF, combo))if not n_var else combos_ELSF.append(np.multiply(np.multiply(coeficientes_ELSF, combo),coef_var_ELSF))
|
|
|
|
|
- combos_ELSCP.append(np.multiply(coeficientes_ELSCP, combo)) if not n_var else combos_ELSCP.append(np.multiply(np.multiply(coeficientes_ELSCP, combo),coef_var_ELSCP))
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-combos_ELUP = np.unique(np.array(combos_ELUP), axis=0)
|
|
|
|
|
-combos_ELSC = np.unique(np.array(combos_ELSC), axis=0)
|
|
|
|
|
-combos_ELSF = np.unique(np.array(combos_ELSF), axis=0)
|
|
|
|
|
-combos_ELSCP = np.unique(np.array(combos_ELSCP), axis=0)
|
|
|
|
|
-
|
|
|
|
|
-print("------------------------------------------------")
|
|
|
|
|
-print(combos_ELUP)
|
|
|
|
|
-print("------------------------------------------------")
|
|
|
|
|
-print(combos_ELSC)
|
|
|
|
|
-print("------------------------------------------------")
|
|
|
|
|
-print(combos_ELSF)
|
|
|
|
|
-print("------------------------------------------------")
|
|
|
|
|
-print(combos_ELSCP)
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-#creacion de los combos en SAP2000
|
|
|
|
|
-
|
|
|
|
|
-#creacion de los combos ELU Permantentes
|
|
|
|
|
-
|
|
|
|
|
-combo_num = 0
|
|
|
|
|
-
|
|
|
|
|
-for combo in combos_ELUP:
|
|
|
|
|
- combo_name = "ELU_P_{:03d}".format(combo_num)
|
|
|
|
|
- ret = SapModel.RespCombo.Add(combo_name, 0)
|
|
|
|
|
- for idx, patron in enumerate(patrones):
|
|
|
|
|
- coeficiente = combo[idx]
|
|
|
|
|
- if coeficiente != 0:
|
|
|
|
|
- ret = SapModel.RespCombo.SetCaseList(combo_name, 0, patron, coeficiente)
|
|
|
|
|
- combo_num += 1
|
|
|
|
|
|
|
+ if n_var :
|
|
|
|
|
+ while n_var:
|
|
|
|
|
+ n_var -= 1
|
|
|
|
|
+ #se busca la primera variable en el combo y se asigna el coeficiente
|
|
|
|
|
+ for i in range(len(combo)):
|
|
|
|
|
+ if restricciones_df.loc[i+1,"Tipo"] == "Variable":
|
|
|
|
|
+ for j in range(len(combo)):
|
|
|
|
|
+ if (restricciones_df.loc[j+1,"Tipo"] == "Variable") and (j != i):
|
|
|
|
|
+ #se asigna el coeficiente de la variable al resto de variables
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+#ahora hay que buscar en el combo cual es la primera variable y asignar al resto el coeficiente y luego pasar a la siguiente variable y hacer lo mismo con todas y con la antigua
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
|
|
|
-#creacion de los combos ELS Caracteristico
|
|
|
|
|
|
|
|
|
|
-combo_num = 0
|
|
|
|
|
|
|
|
|
|
-for combo in combos_ELSC:
|
|
|
|
|
- combo_name = "ELS_C_{:03d}".format(combo_num)
|
|
|
|
|
- ret = SapModel.RespCombo.Add(combo_name, 0)
|
|
|
|
|
- for idx, patron in enumerate(patrones):
|
|
|
|
|
- coeficiente = combo[idx]
|
|
|
|
|
- if coeficiente != 0:
|
|
|
|
|
- ret = SapModel.RespCombo.SetCaseList(combo_name, 0, patron, coeficiente)
|
|
|
|
|
- combo_num += 1
|
|
|
|
|
|
|
|
|
|
-#creacion de los combos ELS Frecuente
|
|
|
|
|
|
|
|
|
|
-combo_num = 0
|
|
|
|
|
|
|
|
|
|
-for combo in combos_ELSF:
|
|
|
|
|
- combo_name = "ELS_F_{:03d}".format(combo_num)
|
|
|
|
|
- ret = SapModel.RespCombo.Add(combo_name, 0)
|
|
|
|
|
- for idx, patron in enumerate(patrones):
|
|
|
|
|
- coeficiente = combo[idx]
|
|
|
|
|
- if coeficiente != 0:
|
|
|
|
|
- ret = SapModel.RespCombo.SetCaseList(combo_name, 0, patron, coeficiente)
|
|
|
|
|
- combo_num += 1
|
|
|
|
|
|
|
|
|
|
-#creacion de los combos ELS Cuasi Permanente
|
|
|
|
|
|
|
+ pass
|
|
|
|
|
|
|
|
-combo_num = 0
|
|
|
|
|
|
|
|
|
|
-for combo in combos_ELSCP:
|
|
|
|
|
- combo_name = "ELS_CP_{:03d}".format(combo_num)
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+'''
|
|
|
|
|
+
|
|
|
|
|
+combo_num = 1
|
|
|
|
|
+
|
|
|
|
|
+coeficiente_EL = restricciones_df.loc[:, "Coeficiente"]
|
|
|
|
|
+
|
|
|
|
|
+for combo in combinaciones_validas:
|
|
|
|
|
+ combo_name = "Combo {:03d}".format(combo_num)
|
|
|
ret = SapModel.RespCombo.Add(combo_name, 0)
|
|
ret = SapModel.RespCombo.Add(combo_name, 0)
|
|
|
for idx, patron in enumerate(patrones):
|
|
for idx, patron in enumerate(patrones):
|
|
|
coeficiente = combo[idx]
|
|
coeficiente = combo[idx]
|
|
|
if coeficiente != 0:
|
|
if coeficiente != 0:
|
|
|
- ret = SapModel.RespCombo.SetCaseList(combo_name, 0, patron, coeficiente)
|
|
|
|
|
|
|
+ ret = SapModel.RespCombo.SetCaseList(combo_name, 0, patron, coeficiente*coeficiente_EL[idx])
|
|
|
combo_num += 1
|
|
combo_num += 1
|
|
|
|
|
|
|
|
-#creacion del combo envolvente
|
|
|
|
|
|
|
|
|
|
|
|
+#creacion del combo envolvente
|
|
|
|
|
|
|
|
-combo_name = "1. ENV ELU P"
|
|
|
|
|
-ret = SapModel.RespCombo.Add(combo_name, 1)
|
|
|
|
|
-comboNames = SapModel.RespCombo.GetNameList()
|
|
|
|
|
-patron = []
|
|
|
|
|
-for i in range(comboNames[0]):
|
|
|
|
|
- if "ELU_P" in comboNames[1][i]: patron.append(comboNames[1][i])
|
|
|
|
|
-for name in patron:
|
|
|
|
|
- ret = SapModel.RespCombo.SetCaseList(combo_name, 1, name, 1)
|
|
|
|
|
|
|
|
|
|
-combo_name = "2. ENV ELS C"
|
|
|
|
|
|
|
+combo_name = "Combo ENV"
|
|
|
ret = SapModel.RespCombo.Add(combo_name, 1)
|
|
ret = SapModel.RespCombo.Add(combo_name, 1)
|
|
|
comboNames = SapModel.RespCombo.GetNameList()
|
|
comboNames = SapModel.RespCombo.GetNameList()
|
|
|
patron = []
|
|
patron = []
|
|
|
for i in range(comboNames[0]):
|
|
for i in range(comboNames[0]):
|
|
|
- if "ELS_C_" in comboNames[1][i]: patron.append(comboNames[1][i])
|
|
|
|
|
-for name in patron:
|
|
|
|
|
- ret = SapModel.RespCombo.SetCaseList(combo_name, 1, name, 1)
|
|
|
|
|
|
|
+ patron.append(1)
|
|
|
|
|
+for idx, name in enumerate(comboNames[1]):
|
|
|
|
|
+ ret = SapModel.RespCombo.SetCaseList(combo_name, 1, comboNames[1][idx], 1)
|
|
|
|
|
|
|
|
|
|
|
|
|
-combo_name = "3. ENV ELS F"
|
|
|
|
|
-ret = SapModel.RespCombo.Add(combo_name, 1)
|
|
|
|
|
-comboNames = SapModel.RespCombo.GetNameList()
|
|
|
|
|
-patron = []
|
|
|
|
|
-for i in range(comboNames[0]):
|
|
|
|
|
- if "ELS_F_" in comboNames[1][i]: patron.append(comboNames[1][i])
|
|
|
|
|
-for name in patron:
|
|
|
|
|
- ret = SapModel.RespCombo.SetCaseList(combo_name, 1, name, 1)
|
|
|
|
|
-
|
|
|
|
|
-combo_name = "4. ENV ELS CP"
|
|
|
|
|
-ret = SapModel.RespCombo.Add(combo_name, 1)
|
|
|
|
|
-comboNames = SapModel.RespCombo.GetNameList()
|
|
|
|
|
-patron = []
|
|
|
|
|
-for i in range(comboNames[0]):
|
|
|
|
|
- if "ELS_CP" in comboNames[1][i]: patron.append(comboNames[1][i])
|
|
|
|
|
-for name in patron:
|
|
|
|
|
- ret = SapModel.RespCombo.SetCaseList(combo_name, 1, name, 1)
|
|
|
|
|
|
|
+'''
|
|
|
|
|
|