/repairing-redistricting

This repository contains an AMPL model for optimizing a state's legislative districts for compactness, contiguity, integrity, population, and competitiveness. Most importantly, it also considers political proportionality in an effort to generate fair districts that combat gerrymandering. It also includes data for testing this model on the state of Ohio which has had historically gerrymandered districts. Finally, it contains code for generating some of this data and for generating colored state maps from the model's output.

Primary LanguageC++

Repairing Redistricting

Model and Code Design by: Benjamin Carman

With Help and Supervision from: Dr. Vardges Melkonian

Designed and implemented as a part of tutorial studies in Operations Research

Description

Overview

This repository contains a model written in AMPL to automate and optimize the process of Congressional redistricting. The corresponding model complete with data for the state of Ohio and solving commands can be found in this directory and are ready to be run using the solver Gurobi on the the NEOS servers found at https://neos-server.org/neos/solvers/lp:Gurobi/AMPL.html.

A full description of the model used to generate these districts can be found in the report.

The output of running this model for maximum distances 4, 5, and 6 with a leeway of 1 from the ideal proportion of districts leaning toward one party are the other can be found in testsOhio.

The code for coloring Ohio district maps using the model's output for district choices can be found in mapColoring.

The code for generating shortest distance data between counties in a state given adjacency information as required by the model can be found in shortestDistances.