From 147e42ed694e4fe180487ec0ab996abb0367a590 Mon Sep 17 00:00:00 2001 From: Lauren Clisby Date: Wed, 25 Oct 2023 14:46:59 +0200 Subject: [PATCH] Fixed benchmark "redefinition of constant" warning --- benchmark/benchmarks.jl | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/benchmark/benchmarks.jl b/benchmark/benchmarks.jl index eff64df9..81daff6d 100644 --- a/benchmark/benchmarks.jl +++ b/benchmark/benchmarks.jl @@ -6,23 +6,23 @@ const SUITE = BenchmarkGroup() SUITE["io"] = BenchmarkGroup() SUITE["model"] = BenchmarkGroup() -const INPUT_FOLDER = joinpath(@__DIR__, "..", "test", "inputs", "Norse") -const OUTPUT_FOLDER = joinpath(@__DIR__, "..", "test", "outputs") +const INPUT_FOLDER_BM = joinpath(@__DIR__, "..", "test", "inputs", "Norse") +const OUTPUT_FOLDER_BM = joinpath(@__DIR__, "..", "test", "outputs") SUITE["io"]["input"] = @benchmarkable begin - create_parameters_and_sets_from_file($INPUT_FOLDER) + create_parameters_and_sets_from_file($INPUT_FOLDER_BM) end -parameters, sets = create_parameters_and_sets_from_file(INPUT_FOLDER) +parameters, sets = create_parameters_and_sets_from_file(INPUT_FOLDER_BM) SUITE["io"]["graph"] = @benchmarkable begin create_graph( - $(joinpath(INPUT_FOLDER, "assets-data.csv")), - $(joinpath(INPUT_FOLDER, "flows-data.csv")), + $(joinpath(INPUT_FOLDER_BM, "assets-data.csv")), + $(joinpath(INPUT_FOLDER_BM, "flows-data.csv")), ) end graph = create_graph( - joinpath(INPUT_FOLDER, "assets-data.csv"), - joinpath(INPUT_FOLDER, "flows-data.csv"), + joinpath(INPUT_FOLDER_BM, "assets-data.csv"), + joinpath(INPUT_FOLDER_BM, "flows-data.csv"), ) SUITE["model"]["create_model"] = @benchmarkable begin @@ -39,7 +39,7 @@ solution = solve_model(model) SUITE["io"]["output"] = @benchmarkable begin save_solution_to_file( - $OUTPUT_FOLDER, + $OUTPUT_FOLDER_BM, $(sets.assets_investment), $(solution.assets_investment), $(parameters.assets_unit_capacity),