A C++ parser/lexer for instances of TSPLIB and GTSPLIB.
The Traveling Salesman Problem library (TSPLIB) is a collection of example problem data for the Traveling Salesman Problem, for which a particular file format has been devised. The Generalized Traveling Salesman Problem library (GTSPLIB) adds a few pieces of information to that.
Many file reader variants can be found, each implementing a subset of the file specification. This repository is aimed to combine effort and eventually create a parser that can read all kinds of TSPLIB and GTSPLIB instances.
Bison/Flex parser for TSPLIB and GTSPLIB instances
Please report any issues or feature requests on GitHub. If you have a contribution, you are welcome to send a Pull Request!
If you want to develop this parser, simply clone this Git and install Bison and Flex. For Windows users, see WinFlexBison.
Run git submodule update --recursive
to download the dependencies to other Git modules.
The project compiles with MinGW 4.9.1 and the Qt Make system under Windows. It uses Google Test for some integration and unit-testing facilities.
Before compiling, you will need to point to the flex++
and bison++
executables, so that qmake can generate the lexer and parser components. This is typically done through the environment variables of your shell, or the build system (e.g. Qt Creator).
To use the Qt makefiles, run qmake
followed by make
in the root directory. Under Windows, you can use the winflexbison binaries.