Skip to content

Commit 2905d3a

Browse files
committed
replaces Data_path by DataInput_path
1 parent fb2fbca commit 2905d3a

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/io.jl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ end
2323
- `transmission.csv` with fields `M`, `cost`, `dist`, `lifetime`, `C`, `B`
2424
- `storage.csv` with fields `xi`, `cost`, `lifetime`, `C`, `b0_1, ..., b0_n`
2525
# Arguments
26-
- `Data_path::AbstractString`: Path to the instance directory.
26+
- `DataInput_path::AbstractString`: Path to the instance directory.
2727
"""
2828
## Params for small instance
2929

@@ -44,7 +44,7 @@ function Params(DataInput_path::AbstractString, Instances_path::AbstractString)
4444
H = indices["H"] |> Array{Int}
4545

4646
# Load constant parameters
47-
constants = JSON.parsefile(joinpath(Data_path, "constants.json"))
47+
constants = JSON.parsefile(joinpath(DataInput_path, "constants.json"))
4848
κ = constants["kappa"]
4949
μ = constants["mu"]
5050
C = constants["C"]
@@ -257,16 +257,16 @@ end
257257

258258
"""Reads wind, solar and hydro data produced by the GlobalEnergyGIS package into CSV node files.
259259
# Arguments
260-
- `Data_path::AbstractString`: Path to the instance directory.
260+
- `DataInput_path::AbstractString`: Path to the instance directory.
261261
- `era_year::AbstractString`: Year of the ERA5 data used in the GlobalEnergyGIS package.
262262
- `era_year::AbstractString`: Name of the GIS region used.
263263
"""
264-
function create_nodedata(Data_path::AbstractString, era_year::AbstractString, gisregion::AbstractString)
264+
function create_nodedata(DataInput_path::AbstractString, era_year::AbstractString, gisregion::AbstractString)
265265

266266
#Read files
267-
solarvars = matread(joinpath(Data_path, "GISdata_solar$(era_year)_$gisregion.mat"))
268-
windvars = matread(joinpath(Data_path, "GISdata_wind$(era_year)_$gisregion.mat"))
269-
hydrovars = matread(joinpath(Data_path, "GISdata_hydro_$gisregion.mat"))
267+
solarvars = matread(joinpath(DataInput_path, "GISdata_solar$(era_year)_$gisregion.mat"))
268+
windvars = matread(joinpath(DataInput_path, "GISdata_wind$(era_year)_$gisregion.mat"))
269+
hydrovars = matread(joinpath(DataInput_path, "GISdata_hydro_$gisregion.mat"))
270270
demandvars = load(joinpath(instance_path, "SyntheticDemand_$(gisregion)_$(era_year).jld"), "demand")
271271

272272
#Solar
@@ -390,7 +390,7 @@ function create_nodedata(Data_path::AbstractString, era_year::AbstractString, gi
390390
nodedata[:,6] = hydRoR_in[:,i]
391391
nodedata = convert(DataFrame, nodedata)
392392
rename!(nodedata, ["Demand", "Avail_Sol", "Avail_Wind_On", "Avail_Wind_Off", "Hyd_In", "HydRoR_In"])
393-
CSV.write(joinpath(Data_path, "nodes", "$i.csv"), nodedata)
393+
CSV.write(joinpath(DataInput_path, "nodes", "$i.csv"), nodedata)
394394
end
395395
end
396396

0 commit comments

Comments
 (0)