#!/usr/bin/env bash
# Shared configuration for the flame-chart profiling of the GVNS solver.
# Sourced by build_prof.sh, validate.sh and profile.sh.

# Repo that holds the sources + instance files, and where the CSV lives.
REPO="/home/tomcaa/Documents/AC/DR/Rad/2026/dckmst_rework"
# This analysis directory (all generated artefacts live under here).
ANALIZA="/home/tomcaa/Documents/AC/DR/Rad/2026/dckmst_rework_analiza/flamecharts"
BIN="${ANALIZA}/dckmst_prof"
OUT="${ANALIZA}/out"
CSV="${REPO}/results_20260519_stdgen.csv"

# The single config that produced results_20260519_stdgen.csv.
COMMON_FLAGS="--shake3 --vnd2bi --vnd3bi --no-vnd4 --vnd-order 1234 --max-time 300"

# Three representative runs, confirmed with the user.
# Format per entry: name|d|k|file|k_max|iters|seed|best_known
CASES=(
  "light|4|75|Instances/R100n1.txt|74|100000|4|4.9390"
  "medium|2|50|Instances/SYM500.txt|49|100000|25|1759.0000"
#  "hard|5|75|Instances/m300n1.txt|74|100000|25|2.1599"
  "ch|3|80|TSPLIB/ch150.tsp|79|100000|19|2642.0417"
)

# Build the positional argument list for one case entry (no --csv, no perf).
# Usage: args_for "$case_entry"  -> echoes:  d k file k_max iters seed <COMMON> --best-known bk
args_for() {
  local IFS='|'; read -r name d k file kmax iters seed bk <<< "$1"
  echo "${d} ${k} ${REPO}/${file} ${kmax} ${iters} ${seed} ${COMMON_FLAGS} --best-known ${bk}"
}
