mirror of
https://github.com/ANL-CEEESA/RELOG.git
synced 2025-12-07 16:18:51 -06:00
Re-add RELOG.write function
This commit is contained in:
@@ -280,10 +280,7 @@ function solve(instance::Instance;
|
||||
solution = get_solution(model, marginal_costs=marginal_costs)
|
||||
|
||||
if output != nothing
|
||||
@info "Writing solution: $output"
|
||||
open(output, "w") do file
|
||||
JSON.print(file, solution, 2)
|
||||
end
|
||||
write(solution, output)
|
||||
end
|
||||
|
||||
return solution
|
||||
|
||||
@@ -255,6 +255,12 @@ function transportation_emissions_report(solution)::DataFrame
|
||||
return df
|
||||
end
|
||||
|
||||
function write(solution::AbstractDict, filename::AbstractString)
|
||||
@info "Writing solution: $filename"
|
||||
open(filename, "w") do file
|
||||
JSON.print(file, solution, 2)
|
||||
end
|
||||
end
|
||||
|
||||
write_plants_report(solution, filename) =
|
||||
CSV.write(filename, plants_report(solution))
|
||||
|
||||
Reference in New Issue
Block a user