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.PopulationConstraintType
PopulationConstraint(graph::BaseGraph,
                     partition::Partition,
                     tolerance::Float64)::PopulationConstraint

Initializes a PopulationConstraint that stores the minimum and maximum populations a district in a partition could have within tolerance.

Returns the PopulationConstraint object.

source

ContiguityConstraint