Chooses p sites maximising the demand weight within radius of an open
site, exactly by enumeration or by greedy addition and substitution.
Usage
MaximalCovering(
p,
radius,
demand = NULL,
sites = NULL,
dist = NULL,
weights = NULL,
max_enum = 2e+05
)
Arguments
- p
Number of sites.
- radius
Service distance.
- demand, sites
Coordinate matrices (sites default to demand).
- dist
Demand-by-site distance matrix (instead of coordinates).
- weights
Demand weights.
- max_enum
Enumeration limit.
Value
list(sites, covered, covered_weight, coverage_share, method).
References
Church, R. and ReVelle, C. (1974). The maximal covering location
problem. Papers of the Regional Science Association 32, 101-118.
Examples
MaximalCovering(1, 1.5, rbind(c(0, 0), c(1, 0), c(2, 0), c(9, 0)))$covered_weight
#> [1] 3