Path Optimization of Carpooling implementation using networkx, google OR tool in python3 Please read project_report.pdf for code design.
Please read 'spec.pdf' for specific problem description.
Please read https://docs.google.com/document/d/1S2Xxs47H0cYT5xCnsJIwKnxy4bzVv_kXxMWXIR9YAYc/edit
Make sure to install these tools first
Numpy https://www.scipy.org/install.html
pip install numpy
Pandas https://pandas.pydata.org/pandas-docs/stable/install.html
pip install pandas
pycountry https://pypi.org/project/pycountry/
pip install pycountry
Google OR Tool https://developers.google.com/optimization/install
python -m pip install --upgrade --user ortools
NetworkX https://networkx.github.io/documentation/stable/install.html
pip install pip install networkx
Matplotlib for visualization of graphs https://matplotlib.org/users/installing.html
python -m pip install -U pip
python -m pip install -U matplotlib
Also, please install the current repository
Everything should be ready to go at this point, so let's run some Python code,
python solver.py inputs/174_50.in outputs
Please go to version_yes_walking
To run one input generated by input_generator.py
python solver.py (path to a .in file) (path to save .out files) to run one input
To run all inputs
python solver.py --all (path to .in files) (path to directory to save .out files)
Examples
python solver.py inputs/174_50.in outputs
python solver.py --all inputs outputs
To generate a problem(graph,input, .in file) / you can decide the number of locations and the number of homes in the code.
python3 input_generator.py
To check whether a problem(graph, .in file) generated is valid
Similar way for input_validator.py
To check whether all problem(graph, .in files) generated are valid
Similar way for input_validator.py
To check whether a solution(.out file) generated is valid
Similar way for output_validator.py
To check whether all solutions(.out files) generated are valid
Similar way for output_validator.py
Please clone the Github Repository:
git clone https://github.com/moonwonlee/path_optimization_of_carpooling.git
or (if you are using SSH, which is recommended):
?
Then, please create a new branch:
git checkout -b <branch-name>
and make your branch name descriptive as to what issue or patches you will be making to the code.
After that, once you make your relevant changes, please push to the branch and submit a pull request on Github.
This repository is being maintained by Moonwon Lee @ UC Berkeley
Primary contacts:
- Moonwon Lee [email protected]