~ruther/ctu-fee-eoa

ref: ab9a6739bf63ccb42baaa1a097b450ac0dbe1153 ctu-fee-eoa/codes/compute.sh -rwxr-xr-x 683 bytes
ab9a6739 — Rutherther fix: implement possibility of best candidate not being found 11 days ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env bash

set -euxo pipefail

algorithms=("ea" "ea_mst" "ea_nn" "ea_cx" "ea_pmx" "ea_erx" "ls_reverse" "ls_swap" "ls_move" "ls_mix" "ls_mst" "ls_nn" "rs" "ea_binary" "ls_binary")

instances=("eil51" "eil76" "kroA100" "eil101" "pr124" "ch150" "kroA150" "kroA200" "ts225" "a280")

repetitions="10"

(cd tsp_hw01 && cargo build --release)

echo "Running smaller instances"
for algorithm in "${algorithms[@]}"; do
  echo "Algorithm $algorithm"
  for instance in "${instances[@]}"; do
    echo "  Instance $instance"
    for i in $(seq "$repetitions"); do
      (cd tsp_hw01 && ../target/release/tsp_hw01 "$instance" "$algorithm") &
      sleep 2
    done
    wait
  done
done