Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cbl/informaticup2022
An application of tabu-enhanced genetic search to the railway optimization problem introduced in the informatiCup2022 by the German Informatics Society (:2nd_place_medal:)
https://github.com/cbl/informaticup2022
Last synced: 19 days ago
JSON representation
An application of tabu-enhanced genetic search to the railway optimization problem introduced in the informatiCup2022 by the German Informatics Society (:2nd_place_medal:)
- Host: GitHub
- URL: https://github.com/cbl/informaticup2022
- Owner: cbl
- Created: 2021-11-16T00:11:02.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-05-13T19:00:00.000Z (over 2 years ago)
- Last Synced: 2024-10-11T07:10:02.555Z (about 1 month ago)
- Language: Rust
- Homepage:
- Size: 993 KB
- Stars: 14
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# informatiCup2022
An application of tabu-enhanced genetic search to the railway optimization problem introduced in the [informatiCup2022](https://informaticup.github.io/competition/20-current) by the [German Informatics Society (GI)](https://gi.de/).
:2nd_place_medal: The project was awarded 2nd place. The project presentation can be seen on [youtube](https://www.youtube.com/watch?v=HXvYeeYx5bI&t=3280s).
## Table Of Contents
- [Introduction](#introduction)
- [Usage](#usage)
- [Using cargo](#cargo-usage)
- [Using Docker](#docker-usage)
- [Advance Usage](#advance)
- [Tip](#tip)
- [Tests](#tests)
- [Documentation](#docs)
- [Benchmarks](#benchmarks)
- [Coding Style](#coding-style)## Introduction
This readme contains a usage guide for the program. The theoretical elaboration can be found in the [paper](paper/paper.pdf).
## Usage
### Using cargo
Create a build using the following command:
```shell
cargo build --release
```Then pass the input model via stdin to the binary:
```shell
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:
```shell
docker build . -t rstrain
```...and run it via:
```shell
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.
```shell
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 informationOPTIONS:
-s, --tabu-size Size of tabu list, increase for large models (default 8000000)
-t, --time#### 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:
```shell
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:
```shell
cargo test
```## Documentation
A web version of the program's documentation can be created and opened using
the following command:```shell
cargo doc --open
```## Benchmarks
**Note**: Benchmarks use unstable features of the rust programming languages, which are currently only available on the [nightly channel](https://rust-lang.github.io/rustup/concepts/channels.html#working-with-nightly-rust).
Benchmarks can be run via:
```shell
cargo bench
```## Coding Style
Rusts standard code formatter [rustfmt](https://github.com/rust-lang/rustfmt) is used for ensure coding style consistency. It can be run via:
```shell
cargo fmt
```