Giter Club home page Giter Club logo

districting's Introduction

Imposing contiguity constraints in political districting models

C++ code and experimental results to accompany the paper "Imposing contiguity constraints in political districting models" by Hamidreza Validi, Austin Buchanan, and Eugene Lykhovyd. (pdf) (slides) ๐ŸŒŽ

Build:

cd src/
make

Environment variable GUROBI_HOME must point to current GUROBI installation. The current Makefile is written for version 9.1.2, corresponding changes might be needed to correctly link with another version.

Binaries

  • ralg_hot_start computes good starting point for the r-algorithm, e.g., computes Lagrangian Dual bound. This is important step to fix as many variables as possible.

  • districting main binary: computes Lagrangian Dual, heuristic, fixes variables and finds the districting partition.

  • translate converts results of districting to GEO mapping

  • sol_to_png.py converts GEO mapping to .png using QGIS

TODO more details about binaries and format

Config format

# ####### config file for "districting"
# the database from online source, see the Link in the end of this README
database /path/to/db
# level must say tracts or counties
level change_to_tracts_or_counties
# Two-letter state identifier. Optional, can be passed using cmd arguments.
state AA
# If need to run for specific graph files and not from the database. Alternative configuration.
# Remove if db is used.
dimacs /path/to/dimacs
distance /path/to/dist
population /path/to/pop
# L,U,k - interger parameters for the mode. Use auto if using the db. Can be any number.
L 10
U auto
k auto
# see available models running ./districting
model hess
# Optional hot start for r-algorithm. Can be passed with cmd arguments.
ralg_hot_start /path/to/file
# Resulting CSV file. Appends comma-separated computational results
output /path/to/output.csv

Online Database!

Districting database can be found here.

districting's People

Contributors

zhelih avatar hamidrezavalidi avatar austinlbuchanan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.