A recently European Commission regulation requires insurance
companies to determine the maximum value of insured fire risk policies of
all buildings that are partly or fully located within circle of a radius of
200m (Commission Delegated Regulation (EU), 2015, Article 132). The problem
can be stated as: "find the centre coordinates of a circle with a fixed
radius that maximizes the coverage of total fire risk insured". This can be
viewed as a particular instance of the Maximal Covering Location Problem
(MCLP) with fixed radius. See Gomes (2018) for a solution to the maximum fire
risk insured capital problem using a multi-start local search meta-heuristic.
The computational performance of highest_concentration()
is
investigated to overcome the long times the MCLP algorithm is taking.
highest_concentration()
is written in C++, and for 500,000 buildings
it needs about 5-10 seconds to determine the maximum value of insured fire
risk policies that are partly or fully located within circle of a radius of
200m.
`highest_concentration()` uses Gustavo Niemeyer's wonderful and elegant
geohash coordinate system. Niemeyer's Geohash method encodes latitude and
longitude as binary string where each binary value derived from a decision
as to where the point lies in a bisected region of latitude or longitudinal
space. The first step is to convert all latitude/longitude coordinates into
geohash-encoded strings.
The length of the geohash (`gh_precision`) controls the 'zoom level':
precision 5 is 4.89 x 4.89km;
precision 6 is 1.22km x 0.61km;
precision 7 is 153m x 153m;
precision 8 is 39m x 19m.
For a circle with a radius of 200m the precision of the geohash should
be set equal to 6 (default). Then the `value` column is aggregated (sum)
per geohash (with a buffer of size `radius` around each geohash,
since the coordinates of the highest concentration can be near the edge of
the geohash). The geohashes with a aggregated value below the lowerbound
are removed, where the lowerbound is equal to the maximum of the
`value` column. Then a grid is created, with a distance of `grid_distance`
between the points. See example section for a illustration of the algorithm.
As a last step for each grid point the concentration is calculated.