Searches the local area for a combination of minimizing county splits, compactness, population parity, and keeping close to the original plan

persily(plan, map, counties = NULL)

Arguments

plan

a single plan to optimize from

map

a redist map object

counties

Required

Value

a redist_plans object with one plan

Examples

# \donttest{
data(iowa)
map <- redist_map(iowa, existing_plan = cd_2010, pop_tol = 0.01, total_pop = pop)
plan <- get_plans_matrix(redist_smc(map, 1))[, 2]
#> SEQUENTIAL MONTE CARLO
#> Sampling 1 99-unit maps with 4 districts and population between 753,973 and 769,205.
local <- persily(plan = plan, map = map, counties = region)
#> FLIP SHORT BURSTS
#> Sampling up to 100 bursts of 50 iterations each.
#> Burst  Improve?  Score
#>     1     😀     0.454725
#>     4     🎇     0.465416
#>     5     🥂     0.468746
#>    10     🎆     0.470745
#>    11     ⛄     0.470829
#>    12     🌈     0.476314
#>    19     🎃     0.499611
#>    20            0.499611
#>    22     🌟     0.514485
#>    30            0.514485
#>    40            0.514485
#>    50            0.514485
#>    60            0.514485
#>    70            0.514485
#>    80            0.514485
#>    90            0.514485
#>   100            0.514485
# }