Constraints
A plan is only valid if it satisfies certain constraints. There are two main constraints that are implemented in GerryChain and are common in the definition of districting plans:
PopulationConstraint
GerryChain.PopulationConstraint — TypePopulationConstraint(graph::BaseGraph,
partition::Partition,
tolerance::Float64)::PopulationConstraintInitializes a PopulationConstraint that stores the minimum and maximum populations a district in a partition could have within tolerance.
Returns the PopulationConstraint object.
ContiguityConstraint
GerryChain.ContiguityConstraint — TypeContiguityConstraint()Initializes and returns a ContiguityConstraint object.