Coder Social home page Coder Social logo

carpdata.jl's Introduction

CARPData.jl

CI codecov Project Status: Active – The project has reached a stable, usable state and is being actively developed.

This package reads .dat data files in a custom format for Capacitated Arc Routing Problem (CARP) instances and returns Data type:

struct Data
    name      ::String         # Instance name
    
    capacity  ::Int64          # Vehicles' capacity
    vehicles  ::Int64          # Number of vehicles
    
    vertices  ::Vector{Vertex} # List with all vertices
    edges     ::Vector{Edge}   # List with all edges (required or not)
    requireds ::Vector{Edge}   # List with required edges
    
    lb        ::Int64          # Known lower bound
    ub        ::Int64          # Known upper bound
end

where Vertex type:

struct Vertex
    id        ::Int64          # Sequential id, starting with 1
    
    edges     ::Vector{Edge}   # List with all incident edges (required or not)
    requireds ::Vector{Edge}   # List with required incident edges
end

and where Edge type:

struct Edge
    id        ::Int64          # Sequential id, starting with 1

    from      ::Vertex         # First vertex
    to        ::Vertex         # Second vertex
    
    cost      ::Int64          # Edge cost
    demand    ::Int64          # Edge demand (zero for depot)
end

Graph is undirected and depot is always vertex 1.

To install:

] add https://github.com/rafaelmartinelli/CARPData.jl

All classical CARP instances in the literature are preloaded:

  • kshs: Kiuchi M, Shinano Y, Hirabayashi R, Saruwatari Y. An Exact Algorithm for the Capacitated Arc Routing Problem Using Parallel Branch and Bound Method. In: Abstracts of the 1995 Spring National Conference of the Operational Research Society of Japan. 1995, p. 28-9. In Japanese. (no link, for obvious reasons... 🙂)
  • gdb: Golden BL, DeArmon JS, Baker EK. Computational Experiments with Algorithms for a Class of Routing Problems. Computers & Operations Research 1983;10(1):47-59. (link)
  • val (or bccm): Benavent E, Campos V, Corberan A, Mota E. The Capacitated Arc Routing Problem: Lower Bounds. Networks 1992;22:669-90. (link)
  • egl (e and s): Li LYO, Eglese RW. An Interactive Algorithm for Vehicle Routeing for Winter-Gritting. Journal of the Operational Research Society 1996;47:217-28. (link)
  • beullens (from C to F): Beullens P, Muyldermans L, Cattrysse D, Oudheusden DV. A Guided Local Search Heuristic for the Capacitated Arc Routing Problem. European Journal of Operational Research 2003;147(3):629-43. (link)
  • egl-large (g): Brandão J, Eglese R. A Deterministic Tabu Search Algorithm for the Capacitated Arc Routing Problem. Computers & Operations Research 2008;35:1112-26. (link)

See the full list. There are some other instances (A and B), but I could not find their origin (if you know, please send me a message).

For example, to load kshs1.dat:

data = load(:kshs1)

For instances with -, use _ instead:

data = load(:egl_e2_A)

Julia symbols do not allow -.

For custom CARP files, you must use the custom instance format. Check the README in the data directory for instructions.

data = load("path/to/my/instance.ext")

Related links:

carpdata.jl's People

Contributors

github-actions[bot] avatar guilhermebodin avatar rafaelmartinelli avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

guilhermebodin

carpdata.jl's Issues

Instance files with '-'

It is impossible to read instance files with '-'. For example, egl-s1-A.dat. It happens due to Julia symbols.

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.