Skip to content

Commit

Permalink
Clean run_tests.py script
Browse files Browse the repository at this point in the history
  • Loading branch information
fontanf committed Apr 15, 2024
1 parent 2682536 commit 467f4e0
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 31 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ python3 scripts/download_data.py

Then, examples can be executed as follows:
```shell
./instance/bin/treesearchsolver_sequential_ordering --verbosity-level 1 --input "./data/sequential_ordering/soplib/R.700.1000.60.sop" --format soplib --algorithm iterative-beam-search --certificate solution.txt
./install/bin/treesearchsolver_sequential_ordering --verbosity-level 1 --input "./data/sequential_ordering/soplib/R.700.1000.60.sop" --format soplib --algorithm iterative-beam-search --certificate solution.txt
```
```
======================================
Expand Down
60 changes: 30 additions & 30 deletions scripts/run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
print("-------------------------------")
print()

knapsack_with_conflicts_data_dir = os.environ['KNAPSACK_WITH_CONFLICTS_DATA']
knapsack_with_conflicts_data = [
data_dir = os.environ['KNAPSACK_WITH_CONFLICTS_DATA']
data = [
(os.path.join("hifi2006", "I1 - I10", "1I1"), "hifi2006"),
(os.path.join("hifi2006", "I1 - I10", "2I2"), "hifi2006"),
(os.path.join("hifi2006", "I1 - I10", "3I3"), "hifi2006"),
Expand All @@ -30,13 +30,13 @@
(os.path.join("hifi2006", "I1 - I10", "8I3"), "hifi2006"),
(os.path.join("hifi2006", "I1 - I10", "9I4"), "hifi2006"),
(os.path.join("hifi2006", "I1 - I10", "10I5"), "hifi2006")]
knapsack_with_conflicts_main = os.path.join(
main = os.path.join(
"install",
"bin",
"treesearchsolver_knapsack_with_conflicts")
for instance, instance_format in knapsack_with_conflicts_data:
for instance, instance_format in data:
instance_path = os.path.join(
knapsack_with_conflicts_data_dir,
data_dir,
instance)
json_output_path = os.path.join(
args.directory,
Expand All @@ -45,7 +45,7 @@
if not os.path.exists(os.path.dirname(json_output_path)):
os.makedirs(os.path.dirname(json_output_path))
command = (
knapsack_with_conflicts_main
main
+ " --verbosity-level 1"
+ " --input \"" + instance_path + "\""
+ " --format \"" + instance_format + "\""
Expand All @@ -67,8 +67,8 @@
print("--------------------------------------------------------------")
print()

flowshop_scheduling_data_dir = os.environ['FLOWSHOP_SCHEDULING_DATA']
permutation_flowshop_scheduling_tct_data = [
data_dir = os.environ['FLOWSHOP_SCHEDULING_DATA']
data = [
(os.path.join("taillard1993", "tai20_5_0.txt"), "default"),
(os.path.join("taillard1993", "tai20_5_1.txt"), "default"),
(os.path.join("taillard1993", "tai20_5_2.txt"), "default"),
Expand All @@ -79,13 +79,13 @@
(os.path.join("taillard1993", "tai20_5_7.txt"), "default"),
(os.path.join("taillard1993", "tai20_5_8.txt"), "default"),
(os.path.join("taillard1993", "tai20_5_9.txt"), "default")]
permutation_flowshop_scheduling_tct_main = os.path.join(
main = os.path.join(
"install",
"bin",
"treesearchsolver_permutation_flowshop_scheduling_tct")
for instance, instance_format in permutation_flowshop_scheduling_tct_data:
for instance, instance_format in data:
instance_path = os.path.join(
flowshop_scheduling_data_dir,
data_dir,
instance)
json_output_path = os.path.join(
args.directory,
Expand All @@ -94,7 +94,7 @@
if not os.path.exists(os.path.dirname(json_output_path)):
os.makedirs(os.path.dirname(json_output_path))
command = (
permutation_flowshop_scheduling_tct_main
main
+ " --verbosity-level 1"
+ " --input \"" + instance_path + "\""
+ " --format \"" + instance_format + "\""
Expand All @@ -116,8 +116,8 @@
print("-------------------------------------------------")
print()

flowshop_scheduling_data_dir = os.environ['FLOWSHOP_SCHEDULING_DATA']
permutation_flowshop_scheduling_makespan_data = [
data_dir = os.environ['FLOWSHOP_SCHEDULING_DATA']
data = [
(os.path.join("vallada2015", "Small", "VFR10_5_1_Gap.txt"), "default"),
(os.path.join("vallada2015", "Small", "VFR10_5_2_Gap.txt"), "default"),
(os.path.join("vallada2015", "Small", "VFR10_5_3_Gap.txt"), "default"),
Expand All @@ -128,13 +128,13 @@
(os.path.join("vallada2015", "Small", "VFR10_5_8_Gap.txt"), "default"),
(os.path.join("vallada2015", "Small", "VFR10_5_9_Gap.txt"), "default"),
(os.path.join("vallada2015", "Small", "VFR10_5_10_Gap.txt"), "default")]
permutation_flowshop_scheduling_makespan_main = os.path.join(
main = os.path.join(
"install",
"bin",
"treesearchsolver_permutation_flowshop_scheduling_makespan")
for instance, instance_format in permutation_flowshop_scheduling_makespan_data:
for instance, instance_format in data:
instance_path = os.path.join(
flowshop_scheduling_data_dir,
data_dir,
instance)
json_output_path = os.path.join(
args.directory,
Expand All @@ -143,7 +143,7 @@
if not os.path.exists(os.path.dirname(json_output_path)):
os.makedirs(os.path.dirname(json_output_path))
command = (
permutation_flowshop_scheduling_makespan_main
main
+ " --verbosity-level 1"
+ " --input \"" + instance_path + "\""
+ " --format \"" + instance_format + "\""
Expand All @@ -165,8 +165,8 @@
print("---------------------------")
print()

sequential_ordering_data_dir = os.environ['SEQUENTIAL_ORDERING_DATA']
sequential_ordering_data = [
data_dir = os.environ['SEQUENTIAL_ORDERING_DATA']
data = [
(os.path.join("soplib", "R.200.100.1.sop"), "soplib"),
(os.path.join("soplib", "R.200.100.15.sop"), "soplib"),
(os.path.join("soplib", "R.200.100.30.sop"), "soplib"),
Expand All @@ -175,13 +175,13 @@
(os.path.join("soplib", "R.200.1000.15.sop"), "soplib"),
(os.path.join("soplib", "R.200.1000.30.sop"), "soplib"),
(os.path.join("soplib", "R.200.1000.60.sop"), "soplib")]
sequential_ordering_main = os.path.join(
main = os.path.join(
"install",
"bin",
"treesearchsolver_sequential_ordering")
for instance, instance_format in sequential_ordering_data:
for instance, instance_format in data:
instance_path = os.path.join(
sequential_ordering_data_dir,
data_dir,
instance)
json_output_path = os.path.join(
args.directory,
Expand All @@ -190,7 +190,7 @@
if not os.path.exists(os.path.dirname(json_output_path)):
os.makedirs(os.path.dirname(json_output_path))
command = (
sequential_ordering_main
main
+ " --verbosity-level 1"
+ " --input \"" + instance_path + "\""
+ " --format \"" + instance_format + "\""
Expand All @@ -212,8 +212,8 @@
print("-----------------------------------------")
print()

simple_assembly_line_balancing_1_data_dir = os.environ['SIMPLE_ASSEMBLY_LINE_BALANCING_1_DATA']
simple_assembly_line_balancing_1_data = [
data_dir = os.environ['SIMPLE_ASSEMBLY_LINE_BALANCING_1_DATA']
data = [
(os.path.join("otto2013", "medium data set_n=50", "instance_n=50_50.alb"), "otto2013"),
(os.path.join("otto2013", "medium data set_n=50", "instance_n=50_100.alb"), "otto2013"),
(os.path.join("otto2013", "medium data set_n=50", "instance_n=50_150.alb"), "otto2013"),
Expand All @@ -224,13 +224,13 @@
(os.path.join("otto2013", "medium data set_n=50", "instance_n=50_400.alb"), "otto2013"),
(os.path.join("otto2013", "medium data set_n=50", "instance_n=50_450.alb"), "otto2013"),
(os.path.join("otto2013", "medium data set_n=50", "instance_n=50_500.alb"), "otto2013")]
simple_assembly_line_balancing_1_main = os.path.join(
main = os.path.join(
"install",
"bin",
"treesearchsolver_simple_assembly_line_balancing_1")
for instance, instance_format in simple_assembly_line_balancing_1_data:
for instance, instance_format in data:
instance_path = os.path.join(
simple_assembly_line_balancing_1_data_dir,
data_dir,
instance)
json_output_path = os.path.join(
args.directory,
Expand All @@ -239,7 +239,7 @@
if not os.path.exists(os.path.dirname(json_output_path)):
os.makedirs(os.path.dirname(json_output_path))
command = (
simple_assembly_line_balancing_1_main
main
+ " --verbosity-level 1"
+ " --input \"" + instance_path + "\""
+ " --format \"" + instance_format + "\""
Expand Down

0 comments on commit 467f4e0

Please sign in to comment.