Skip to content
/ aTaxi Public

Assessment of RideSharing, ‘Last-Mile” and Optimal Empty Vehicle Management of Large Regional aTaxi Operation

Notifications You must be signed in to change notification settings

Yunski/aTaxi

Repository files navigation

aTaxi

Assessment of RideSharing, ‘Last-Mile” and Optimal Empty Vehicle Management of Large Regional aTaxi Operation

About

This project establishes a computational framework to assess the ride-sharing opportunities for a given county or state.

Requirements

Go - After downloading, follow the installation instructions here.
MySQL - Make sure to start MySQL server on your machine.

Setup

Config

Create a json "config.json" in the project root directory. Project structure should look like

app/
config.json

Paste the following in "config.json", and edit the field values accordingly.

{
    "username": "root",
    "password": "password",
    "database": "database_name",
    "google_maps_api_key": "your_api_key"
}

Data

Create a directory "data/" in the project root directory. Project structure should look like

app/
data/
config.json

This directory should contain your csv files (in particular NationWide Modal Person Trip Files).

To populate the MySQL database, run the following commands in terminal:

$ cd deploy/
$ go run db_populate.go [csv_file_name]

Dependencies

Run the following commands in terminal to install Go dependencies:

$ go get github.com/gorilla/handlers
$ go get github.com/gorilla/mux
$ go get github.com/go-sql-driver/mysql
$ go get github.com/jinzhu/gorm
$ go get github.com/kellydunn/golang-geo

Analysis

For quick generation of region analysis csv files, first run the region avo script:

$ cd avo/
$ go run region_avo.go path/to/modal-person-trip-files

This generates the ataxi_trips.csv file. Run the rest of the analysis scripts in the following directories:

cumulative/
region_totals/
supplydemand/

i.e.

$ cd supplydemand
$ go run supply_demand.go path/to/ataxi_trips.csv

Server

$ cd app/
$ go run *.go

Server will be listening at localhost:8080.

API

GET - /api/taxis
parameters:
STRING orderby = field to sort taxis (departure_time, num_passengers)
BOOLEAN passengers = return passenger info along with each taxi (true, false)
INT limit = number of taxis to return
INT ox = X coord of origin pixel
INT oy = Y coord of origin pixel
INT dx_super = X coord of destination superpixel
INT dy_super = Y coord of destination superpixel

About

Assessment of RideSharing, ‘Last-Mile” and Optimal Empty Vehicle Management of Large Regional aTaxi Operation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published