项目作者: rafaelmartinelli

项目描述 :
Julia Package for reading Capacitated Arc Routing Problem's data files
高级语言: Julia
项目地址: git://github.com/rafaelmartinelli/CARPData.jl.git
创建时间: 2021-04-07T17:14:51Z
项目社区:https://github.com/rafaelmartinelli/CARPData.jl

开源协议:MIT License

下载


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:

  1. struct Data
  2. name ::String # Instance name
  3. capacity ::Int64 # Vehicles' capacity
  4. vehicles ::Int64 # Number of vehicles
  5. vertices ::Vector{Vertex} # List with all vertices
  6. edges ::Vector{Edge} # List with all edges (required or not)
  7. requireds ::Vector{Edge} # List with required edges
  8. lb ::Int64 # Known lower bound
  9. ub ::Int64 # Known upper bound
  10. end

where Vertex type:

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

and where Edge type:

  1. struct Edge
  2. id ::Int64 # Sequential id, starting with 1
  3. from ::Vertex # First vertex
  4. to ::Vertex # Second vertex
  5. cost ::Int64 # Edge cost
  6. demand ::Int64 # Edge demand (zero for depot)
  7. end

Graph is undirected and depot is always vertex 1.

To install:

  1. ] 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. (link90026-6))
  • 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. (link00334-X))
  • 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:

  1. data = load(:kshs1)

For instances with -, use _ instead:

  1. 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.

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

Related links: