Coder Social home page Coder Social logo

vrptw-gurobipy's Introduction

VRPTW-gurobipy: Solving the Solomon VRPTW with direct MIP formulation using gurobipy

VRPTW stands for "Capacitated Vehicle Routing Problem with Time Windows".

Solomon C101_100 Solomon RC101_100

Setting up

pip3 install numpy gurobipy matplotlib tabulate

Executable scripts are solve.py and plot.py. Read through README before running them.

dataset

This folder stores the Solomon dataset downloaded from http://www.vrp-rep.org/variants/item/vrptw.html, and a simple dataset representing small scenarios. The small scenarios are also solved in Excel.

result

This directory contains solutions in the format of text files. pretty* files are human-friendly and raw* files store flattened decision matrices. In visual.plot_solution(), fileutil.pretty_print() is called to generate pretty* from raw*.

You can find visualization of results in result/fig.

result/comparison.txt shows the performance of the implemented solver, compared to the SOTA results 2005.

core.py

MIP formulation and solver using gurobipy.

fileutil.py

Functions related to file operation.

plot.py

Running this script generates figures from the raw* results, updates pretty* results, shows figures of small scenarios, and saves the comparison file.

solve.py

It calls the solver to solve all problems in the dataset. solve_solomon() needs a full gurobi liscense to work properly, while solve_simple_test() does not.

SOTA2005.py

Stores the results of the state-of-the-art solutions to the Solomon problems.

visual.py

Function for visualizing results.

Reference

http://alvarestech.com/temp/vrptw/Vehicle%20Routing%20Problem%20with%20Time%20Windows.pdf

vrptw-gurobipy's People

Contributors

ercbunny avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

rw-jhyt

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.