mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-10 01:55:41 -04:00
Add limits to max/min bleed
This prevents us from giving unrealistically large or small bleed estimates in case we have areas which are more dense or less dense than the most/least dense areas we currently have. Also means we don’t have to treat City of London as a special case.
This commit is contained in:
@@ -80,9 +80,8 @@ class BroadcastArea(SortableMixin):
|
||||
|
||||
@property
|
||||
def estimated_bleed_in_m(self):
|
||||
if self.id.endswith(CITY_OF_LONDON.WARDS):
|
||||
return 500
|
||||
return 5_900 - (math.log(self.phone_density, 10) * 1_250)
|
||||
estimated_bleed = 5_900 - (math.log(self.phone_density, 10) * 1_250)
|
||||
return max(500, min(estimated_bleed, 5000))
|
||||
|
||||
@property
|
||||
def estimated_bleed_in_degrees(self):
|
||||
|
||||
Reference in New Issue
Block a user