##---------------------------- # Sets ##---------------------------- REGIONS = ["SE", "NO", "DK"] # create the set for regions #### Add the rest of the sets here! ##### ##---------------------------- # Parameters ##---------------------------- # Read the data files and create a dictionary for each profile. # When calling, writing demandProfile[r][t] gives the value # for region r at time step t. using DelimitedFiles # Demand profile Data = readdlm("elGen_demand8760.dat", ' ',Any,'\n') demandProfile = Dict{String,Vector{Float64}}() for region in REGIONS demandProfile[region] = Data[Data[:,1].==region,3] end # Hydro profile Data = readdlm("elGen_hydro8760.dat", ' ',Any,'\n') hydroProfile = Dict{String,Vector{Float64}}() for region in REGIONS hydroProfile[region] = Data[Data[:,1].==region,3] end # Wind profile Data = readdlm("elGen_wind8760.dat", ' ',Any,'\n') windProfile = Dict{String,Vector{Float64}}() for region in REGIONS windProfile[region] = Data[Data[:,1].==region,3] end # An example of how to create a dictionary of values. # demandTot[r] gives the value for region r. demandTot = Dict([ # The total annual demand [GWh] ("SE", 147200) ("NO", 131800) ("DK", 35500)]) #### Add the rest of the parameters here! #####