TCPSPSuite
Getting Started

This is the TCPSPSuite, a software suite for optimizing various flavours of the Time Constrained Project Scheduling Problem. Refer to Instance File Format for what features instances to be optimized may include.

Requirements

TCPSPSuite should work on any moderately recent GNU/Linux system. All the libraries listed here must be installed including development headers. On many Linux distributions, the development package names end in -dev.

<a name="gurobi-troubleshooting"></a> Installing Gurobi

Installing Gurobi can be tricky sometimes. Here are some pointers:

  • Most importantly: Most modern compilers can't work with the shipped libgurobi_c++.a. This yields compilation errors like undefined reference to <something about gurobi> in the linking step. To fix this problem, you need to copy the file `/path/to/gurobi/lib/libgurobi_g++<highest version available>.a over the file /path/to/gurobi/lib/libgurobi_c++.a. The actually available versions of that file differ depending on your Gurobi version. Just use the most recent version.
  • Set the GUROBI_HOME environment variable to the path where you installed Gurobi to. It should point to the linux64 folder, which contains e.g. lib, setup.py, etc.
  • Set the GRB_LICENSE_FILE environment variable to the path where you put the license file downloaded via grbgetkey (see the Gurobi documentation)
  • The file FindGUROBI.cmake in the cmake/modules subdirectory for technical reasons has a hard-coded list of Gurobi versions that are detected. Currently, the most recent detected version is Gurobi 8.0. If you have a more recent version of Gurobi, you might need to add it to the list of detected Gurobi versions in that file.

<a name="odb-troubleshooting"></a> Troubleshooting ODB

ODB in its current version (2.4.0) is not C++17 compliant, since it uses the removed throw declaration. Otherwise, the code is C++17 compliant. Therefore, our main CMakeLists.txt currently includes these steps:

  1. Copy the system-installed ODB headers into the subdirectory src/contrib/odb_headers
  2. Replace all occurrences of throw () with noexcept.
  3. Remove all occurrences of throw (std::bad_alloc) from the files via a simple regular expression
  4. Add src/contrib/odb_headers to the include path.

If this automatic process does not work for you, a way of circumventing it would be:

  1. Prepare C++17 compliant ODB headers yourself. The two replacements resp. removals listed above should be enough.
  2. Copy the headers somewhere in the include path. If necessary, modify the include path as required.

Getting the Source

The source is available from github. Just clone the repository and fetch its submodules. Example:

git clone https://github.com/kit-algo/TCPSPSuite.git ./TCPSPSuite
cd TCPSPSuite
git submodule init
git submodule update --recursive

Building

  • For the following, we assume that you checked out the repository (see above) to ~/src/tcpsp/TCPSPSuite.
  • Create a build repository outside of the code repository folder. Example:
    cd ~/src/tcpsp
    mkdir build
  • Inside your build directory, use CMake to configure the build process:
    cd build
    cmake ../TCPSPSuite

At this point you should be notified if any required library (see Requirements above) is not found. You either need to install the respective library or make sure that CMake is able to find it. Important: Please note that at the bottom of the output, CMake tells you which optional packages could be found resp. not found, and which solvers need which optional packages. If an optional package is not being found, no solvers that need it will be built. The package will build fine without any solvers at all - however, you won't be able to do any optimization!

  • Build TCPSPSuite:
    make

This will take a couple of minutes.

  • Afterwards, the binary can be found in build/src/tcpspsute.

Running

If you run it without any arguments, it will print a usage help. To select which solvers should be run on your instances, you need to create a solver configuration file. An example is provided in the example folder.

TCPSPSuite needs at least two arguments to be run: A (sqlite3) file in which to store the results and an instance file or a directory in which to look for instance files. A simple invocation could therefore be:

tcpspsuite -s /path/to/storage.sqlite3 -f /path/to/my/instance.json

Or, if you want to solve all instances in a directory:

tcpspsuite -s /path/to/storage.sqlite3 -d /path/to/my/instance/directory

Let's add a solver configuration file:

tcpspsuite -s /path/to/storage.sqlite3 -d /path/to/my/instance/directory -c /path/to/the/solver/config.json

Getting Help

If you think you encountered a bug, please report it in the bug tracker. You can also contact us via mail.