Repository navigation
Expand file tree
/
Copy pathbatch
More file actions
executable file
·46 lines (39 loc) · 1.89 KB
/
Copy pathbatch
File metadata and controls
executable file
·46 lines (39 loc) · 1.89 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
#!/usr/bin/env bash
#
# usage: batch < exe file > < par file > < solver > < log file >
# < exe file > = path of the executable, default BinaryKnapsackBlock_test
# < par file > = BlockSolverConfig file, default BSPar.txt
# < solver > = unused
# < log file > = name of log file, default no log
#
# Cross-check on PURE-BINARY instances (nI = 1): every solver /
# formulation that must give the same integer optimum is attached at once (see
# BSPar.txt) and SolveAll() checks they all agree -- the exact :MILPSolver,
# the full-table / parallel / core DP, and the BranchAndXSolver in each of its
# exploration modes -- while the greedy relaxation must bracket that optimum.
# This replaces the former one-batch-per-formulation correctness tests.
# run from the test directory so BinaryKnapsackBlock_test reads its config files
here="$(cd "$(dirname "$0")" && pwd)"
cd "$here/.." || exit 1
# shared CLI/run helpers - - - - - - - - - - - - - - - - - - - - - - - - - -
source "$here/../../batch_common.sh"
source "$here/bkb_battery.sh"
DEFAULT_EXE=./BinaryKnapsackBlock_test
DEFAULT_PAR=BSPar.txt
# the accuracy each Solver is held to is the dblRelAcc of its ComputeConfig,
# except for the greedy relaxation, the fourth one in BSPar.txt, which is
# held instead to the quality of the bounds it produces on these instances
# (measured worst case over the whole battery: 5.4e-01)
EPS="${EPS:-,,,6e-1}"
parse_batch_args "$@"
# fixed harness parameters - - - - - - - - - - - - - - - - - - - - - - - - -
# (the sweep is leaner than the single-formulation batches: every instance is
# solved by all the ~11 attached solvers)
seed=264
wchg=63
n_repeat=10
nI=1
# sweep- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sweep N "50 100 200" delta "0.01 0.1 0.6" nW "0 0.2" nP "0 0.2" \
nM "0 0.2" -- bkb_run
# the end - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -