mirror of
https://github.com/ANL-CEEESA/RELOG.git
synced 2025-12-05 23:38:52 -06:00
Casebuilder: Add MapBlock; fix zip paths
This commit is contained in:
@@ -91,8 +91,10 @@ function solve(root, filename)
|
||||
end
|
||||
|
||||
function solve_recursive(path)
|
||||
cd(path)
|
||||
|
||||
# Solve instances
|
||||
for (root, dirs, files) in walkdir(path)
|
||||
for (root, dirs, files) in walkdir(".")
|
||||
if occursin(r"scenarios"i, root)
|
||||
continue
|
||||
end
|
||||
@@ -104,7 +106,7 @@ function solve_recursive(path)
|
||||
|
||||
# Collect results
|
||||
results = []
|
||||
for (root, dirs, files) in walkdir(path)
|
||||
for (root, dirs, files) in walkdir(".")
|
||||
for filename in files
|
||||
endswith(filename, "_plants.csv") || continue
|
||||
push!(
|
||||
@@ -116,11 +118,11 @@ function solve_recursive(path)
|
||||
)
|
||||
end
|
||||
end
|
||||
open("$path/output.json", "w") do file
|
||||
open("output.json", "w") do file
|
||||
JSON.print(file, results)
|
||||
end
|
||||
|
||||
run(`zip -r $path/output.zip $path`)
|
||||
run(`zip -r output.zip .`)
|
||||
end
|
||||
|
||||
solve_recursive(ARGS[1])
|
||||
Reference in New Issue
Block a user