Chooses p nodes maximising the volume of flows whose path passes an open node,
exactly by enumeration or by greedy addition and substitution.
Usage
FlowCapturingLocation(
p,
paths,
volumes = NULL,
n_nodes = NULL,
max_enum = 2e+05
)
Arguments
- p
Number of sites.
- paths
List of integer node vectors (1-based), one per flow.
- volumes
Flow volumes (default 1).
- n_nodes
Number of candidate nodes (default the largest node index).
- max_enum
Enumeration limit.
Value
list(sites, captured, captured_volume, share, method).
References
Hodgson, M. J. (1990). A flow-capturing location-allocation
model. Geographical Analysis 22, 270-279.
Examples
FlowCapturingLocation(1, list(c(1, 2, 3), c(4, 2, 5), c(6, 7)))$captured_volume
#> [1] 2