|
@@ -306,12 +306,21 @@ def validar_combinacion(comb, patrones, compatibilidad_df, restricciones_df):
|
|
|
return False
|
|
return False
|
|
|
#se comprueba que la carga que esta activa esta con otra carga especificada como condicional
|
|
#se comprueba que la carga que esta activa esta con otra carga especificada como condicional
|
|
|
#para que la primera exista
|
|
#para que la primera exista
|
|
|
- restriccion = restricciones_df.loc[:,"Si y solo si"]
|
|
|
|
|
|
|
+ restriccion = restricciones_df.loc[:,"Si y solo si"]
|
|
|
for iter, res in enumerate(restriccion):
|
|
for iter, res in enumerate(restriccion):
|
|
|
if res:
|
|
if res:
|
|
|
idx = patrones.index(res)
|
|
idx = patrones.index(res)
|
|
|
if comb[iter] and not comb[idx]:
|
|
if comb[iter] and not comb[idx]:
|
|
|
- return False
|
|
|
|
|
|
|
+ return False
|
|
|
|
|
+ #si se quieren hacer casos especiales para iteraciones concretas, se pueden añadir aquí, por ejemplo:
|
|
|
|
|
+ #idx = patrones.index(res)
|
|
|
|
|
+ #if iter == 17:
|
|
|
|
|
+ # if comb[iter] and not (comb[2] or comb[3] or comb[4] or comb[5] or comb[6] or comb[7] or comb[8] or comb[9] or comb[10] or comb[11]):
|
|
|
|
|
+ # return False
|
|
|
|
|
+ #else:
|
|
|
|
|
+ # # Comportamiento general para otros iter
|
|
|
|
|
+ # if comb[iter] and not comb[idx]:
|
|
|
|
|
+ # return False
|
|
|
#comprueba que las cargas especificadas como permanentes se encuentran en este caso de carga
|
|
#comprueba que las cargas especificadas como permanentes se encuentran en este caso de carga
|
|
|
permanentes = restricciones_df.loc[:,"Permanentes"]
|
|
permanentes = restricciones_df.loc[:,"Permanentes"]
|
|
|
for iter, per in enumerate(permanentes):
|
|
for iter, per in enumerate(permanentes):
|
|
@@ -422,45 +431,43 @@ def generar_combinaciones_norma_IAPF(combinaciones_validas, restricciones_df, no
|
|
|
|
|
|
|
|
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"]:
|
|
|
|
|
- #luego constante o no
|
|
|
|
|
- if restricciones_df.loc[i,"Tipo"] == "Constante":
|
|
|
|
|
- if restricciones_df.loc[i,"Direccion"] == "Desfavorable":
|
|
|
|
|
- #ELU
|
|
|
|
|
- coeficientes_ELUP[i] = normas["IAPF"]["ELU"]["Desfavorable"]["Persistente"]["Cte"]
|
|
|
|
|
- coeficientes_ELUA[i] = normas["IAPF"]["ELU"]["Desfavorable"]["Accidental"]["Cte"]
|
|
|
|
|
- coeficientes_ELUS[i] = normas["IAPF"]["ELU"]["Desfavorable"]["Accidental"]["Cte"]
|
|
|
|
|
- #ELS
|
|
|
|
|
- coeficientes_ELSC[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"]
|
|
|
|
|
- elif restricciones_df.loc[i,"Direccion"] == "Favorable":
|
|
|
|
|
- #ELU
|
|
|
|
|
- coeficientes_ELUP[i] = normas["IAPF"]["ELU"]["Favorable"]["Persistente"]["Cte"]
|
|
|
|
|
- coeficientes_ELUA[i] = normas["IAPF"]["ELU"]["Favorable"]["Accidental"]["Cte"]
|
|
|
|
|
- coeficientes_ELUS[i] = normas["IAPF"]["ELU"]["Favorable"]["Accidental"]["Cte"]
|
|
|
|
|
- #ELS
|
|
|
|
|
- coeficientes_ELSC[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"]
|
|
|
|
|
- elif restricciones_df.loc[i,"Tipo"] == "No constante":
|
|
|
|
|
- if restricciones_df.loc[i,"Direccion"] == "Desfavorable":
|
|
|
|
|
- #ELU
|
|
|
|
|
- coeficientes_ELUP[i] = normas["IAPF"]["ELU"]["Desfavorable"]["Persistente"]["NoCte"]
|
|
|
|
|
- coeficientes_ELUA[i] = normas["IAPF"]["ELU"]["Desfavorable"]["Accidental"]["NoCte"]
|
|
|
|
|
- coeficientes_ELUS[i] = normas["IAPF"]["ELU"]["Desfavorable"]["Accidental"]["NoCte"]
|
|
|
|
|
- #ELS
|
|
|
|
|
- coeficientes_ELSC[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"]
|
|
|
|
|
- elif restricciones_df.loc[i,"Direccion"] == "Favorable":
|
|
|
|
|
- coeficientes_ELUP[i] = normas["IAPF"]["ELU"]["Favorable"]["Persistente"]["NoCte"]
|
|
|
|
|
- coeficientes_ELUA[i] = normas["IAPF"]["ELU"]["Favorable"]["Accidental"]["NoCte"]
|
|
|
|
|
- coeficientes_ELUS[i] = normas["IAPF"]["ELU"]["Favorable"]["Accidental"]["NoCte"]
|
|
|
|
|
- #ELS
|
|
|
|
|
- coeficientes_ELSC[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"]
|
|
|
|
|
|
|
+ if restricciones_df.loc[i,"Tipo"] == "Constante":
|
|
|
|
|
+ if restricciones_df.loc[i,"Direccion"] == "Desfavorable":
|
|
|
|
|
+ #ELU
|
|
|
|
|
+ coeficientes_ELUP[i] = normas["IAPF"]["ELU"]["Desfavorable"]["Persistente"]["Cte"]
|
|
|
|
|
+ coeficientes_ELUA[i] = normas["IAPF"]["ELU"]["Desfavorable"]["Accidental"]["Cte"]
|
|
|
|
|
+ coeficientes_ELUS[i] = normas["IAPF"]["ELU"]["Desfavorable"]["Accidental"]["Cte"]
|
|
|
|
|
+ #ELS
|
|
|
|
|
+ coeficientes_ELSC[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"]
|
|
|
|
|
+ elif restricciones_df.loc[i,"Direccion"] == "Favorable":
|
|
|
|
|
+ #ELU
|
|
|
|
|
+ coeficientes_ELUP[i] = normas["IAPF"]["ELU"]["Favorable"]["Persistente"]["Cte"]
|
|
|
|
|
+ coeficientes_ELUA[i] = normas["IAPF"]["ELU"]["Favorable"]["Accidental"]["Cte"]
|
|
|
|
|
+ coeficientes_ELUS[i] = normas["IAPF"]["ELU"]["Favorable"]["Accidental"]["Cte"]
|
|
|
|
|
+ #ELS
|
|
|
|
|
+ coeficientes_ELSC[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"]
|
|
|
|
|
+ elif restricciones_df.loc[i,"Tipo"] == "No constante":
|
|
|
|
|
+ if restricciones_df.loc[i,"Direccion"] == "Desfavorable":
|
|
|
|
|
+ #ELU
|
|
|
|
|
+ coeficientes_ELUP[i] = normas["IAPF"]["ELU"]["Desfavorable"]["Persistente"]["NoCte"]
|
|
|
|
|
+ coeficientes_ELUA[i] = normas["IAPF"]["ELU"]["Desfavorable"]["Accidental"]["NoCte"]
|
|
|
|
|
+ coeficientes_ELUS[i] = normas["IAPF"]["ELU"]["Desfavorable"]["Accidental"]["NoCte"]
|
|
|
|
|
+ #ELS
|
|
|
|
|
+ coeficientes_ELSC[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"]
|
|
|
|
|
+ elif restricciones_df.loc[i,"Direccion"] == "Favorable":
|
|
|
|
|
+ coeficientes_ELUP[i] = normas["IAPF"]["ELU"]["Favorable"]["Persistente"]["NoCte"]
|
|
|
|
|
+ coeficientes_ELUA[i] = normas["IAPF"]["ELU"]["Favorable"]["Accidental"]["NoCte"]
|
|
|
|
|
+ coeficientes_ELUS[i] = normas["IAPF"]["ELU"]["Favorable"]["Accidental"]["NoCte"]
|
|
|
|
|
+ #ELS
|
|
|
|
|
+ coeficientes_ELSC[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"]
|
|
|
elif restricciones_df.loc[i,"Tipo"] == "Accidental":
|
|
elif restricciones_df.loc[i,"Tipo"] == "Accidental":
|
|
|
if combo[i] != 0: n_acc += 1
|
|
if combo[i] != 0: n_acc += 1
|
|
|
if restricciones_df.loc[i,"Direccion"] == "Desfavorable":
|
|
if restricciones_df.loc[i,"Direccion"] == "Desfavorable":
|