~ruther/ctu-fee-eoa

ref: c0d71ff4c9e0d11290955bbf96a83d8eb84e8477 ctu-fee-eoa/codes/compute.sh -rwxr-xr-x 681 bytes
c0d71ff4 — Rutherther feat: add compute.sh for computing all data a month 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" "eil101" "kroA100" "ch150" "kroA150" "kroA200" "a280" "u574" "u724")

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