Skip to content

Commit

Permalink
Update column generation
Browse files Browse the repository at this point in the history
  • Loading branch information
fontanf committed Jul 20, 2024
1 parent 3ce1296 commit 68be0ab
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 29 deletions.
2 changes: 1 addition & 1 deletion extern/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ endif()
FetchContent_Declare(
columngenerationsolver
GIT_REPOSITORY https://github.com/fontanf/columngenerationsolver.git
GIT_TAG 9c57300135f8d1ec2a44de4aeb53e0056d24f2f3
GIT_TAG 1414cd0ca3185f301664c9e840aeda20a72e1844
#SOURCE_DIR "${PROJECT_SOURCE_DIR}/../columngenerationsolver/"
EXCLUDE_FROM_ALL)
FetchContent_MakeAvailable(columngenerationsolver)
Expand Down
56 changes: 28 additions & 28 deletions scripts/run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,32 +79,32 @@
(os.path.join("chu1997", "d10100"), "orlibrary"),
]

# if args.tests is None or "greedy" in args.tests:
# print("Column generation heuristic greedy")
# print("----------------------------------")
# print()
if args.tests is None or "greedy" in args.tests:
print("Column generation heuristic greedy")
print("----------------------------------")
print()

# for instance, instance_format in column_generation_data:
# instance_path = os.path.join(
# data_dir,
# instance)
# json_output_path = os.path.join(
# args.directory,
# algorithm.replace("-", "_"),
# instance + ".json")
# if not os.path.exists(os.path.dirname(json_output_path)):
# os.makedirs(os.path.dirname(json_output_path))
# command = (
# generalizedassignmentsolver_main
# + " --verbosity-level 1"
# + " --input \"" + instance_path + "\""
# + " --format \"" + instance_format + "\""
# + " --algorithm \"column-generation-heuristic-greedy\""
# + " --output \"" + json_output_path + "\"")
# print(command)
# status = os.system(command)
# if status != 0:
# sys.exit(1)
# print()
# print()
# print()
for instance, instance_format in column_generation_data:
instance_path = os.path.join(
data_dir,
instance)
json_output_path = os.path.join(
args.directory,
algorithm.replace("-", "_"),
instance + ".json")
if not os.path.exists(os.path.dirname(json_output_path)):
os.makedirs(os.path.dirname(json_output_path))
command = (
generalizedassignmentsolver_main
+ " --verbosity-level 1"
+ " --input \"" + instance_path + "\""
+ " --format \"" + instance_format + "\""
+ " --algorithm \"column-generation-heuristic-greedy\""
+ " --output \"" + json_output_path + "\"")
print(command)
status = os.system(command)
if status != 0:
sys.exit(1)
print()
print()
print()

0 comments on commit 68be0ab

Please sign in to comment.