BART fare reduction
This is a demonstration of some really cool algorithm concepts, applied to the
San Francisco BART system. The idea is to “swap” tickets among train riders so
that the trips appear shorter and everyone’s fares go down. You can find a
better description of the
idea here.
This program is a server that runs a very rudimentary API and a Javascript
frontend program for the server. You can do simple experiments with small
amounts of riders, or you can run large-scale experiments on real BART data. You
can test it all out for yourself:
pip install -r requirements-dev.txt
export FLASK_APP=bart/app.py
export FLASK_DEBUG=1
flask run --host=0.0.0.0
This is an academic demonstration of modeling a real-world problem as an
optimization problem, formulating it as an integer linear program, and using the
resulting formulation as the basis for an algorithm.
This app, if it were real, would steal from a public transportation system. That
is wrong. However, this app could never be real for several reasons:
So at the end of the day, this is a harmless exercise in algorithms.