Skip to content

An application of tabu-enhanced genetic search to the railway optimization problem introduced in the informatiCup2022 by the German Informatics Society (:2nd_place_medal:)

Notifications You must be signed in to change notification settings

cbl/informatiCup2022

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

informatiCup2022

An application of tabu-enhanced genetic search to the railway optimization problem introduced in the informatiCup2022 by the German Informatics Society (GI).

🥈 The project was awarded 2nd place. The project presentation can be seen on youtube.

Table Of Contents

Introduction

This readme contains a usage guide for the program. The theoretical elaboration can be found in the paper.

Usage

Using cargo

Create a build using the following command:

cargo build --release

Then pass the input model via stdin to the binary:

cat test-cases/long/input.txt | ./target/release/rstrain

Using Docker

You may use the docker container to run the programm.

Create a build first:

docker build . -t rstrain

...and run it via:

cat test-cases/long/input.txt | docker run --interactive rstrain

Advanced Usage

The advanced usage of the program can be printed via the --help flag.

USAGE:
    rstrain [FLAGS] [OPTIONS]

FLAGS:
    -d, --debug      Prints detailed information about the result
    -p, --plot       Plots the fitness progress, plots are located in ./plots
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
    -s, --tabu-size <TABU>    Size of tabu list, increase for large models (default 8000000)
    -t, --time <TIME>         Max search duration in milliseconds (default 600000)
    -m, --t-max <TMAX>        The latest time, increase when a solution with a total delay of 0 cannot be found, default
                              value is the latest arrival time of all passengers

Tip

The --debug and --plot flags come in handy, when it comes to understanding a the progess and performance of a search process for a model.

For example:

cat test-cases/long/input.txt | ./target/release/rstrain --debug --plot

plots the fitness progress into a graph and prints detailed information similar to the following example:

...
+---------------------+---------+
| duration            | 0.440s  |
+---------------------+---------+
| compared moves      | 1365533 |
+---------------------+---------+
| compared moves / ms | 3103    |
+---------------------+---------+
| delays              | 0       |
+---------------------+---------+
| arrived passengers  | 721/721 |
+---------------------+---------+
| t-max               | 6291    |
+---------------------+---------+

Tests

Tests can be executed via:

cargo test

Documentation

A web version of the program's documentation can be created and opened using the following command:

cargo doc --open

Benchmarks

Note: Benchmarks use unstable features of the rust programming languages, which are currently only available on the nightly channel.

Benchmarks can be run via:

cargo bench

Coding Style

Rusts standard code formatter rustfmt is used for ensure coding style consistency. It can be run via:

cargo fmt

About

An application of tabu-enhanced genetic search to the railway optimization problem introduced in the informatiCup2022 by the German Informatics Society (:2nd_place_medal:)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages