SHOW:
|
|
- or go back to the newest paste.
1 | def solution_evaluation(cd1, cc1, ct1, cd2, cc2, ct2, cd3, cc3, ct3, cd4, cc4, ct4): | |
2 | cd1 = np.round(cd1) | |
3 | cc1 = np.round(cc1) | |
4 | ct1 = np.round(ct1) | |
5 | cd2 = np.round(cd2) | |
6 | cc2 = np.round(cc2) | |
7 | ct2 = np.round(ct2) | |
8 | cd3 = np.round(cd3) | |
9 | cc3 = np.round(cc3) | |
10 | ct3 = np.round(ct3) | |
11 | cd4 = np.round(cd4) | |
12 | cc4 = np.round(cc4) | |
13 | ct4 = np.round(ct4) | |
14 | ||
15 | print("..RESUMO DA CARGA DE AVIÃO..") | |
16 | print("DIANTEIRA -- CENTRAL -- TRASEIRA") | |
17 | print("PesoCarga1(t): ", cd1, " - ", cc1, " - ", ct1) | |
18 | print("PesoCarga2(t): ", cd2, " - ", cc2, " - ", ct2) | |
19 | print("PesoCarga3(t): ", cd3, " - ", cc3, " - ", ct3) | |
20 | print("PesoCarga4(t): ", cd4, " - ", cc4, " - ", ct4) | |
21 | lucro = ((cd1+cc1+ct1)*0.31 + (cd2+cc2+ct2)*0.38 + (cd3+cc3+ct3)*0.35 + (cd4+cc4+ct4)*0.285) | |
22 | print(f"Lucro(R$): {lucro}") | |
23 | ||
24 | # TOTAL DE PESO EM CADA COMPARTIMENTO DO AVIAO | |
25 | somaDianteira = (cd1 + cd2 + cd3 + cd4) | |
26 | somaCentral = (cc1 + cc2 + cc3 + cc4) | |
27 | somaTraseira = (ct1 + ct2 + ct3 + ct4) | |
28 | total = somaDianteira+somaCentral+somaTraseira | |
29 | ||
30 | # VERIFICAÇÃO DOS PESOS | |
31 | if somaDianteira > 10000: | |
32 | print(f"Peso dianteiro excedido: {somaDianteira}") | |
33 | if somaCentral > 16000: | |
34 | print(f"Peso central excedido: {somaCentral}") | |
35 | if somaTraseira > 8000: | |
36 | print(f"Peso traseiro excedido: {somaTraseira}") | |
37 | ||
38 | # VERIFICAÇÃO DOS METROS CUBICOS | |
39 | if (cd1*0.48 + cd2*0.65 + cd3*0.58 + cd4*0.39) > 6800: | |
40 | print(f"espaço dianteiro excedido: {cd1*0.48 + cd2*0.65 + cd3*0.58 + cd4*0.39}") | |
41 | if (cc1*0.48 + cc2*0.65 + cc3*0.58 + cc4*0.39) > 8700: | |
42 | print(f"espaço central excedido: {cc1*0.48 + cc2*0.65 + cc3*0.58 + cc4*0.39}") | |
43 | if (ct1*0.48 + ct2*0.65 + ct3*0.58 + ct4*0.39) > 5300: | |
44 | print(f"espaço traseiro excedido: {ct1*0.48 + ct2*0.65 + ct3*0.58 + ct4*0.39}") | |
45 | ||
46 | # VERIFICAÇÃO DE PROPORÇÃO, USEI A MESMA LÓGICA DA TABELA | |
47 | if (((somaDianteira/total) >= 0.3) or ((somaDianteira/total) <= 0.29)): | |
48 | print(f"proporção dianteira excedida: {np.round((somaDianteira/total),4)}") | |
49 | if (((somaCentral/total) >= 0.48) or ((somaCentral/total) <= 0.47)): | |
50 | print(f"proporção central excedida: {np.round((somaCentral/total),4)}") | |
51 | if (((somaTraseira/total) >= 0.24) or ((somaTraseira/total) <= 0.23)): | |
52 | print(f"proporção traseiro excedida: {np.round((somaTraseira/total),4)}") | |
53 |