holgerteichgraeber / TimeSeriesClustering.jl

Julia implementation of unsupervised learning methods for time series datasets. It provides functionality for clustering and aggregating, detecting motifs, and quantifying similarity between time series datasets.
MIT License
82 stars 23 forks source link

Loading GER_18 data errs #86

Closed holgerteichgraeber closed 5 years ago

holgerteichgraeber commented 5 years ago

When I do

data_path=normpath(joinpath(dirname(@__FILE__),"..","data","TS_GER_18"))
ts_input_data = load_timeseries_data(data_path; T=24, years=[2016])

I get the following error:

┌ Error: The time_series dena21 has K=0 != K=366 of the previous
└ @ ClustForOpt ~/.julia/dev/ClustForOpt/src/utils/load_data.jl:80
ERROR: LoadError: BoundsError: attempt to access 0-element Array{Float64,1} at index [1:8784]
Stacktrace:
 [1] throw_boundserror(::Array{Float64,1}, ::Tuple{UnitRange{Int64}}) at ./abstractarray.jl:484
 [2] checkbounds at ./abstractarray.jl:449 [inlined]
 [3] getindex(::Array{Float64,1}, ::UnitRange{Int64}) at ./array.jl:735
 [4] #add_timeseries_data!#13(::Int64, ::Int64, ::Array{Int64,1}, ::Function, ::Dict{String,Array}, ::SubString{String}, ::DataFrames.DataFrame) at /home/holger/.julia/dev/ClustForOpt/src/utils/load_data.jl:84
 [5] #add_timeseries_data! at /home/holger/.julia/dev/ClustForOpt/src/utils/load_data.jl:0 [inlined]
 [6] #add_timeseries_data!#12(::Int64, ::Int64, ::Array{Int64,1}, ::Function, ::Dict{String,Array}, ::SubString{String}, ::String) at /home/holger/.julia/dev/ClustForOpt/src/utils/load_data.jl:58
 [7] (::getfield(ClustForOpt, Symbol("#kw##add_timeseries_data!")))(::NamedTuple{(:K, :T, :years),Tuple{Int64,Int64,Array{Int64,1}}}, ::typeof(ClustForOpt.add_timeseries_data!), ::Dict{String,Array}, ::SubString{String}, ::String) at ./none:0
 [8] #load_timeseries_data#11(::String, ::Int64, ::Array{Int64,1}, ::Array{String,1}, ::Function, ::String) at /home/holger/.julia/dev/ClustForOpt/src/utils/load_data.jl:29
 [9] (::getfield(ClustForOpt, Symbol("#kw##load_timeseries_data")))(::NamedTuple{(:T, :years),Tuple{Int64,Array{Int64,1}}}, ::typeof(load_timeseries_data), ::String) at ./none:0
 [10] top-level scope at none:0

@YoungFaithful do you get the same error on your computer?

When I test the ClustForOpt version #84 in CapacityExpansion, the transmission cases give errors in the test run (which are the only ones that load GER_18 data), this may be one reason.

holgerteichgraeber commented 5 years ago

Closed with #84 . Wind data for 2016 was not included in the data files. Problem still persists in CapacityExpansion testing for GER_18 node.