Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def solution_evaluation(cd1, cc1, ct1, cd2, cc2, ct2, cd3, cc3, ct3, cd4, cc4, ct4):
- cd1 = np.round(cd1)
- cc1 = np.round(cc1)
- ct1 = np.round(ct1)
- cd2 = np.round(cd2)
- cc2 = np.round(cc2)
- ct2 = np.round(ct2)
- cd3 = np.round(cd3)
- cc3 = np.round(cc3)
- ct3 = np.round(ct3)
- cd4 = np.round(cd4)
- cc4 = np.round(cc4)
- ct4 = np.round(ct4)
- print("..RESUMO DA CARGA DE AVIÃO..")
- print("DIANTEIRA -- CENTRAL -- TRASEIRA")
- print("PesoCarga1(t): ", cd1, " - ", cc1, " - ", ct1)
- print("PesoCarga2(t): ", cd2, " - ", cc2, " - ", ct2)
- print("PesoCarga3(t): ", cd3, " - ", cc3, " - ", ct3)
- print("PesoCarga4(t): ", cd4, " - ", cc4, " - ", ct4)
- lucro = ((cd1+cc1+ct1)*0.31 + (cd2+cc2+ct2)*0.38 + (cd3+cc3+ct3)*0.35 + (cd4+cc4+ct4)*0.285)
- print(f"Lucro(R$): {lucro}")
- # TOTAL DE PESO EM CADA COMPARTIMENTO DO AVIAO
- somaDianteira = (cd1 + cd2 + cd3 + cd4)
- somaCentral = (cc1 + cc2 + cc3 + cc4)
- somaTraseira = (ct1 + ct2 + ct3 + ct4)
- total = somaDianteira+somaCentral+somaTraseira
- # VERIFICAÇÃO DOS PESOS
- if somaDianteira > 10000:
- print(f"Peso dianteiro excedido: {somaDianteira}")
- if somaCentral > 16000:
- print(f"Peso central excedido: {somaCentral}")
- if somaTraseira > 8000:
- print(f"Peso traseiro excedido: {somaTraseira}")
- # VERIFICAÇÃO DOS METROS CUBICOS
- if (cd1*0.48 + cd2*0.65 + cd3*0.58 + cd4*0.39) > 6800:
- print(f"espaço dianteiro excedido: {cd1*0.48 + cd2*0.65 + cd3*0.58 + cd4*0.39}")
- if (cc1*0.48 + cc2*0.65 + cc3*0.58 + cc4*0.39) > 8700:
- print(f"espaço central excedido: {cc1*0.48 + cc2*0.65 + cc3*0.58 + cc4*0.39}")
- if (ct1*0.48 + ct2*0.65 + ct3*0.58 + ct4*0.39) > 5300:
- print(f"espaço traseiro excedido: {ct1*0.48 + ct2*0.65 + ct3*0.58 + ct4*0.39}")
- # VERIFICAÇÃO DE PROPORÇÃO, USEI A MESMA LÓGICA DA TABELA
- if (((somaDianteira/total) >= 0.3) or ((somaDianteira/total) <= 0.29)):
- print(f"proporção dianteira excedida: {np.round((somaDianteira/total),4)}")
- if (((somaCentral/total) >= 0.48) or ((somaCentral/total) <= 0.47)):
- print(f"proporção central excedida: {np.round((somaCentral/total),4)}")
- if (((somaTraseira/total) >= 0.24) or ((somaTraseira/total) <= 0.23)):
- print(f"proporção traseiro excedida: {np.round((somaTraseira/total),4)}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement