Chooses p sites minimising max_i w_i min_j d_ij (vertex p-center), exactly by
enumeration or by greedy addition and substitution.
Usage
PCenter(
p,
demand = NULL,
sites = NULL,
dist = NULL,
weights = NULL,
max_enum = 2e+05
)
Arguments
- p
Number of sites.
- 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, assignment, radius, method).
References
Hakimi, S. L. (1965). Optimum distribution of switching centers
in a communication network and some related graph theoretic problems.
Operations Research 13, 462-475.
Examples
PCenter(1, rbind(c(0, 0), c(1, 0), c(4, 0)))$radius
#> [1] 3