Am formulating an equation like this:
Dmax = 10000 meter (assumed max width of city)
B = 2500 (number of people in a building)
Distance1 = 10 (distance from a point in the city to B)
Distance2 = 500 (distance from a point in the city to B)
Distance3 = 0.01 (distance from a point in the city to B)
Distance4 = 0 (distance from a point in the city to B)
Dfactor = Distance / Dmax
Dfactor1 = 10/10000 = 0.001
Dfactor2 = 500/10000 = 0.05
Dfactor3 = 0.01/10000 = 0.000001
Dfactor4 = 0/10000 = 0
f = B * Dfactor
f1 = 2500 * 0.001 = 2.5
f2 = 2500 * 0.05 = 125
f3 = 2500 * 0.000001 = 0.0025
f4 = 2500 * 0 = 0
I need f (flow rate) to decrease when the distance increases. ie: people would be less likely to travel far to reach building B.
Problem is, if I use f = B / Dfactor, then there's the danger of divide by zero and there's also the danger of the numerator becoming extremely huge, like in the case of f3 if 0.000001 were in the denominator.
Is there a better way to have distance as a factor which decreases the likelihood of people 'flowing' to a building?