#!/bin/bash
logfile=generate_benchmarks_and_reports.log
date > $logfile
for method in CEPS Foldover_Free OptCuts SLIM Tutte
do
    if [[ $method = OptCuts ]]
    then
        disk=any
        closed=any
        cut="-u"
    else
        disk=yes
        closed=no
        cut=""
    fi
    echo Running benchmark for $method
    echo Running benchmark for $method >> $logfile
    # echo python3 benchmark.py -d ../../pub/dataset/Obj_Files/ -m ../../pub/dataset/Method\ Outputs/${method}_Output -o benchmark_${method} ${cut} --closed ${closed} --disk ${disk} --manifold yes
    python3 benchmark.py -d ../../pub/dataset/Obj_Files/ -m ../../pub/dataset/Method\ Outputs/${method}_Output -o benchmark_${method} ${cut} --closed ${closed} --disk ${disk} --manifold yes >> $logfile 2>> $logfile
    echo Generating report for $method
    echo Generating report for $method >> $logfile
    # echo python3 generate_report.py -b benchmark_${method} -n ${method} -o report_${method}
    python3 generate_report.py -b benchmark_${method} -n ${method} -o report_${method} >> $logfile 2>> $logfile
    echo
    echo >> $logfile
done

echo Generating report comparing SLIM and Foldover_Free
echo Generating report comparing SLIM and Foldover_Free >> $logfile
# echo python3 generate_report.py -b benchmark_SLIM benchmark_Foldover_Free -n SLIM Foldover_Free -o report_SLIM_vs_Foldover_Free
python3 generate_report.py -b benchmark_SLIM benchmark_Foldover_Free -n SLIM Foldover_Free -o report_SLIM_vs_Foldover_Free
echo Done
echo Done >> $logfile
