GithubHelp home page GithubHelp logo

pgoelz / fluid Goto Github PK

View Code? Open in Web Editor NEW
7.0 2.0 1.0 26 KB

Simulation code for the paper “The Fluid Mechanics of Liquid Democracy” by Paul Gölz, Anson Kahng, Simon Mackenzie, and Ariel D. Procaccia.

Python 91.56% Shell 8.44%
liquid-democracy preferential-attachment comsoc voting

fluid's Introduction

Read me

This repository contains the simulation code for the paper

Paul Gölz, Anson Kahng, Simon Mackenzie and Ariel D. Procaccia: The Fluid Mechanics of Liquid Democracy. 2018.

The paper is freely accessible at http://procaccia.info/papers/fluid.pdf.

Requirements

  • Python 3.6 (higher versions might work, but so far Gurobi does not support them)
  • Gurobi with gurobipy python bindings (we used version 8.0.1)
  • Matplotlib (2.2.2)
  • Numpy (1.14.5)
  • Mock (2.0.0): only required for unit tests in test_approximate_confluent_flow.py
  • Graphviz (2.40.1): the dot and unflatten binaries should be available in PATH to generate example graphs in graph_examples.py.

For academic use, Gurobi provides free licenses at http://www.gurobi.com/academia/for-universities.

Replication of experiments in the paper

The figures from the body of the paper can be reproduced by running the script scripts/generate_figures.sh. The produced plots can be found in data/plots/, named after the figure number, and most experiments also generate a log in data/logs/. For more information on what the individual commands do and the meaning of the parameters, call the individual python scripts with -h. Since script sets the environment variable $GUROBI_SINGLE_THREAD, our code prevents Gurobi from spawning multiple threads. Without this variable, execution times will likely be faster, but less reproducible.

We expect the resulting graphics to be close to the ones found in our publication. In particular, the randomness seed is fixed for all experiments. Nonetheless, details like the iteration order of dictionaries are not guaranteed to be the same across different systems and versions of Python, which can lead to different results. Finally, running times and time-outs heavily depend on the system. Our figures were generated on a MacBook Pro (2017) on MacOS 10.12.6 with a 3.1 GHz Intel Core i5 processor and 16 GB of RAM.

Questions

For questions on the simulations, feel free to contact Paul Gölz or Anson Kahng.

fluid's People

Contributors

pgoelz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

bookisso

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.