-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun.sh
37 lines (31 loc) · 1.46 KB
/
run.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# SPDX-FileCopyrightText: 2023 German Aerospace Center (DLR)
# SPDX-License-Identifier: Apache-2.0
# This script runs the provided TBT on eight logfiles and stores the results in the res-folder.
#!/bin/bash
# Build the Rust project
if grep -q docker /proc/1/cgroup; then
echo "Running inside a Docker container."
else
echo "Not running inside a Docker container."
cargo build --release
fi
# Define variables
previous_pwd="$(pwd)"
# Get the directory of the script
script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $script_dir
# Use find to get a list of directories
directories=$(find "$script_dir/../res/" -mindepth 1 -type d -printf "%P\n")
# Loop through each directory
for dir in $directories; do
dir="../res/${dir}/"
echo "Running Lazy eval with subsampling using ${dir}"
../target/release/tbt-segmentation -l -c -u -s ../specification/shiplanding_formula_combined.tbt --toml "${dir}/subsamplingAndLazy_result.toml" -f $dir> "${dir}/subsamplingAndLazy_result.txt"
python3 infer_parameters_visualization.py "${dir}/subsamplingAndLazy_result.txt"
echo "Running eval with subsampling using ${dir}"
../target/release/tbt-segmentation -c -u -s ../specification/shiplanding_formula_combined.tbt --toml "${dir}/subsampling_result.toml" -f $dir> "${dir}/subsampling_result.txt"
python3 infer_parameters_visualization.py "${dir}/subsampling_result.txt"
done
# Keep the terminal open
cd $previous_pwd
read -p "Press Enter to exit..."