print("Il y a trop de fruits/legumes dans ce bassin de vie")
indice_proximite=indice_proximite/100
else:
indice_proximite=(Sbv-surf_bv)/Sbv*100
ifaffichage==True:
print("Il n'y a pas assez de fruits/légumes dans ce bassin de vie")
total_diff+=indice_proximite*popBv
ifaffichage==True:
print("Indice de proximité : "+str(indice_proximite))
# Average of indices of each living area
diff_moyenne=total_diff/(self.Population_PAT)
# Near 0 -> good value, the nearest from 100, the baddest the value and baddest the repartition of fruits and vegetables is.
ifaffichage==True:
print()
print("Indice de proximité du scénario : "+str(diff_moyenne)+"%")
returndiff_moyenne
'''
Function calculating the proximity indice.
The purpose of this indice is to reflect the proximity between productions site and consommation site.
We are calculating it with a comparison of the area of patches cultivating fruits and vegetables and the population of living area (bassin de vie) in the PAT's territory
A living area with a low population will require a lower cultivating area to get a good value.