Skip to content

Julia Package for reading .tsp files

License

Notifications You must be signed in to change notification settings

canthonissen/TSPLIB.jl

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TSPLIB.jl

Build Status codecov

This reads .tsp data files in the TSPLIB format for Traveling Salesman Problem (TSP) instances and returns TSP type.

struct TSP
    name        ::AbstractString
    dimension   ::Integer
    weight_type ::AbstractString
    weights     ::Matrix
    nodes       ::Matrix
    Dnodes      ::Bool
    ffx         ::Function
    pfx         ::Function
    optimal     ::Float64
end

To install:

] add TSPLIB

Some TSP instances in the TSPLIB library are preloaded. See the list.

For example, to load a280.tsp, you can do:

tsp = readTSPLIB(:a280)

For custom TSP files, you can load:

tsp = readTSP(path_to_tsp_file)

About

Julia Package for reading .tsp files

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Julia 100.0%