|
@ -6,7 +6,8 @@ def lancer(k, date, temp_moy, temp_ref, donnees): |
|
|
print(k) |
|
|
print(k) |
|
|
print(donnees_point) |
|
|
print(donnees_point) |
|
|
#print(temp_num_jour) |
|
|
#print(temp_num_jour) |
|
|
kPlusProches(k, donnees_point, donnees) |
|
|
lst_k_plus_proches = kPlusProches(k, donnees_point, donnees) |
|
|
|
|
|
PuissanceMoyenne(lst_k_plus_proches) |
|
|
#estBissextile(an) |
|
|
#estBissextile(an) |
|
|
|
|
|
|
|
|
def lecture(fichier): |
|
|
def lecture(fichier): |
|
@ -124,10 +125,11 @@ def distance(donnees, donneespoint, i): |
|
|
z2 = donneespoint[2] |
|
|
z2 = donneespoint[2] |
|
|
return ((d_final)**2)+((y1-y2)**2)+((z1-z2)**2) |
|
|
return ((d_final)**2)+((y1-y2)**2)+((z1-z2)**2) |
|
|
|
|
|
|
|
|
def PuissanceMoyenne(lst,dist): |
|
|
def PuissanceMoyenne(lst_k_plus_proches): |
|
|
"""Calcule la moyenne de distances entre les points """ |
|
|
"""Calcule la moyenne de distances entre les points """ |
|
|
lecture("pic-journalier-consommation.csv") |
|
|
lecture("pic-journalier-consommation.csv") |
|
|
conso_moy = sum() / len() |
|
|
conso_moy = sum() / len(lst_k_plus_proches) |
|
|
|
|
|
return conso_moy |
|
|
|
|
|
|
|
|
def recup1(): |
|
|
def recup1(): |
|
|
k = 5 #value1.get() |
|
|
k = 5 #value1.get() |
|
|