-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbatch
More file actions
executable file
·55 lines (43 loc) · 1.86 KB
/
Copy pathbatch
File metadata and controls
executable file
·55 lines (43 loc) · 1.86 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/usr/bin/env bash
#
# usage: batch < exe file > < par file >
# < exe file > = path of the executable file, default ./MCFBlock_test
# < par file > = BlockSolverConfig file, default BSPar.txt
#
# runs net/goto MCF instances of several sizes through the MCFBlock-vs-MILP
# comparison, over 3 seeds each
#
# each instance is run twice, with two "what to change" masks:
# - 255 = change everything, arc deletions included: this exercises the full
# remove_arc/add_arc Modification path, but deletions can permanently
# drop arcs needed for feasibility (the emergency recovery can re-open
# closed arcs but cannot un-delete removed ones), so a run may degrade
# into mostly-infeasible cross-checks;
# - 223 = everything *except* arc deletions (255 & ~32): the instance always
# stays feasible, so this is the run that delivers the meaningful
# solution-vs-solution comparisons.
# the two are complementary: 255 for code-path coverage, 223 for comparison
# value.
# shared CLI/run helpers - - - - - - - - - - - - - - - - - - - - - - - - - -
source "$(dirname "$0")/../batch_common.sh"
DATADIR=../../MCFBlock/data
# "what to change" masks: 255 = all (with arc deletions), 223 = all but
# deletions (255 & ~32); see the header for the rationale
wchg_list="255 223"
#rounds=40
MCFBlock_test=${1:-./MCFBlock_test}
par=${2:-BSPar.txt}
for type in net goto; do
for (( seed = 0; seed < 3 ; seed++ )); do
#for sz in 8_8 8_32 10_8 10_64 12_8 14_8
for sz in 8_8 8_32 10_8 10_64 12_8; do
for h in 1 2 3 4 5; do
what=${DATADIR}/nc4/${type}${sz}_${h}.nc4
for wchg in $wchg_list; do
run_test "$MCFBlock_test" "$what" -S "$par" -e "$seed" -k "$wchg"
done # wchg
done # h
done # sz
done # seed
done # type
# the end - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -