alarm-redist / redist

Simulation methods for legislative redistricting.
https://alarm-redist.github.io/redist/
GNU General Public License v2.0
67 stars 23 forks source link

`add_constr_splits()` needs a `counties` input for usability with `redist_flip` #118

Closed christopherkenny closed 2 years ago

christopherkenny commented 2 years ago

Opening an issue for discussion purposes here. Some interested parties using 4.0.0 constraints: @kuriwaki @tylersimko @CoryMcCartan @bfifield

I'm in the middle of implementing #59 which will align with the 4.0.0 redist_constr() implementation. redist_flip doesn't take a counties input and probably shouldn't. (It would only do anything when specified with a positive weight in the constraint.)

Some thoughts on two implementations:

kuriwaki commented 2 years ago

From what you laid out, the first one sounds better. It would also help make more explicit the difference between the "hard" vs. "soft/Gibbs" county constraints in SMC, which is a bit tricky for beginners (#99).

Specifying it in add_constr_splits is also nice because its name suggests something more general than counties (it could be prefectures or wards in Japan). If I understand, you could apply it to anything that is a partition of the map? Then maybe the funciton could even allow for a argument name that is adminboundareis or subgeography rather than just counties.

christopherkenny commented 2 years ago

Implemented in #121