Skip to content

Commit

Permalink
Merge pull request #2 from fontanf/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
fontanf authored Apr 15, 2024
2 parents 2682536 + ea3a084 commit dca5b35
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 36 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ Algorithms:

Data can be downloaded from [fontanf/orproblems](https://github.com/fontanf/orproblems)

[Sequential ordering problem](include/examples/sequential_ordering.hpp)
[Sequential ordering problem](include/treesearchsolver/examples/sequential_ordering.hpp)

* The branching scheme is taken from "Tree search for the sequential ordering problem" (Libralesso et al., 2020) [PDF](https://ecai2020.eu/papers/1126_paper.pdf).
* It is a forward branching scheme.
* The guide of a node is its bound.
* This implementation returns state-of-the-art results on the instances of the scientific literature with a dense precedence graph.

[Permutation flow shop scheduling problem, makespan](include/examples/permutation_flowshop_scheduling_makespan.hpp) and [Permutation flow shop scheduling problem, total completion time](include/examples/permutationflowshopschedulingtct.hpp)
[Permutation flow shop scheduling problem, makespan](include/treesearchsolver/examples/permutation_flowshop_scheduling_makespan.hpp) and [Permutation flow shop scheduling problem, total completion time](include/treesearchsolver/examples/permutationflowshopschedulingtct.hpp)

* The branching schemes are taken from "Iterative beam search algorithms for the permutation flowshop" (Libralesso et al., 2022) [DOI](https://doi.org/10.1016/j.ejor.2021.10.015).
* For the makespan variant, it is a bidirectional branching scheme.
Expand All @@ -48,9 +48,9 @@ Data can be downloaded from [fontanf/orproblems](https://github.com/fontanf/orpr

* Here, the library is used to implement an exact dynamic programming algorithm implemented as a tree search

[Knapsack problem with conflicts](include/examples/knapsack_with_conflicts.hpp)
[Knapsack problem with conflicts](include/treesearchsolver/examples/knapsack_with_conflicts.hpp)

[Simple assembly line balancing problem of type 1 (SALBP-1)](include/examples/simple_assembly_line_balancing_1.hpp)
[Simple assembly line balancing problem of type 1 (SALBP-1)](include/treesearchsolver/examples/simple_assembly_line_balancing_1.hpp)

## Usage, running examples from command line

Expand All @@ -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
2 changes: 1 addition & 1 deletion extern/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ include(FetchContent)
FetchContent_Declare(
orproblems
GIT_REPOSITORY https://github.com/fontanf/orproblems.git
GIT_TAG e9a58e010f7dc0ca7b5eea2358ed11d386f8622a)
GIT_TAG b9e5b32ea612fd2cf23e71de0a969b6dd56ae5d3)
#SOURCE_DIR "${PROJECT_SOURCE_DIR}/../orproblems/")
FetchContent_MakeAvailable(orproblems)
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 dca5b35

Please sign in to comment.