NREL-Sienna / InfrastructureSystems.jl

Utility package for Sienna's simulation infrastructure
https://nrel-sienna.github.io/InfrastructureSystems.jl/
BSD 3-Clause "New" or "Revised" License
38 stars 20 forks source link

method to retrieve initial time with SingleTimeSeries #253

Open jd-lara opened 2 years ago

jd-lara commented 2 years ago

we need a method similar to get_forecast_initial_timestamp(sys) but for systems with only SingleTimeSeries

jd-lara commented 2 years ago

We currently support the possibility for inconsistent time series. Different lengths and initial times but same resolution across components.

This presents a problem for some simulations since we need to check the consistency of the time series across devices. We need a function that checks that all the SingleTimeSeries have the same initial time and length and also get the initial_time if they are consistent.

It might be possible to still permit inconsistent time series but requires calculating the intersection of time that is valid and that might be more cumbersome.

daniel-thom commented 2 years ago

255 added check_time_series_consistency for SingleTimeSeries. It will return the initial timestamp and length if all time series are consistent. Otherwise, it will throw an exception. This will likely satisfy most use cases for this request. We can leave this issue open to track the addition of determining the intersection of time series with different start and end times.