InfrastructureSystems API Reference
InfrastructureSystems.CompressionSettings
— TypeProvides customization of HDF5 compression settings. Refer to the HDF5.jl and HDF5 documention for more information.
InfrastructureSystems.DataFormatError
— TypeThrown upon detection of user data that is not supported.
InfrastructureSystems.Deterministic
— Typemutable struct Deterministic <: AbstractDeterministic
+API · InfrastructureSystems.jl InfrastructureSystems API Reference
InfrastructureSystems.CompressionSettings
— TypeProvides customization of HDF5 compression settings. Refer to the HDF5.jl and HDF5 documention for more information.
sourceInfrastructureSystems.DataFormatError
— TypeThrown upon detection of user data that is not supported.
sourceInfrastructureSystems.Deterministic
— Typemutable struct Deterministic <: AbstractDeterministic
name::String
data::Union{
SortedDict{Dates.DateTime, Vector{CONSTANT}},
@@ -9,11 +9,11 @@
resolution::Dates.Period
scaling_factor_multiplier::Union{Nothing, Function}
internal::InfrastructureSystemsInternal
-end
A deterministic forecast for a particular data field in a Component.
Arguments
name::String
: user-defined namedata::Union{SortedDict{Dates.DateTime, Vector{CONSTANT}}, SortedDict{Dates.DateTime, Vector{POLYNOMIAL}}, SortedDict{Dates.DateTime, Vector{PWL}}}
: timestamp - scalingfactorresolution::Dates.Period
: forecast resolutionscaling_factor_multiplier::Union{Nothing, Function}
: Applicable when the time series data are scaling factors. Called on the associated component to convert the values.internal::InfrastructureSystemsInternal
sourceInfrastructureSystems.Deterministic
— MethodDeterministic(name::AbstractString, input_data::AbstractDict{Dates.DateTime, var"#s310"} where var"#s310"<:TimeSeries.TimeArray; normalization_factor, scaling_factor_multiplier) -> InfrastructureSystems.Deterministic
-
Construct Deterministic from a Dict of TimeArrays.
Arguments
name::AbstractString
: user-defined nameinput_data::AbstractDict{Dates.DateTime, TimeSeries.TimeArray}
: time series data.normalization_factor::NormalizationFactor = 1.0
: optional normalization factor to apply to each data entryscaling_factor_multiplier::Union{Nothing, Function} = nothing
: If the data are scaling factors then this function will be called on the component and applied to the data when get_time_series_array
is called.timestamp = :timestamp
: If the values are DataFrames is passed then this must be the column name that contains timestamps.
sourceInfrastructureSystems.Deterministic
— MethodDeterministic(name::AbstractString, filename::AbstractString, component::InfrastructureSystems.InfrastructureSystemsComponent, resolution::Dates.Period; normalization_factor, scaling_factor_multiplier) -> InfrastructureSystems.Deterministic
-
Construct Deterministic from a CSV file. The first column must be a timestamp in DateTime format and the columns the values in the forecast window.
Arguments
name::AbstractString
: user-defined namefilename::AbstractString
: name of CSV file containing datacomponent::InfrastructureSystemsComponent
: component associated with the datanormalization_factor::NormalizationFactor = 1.0
: optional normalization factor to apply to each data entryscaling_factor_multiplier::Union{Nothing, Function} = nothing
: If the data are scaling factors then this function will be called on the component and applied to the data when get_time_series_array
is called.
sourceInfrastructureSystems.Deterministic
— MethodDeterministic(name::AbstractString, series_data::InfrastructureSystems.RawTimeSeries, resolution::Dates.Period; normalization_factor, scaling_factor_multiplier) -> InfrastructureSystems.Deterministic
-
Construct Deterministic from RawTimeSeries.
sourceInfrastructureSystems.Deterministic
— MethodDeterministic(forecast::InfrastructureSystems.Deterministic, data) -> InfrastructureSystems.Deterministic
-
Construct a new Deterministic from an existing instance and a subset of data.
sourceInfrastructureSystems.DeterministicMetadata
— Typemutable struct DeterministicMetadata <: ForecastMetadata
+end
A deterministic forecast for a particular data field in a Component.
Arguments
name::String
: user-defined namedata::Union{SortedDict{Dates.DateTime, Vector{CONSTANT}}, SortedDict{Dates.DateTime, Vector{POLYNOMIAL}}, SortedDict{Dates.DateTime, Vector{PWL}}}
: timestamp - scalingfactorresolution::Dates.Period
: forecast resolutionscaling_factor_multiplier::Union{Nothing, Function}
: Applicable when the time series data are scaling factors. Called on the associated component to convert the values.internal::InfrastructureSystemsInternal
sourceInfrastructureSystems.Deterministic
— MethodDeterministic(name::AbstractString, input_data::AbstractDict{Dates.DateTime, var"#s310"} where var"#s310"<:TimeSeries.TimeArray; normalization_factor, scaling_factor_multiplier) -> InfrastructureSystems.Deterministic
+
Construct Deterministic from a Dict of TimeArrays.
Arguments
name::AbstractString
: user-defined nameinput_data::AbstractDict{Dates.DateTime, TimeSeries.TimeArray}
: time series data.normalization_factor::NormalizationFactor = 1.0
: optional normalization factor to apply to each data entryscaling_factor_multiplier::Union{Nothing, Function} = nothing
: If the data are scaling factors then this function will be called on the component and applied to the data when get_time_series_array
is called.timestamp = :timestamp
: If the values are DataFrames is passed then this must be the column name that contains timestamps.
sourceInfrastructureSystems.Deterministic
— MethodDeterministic(name::AbstractString, filename::AbstractString, component::InfrastructureSystems.InfrastructureSystemsComponent, resolution::Dates.Period; normalization_factor, scaling_factor_multiplier) -> InfrastructureSystems.Deterministic
+
Construct Deterministic from a CSV file. The first column must be a timestamp in DateTime format and the columns the values in the forecast window.
Arguments
name::AbstractString
: user-defined namefilename::AbstractString
: name of CSV file containing datacomponent::InfrastructureSystemsComponent
: component associated with the datanormalization_factor::NormalizationFactor = 1.0
: optional normalization factor to apply to each data entryscaling_factor_multiplier::Union{Nothing, Function} = nothing
: If the data are scaling factors then this function will be called on the component and applied to the data when get_time_series_array
is called.
sourceInfrastructureSystems.Deterministic
— MethodDeterministic(name::AbstractString, series_data::InfrastructureSystems.RawTimeSeries, resolution::Dates.Period; normalization_factor, scaling_factor_multiplier) -> InfrastructureSystems.Deterministic
+
Construct Deterministic from RawTimeSeries.
sourceInfrastructureSystems.Deterministic
— MethodDeterministic(forecast::InfrastructureSystems.Deterministic, data) -> InfrastructureSystems.Deterministic
+
Construct a new Deterministic from an existing instance and a subset of data.
sourceInfrastructureSystems.DeterministicMetadata
— Typemutable struct DeterministicMetadata <: ForecastMetadata
name::String
resolution::Dates.Period
initial_timestamp::Dates.DateTime
@@ -24,22 +24,22 @@
time_series_type::Type{<:AbstractDeterministic}
scaling_factor_multiplier::Union{Nothing, Function}
internal::InfrastructureSystemsInternal
-end
A deterministic forecast for a particular data field in a Component.
Arguments
name::String
: user-defined nameresolution::Dates.Period
initial_timestamp::Dates.DateTime
: time series availability timeinterval::Dates.Period
: time step between forecast windowscount::Int
: number of forecast windowstime_series_uuid::UUIDs.UUID
: reference to time series datahorizon::Int
: length of this time seriestime_series_type::Type{<:AbstractDeterministic}
: Type of the time series data associated with this metadata.scaling_factor_multiplier::Union{Nothing, Function}
: Applicable when the time series data are scaling factors. Called on the associated component to convert the values.internal::InfrastructureSystemsInternal
sourceInfrastructureSystems.DeterministicSingleTimeSeries
— Typemutable struct DeterministicSingleTimeSeries <: AbstractDeterministic
+end
A deterministic forecast for a particular data field in a Component.
Arguments
name::String
: user-defined nameresolution::Dates.Period
initial_timestamp::Dates.DateTime
: time series availability timeinterval::Dates.Period
: time step between forecast windowscount::Int
: number of forecast windowstime_series_uuid::UUIDs.UUID
: reference to time series datahorizon::Int
: length of this time seriestime_series_type::Type{<:AbstractDeterministic}
: Type of the time series data associated with this metadata.scaling_factor_multiplier::Union{Nothing, Function}
: Applicable when the time series data are scaling factors. Called on the associated component to convert the values.internal::InfrastructureSystemsInternal
sourceInfrastructureSystems.DeterministicSingleTimeSeries
— Typemutable struct DeterministicSingleTimeSeries <: AbstractDeterministic
single_time_series::SingleTimeSeries
initial_timestamp::Dates.DateTime
interval::Dates.Period
count::Int
horizon::Int
-end
A deterministic forecast for a particular data field in a Component that wraps a SingleTimeSeries.
Arguments
single_time_series::SingleTimeSeries
: wrapped SingleTimeSeries objectinitial_timestamp::Dates.DateTime
: time series availability timeinterval::Dates.Period
: time step between forecast windowscount::Int
: number of forecast windowshorizon::Int
: length of this time series
sourceInfrastructureSystems.DeviceParameter
— TypeBase type for auxillary structs. These should not be stored in a system.
sourceInfrastructureSystems.FileLogger
— TypeSpecializes the behavior of SimpleLogger by adding timestamps and process and thread IDs.
sourceInfrastructureSystems.FlattenIteratorWrapper
— TypeWrapper around Iterators.Flatten to provide total length.
sourceInfrastructureSystems.ForecastCache
— MethodConstruct ForecastCache to automatically control caching of forecast data. Maintains some count of forecast windows in memory based on cache_size_bytes
.
Call Base.iterate or get_next_time_series_array!
to retrieve data. Each iteration will return a TimeSeries.TimeArray covering one forecast window of length $horizon$.
Arguments
::Type{T}
: subtype of Forecastcomponent::InfrastructureSystemsComponent
: componentname::AbstractString
: forecast namestart_time::Union{Nothing, Dates.DateTime} = nothing
: forecast start timehorizon::Union{Nothing, Int} = nothing
: forecast horizoncache_size_bytes = TIME_SERIES_CACHE_SIZE_BYTES
: maximum size of data to keep in memoryignore_scaling_factors = false
: controls whether to ignore scaling_factor_multiplier
in the time series instance
sourceInfrastructureSystems.Hdf5TimeSeriesStorage
— TypeStores all time series data in an HDF5 file.
The file used is assumed to be temporary and will be automatically deleted when there are no more references to the storage object.
sourceInfrastructureSystems.Hdf5TimeSeriesStorage
— MethodHdf5TimeSeriesStorage(create_file::Bool; filename, directory, read_only, compression) -> InfrastructureSystems.Hdf5TimeSeriesStorage
-
Constructs Hdf5TimeSeriesStorage.
Arguments
create_file::Bool
: create new filefilename=nothing
: if nothing, create a temp file, else use this name.directory=nothing
: if set and filename is nothing, create a temp file in this directory. Use tempdir() if not set. This should be set if the time series data is larger than the tmp filesystem can hold.read_only = false
: If true, don't allow changes to the file. Allows simultaneous read access.
sourceInfrastructureSystems.Hdf5TimeSeriesStorage
— MethodHdf5TimeSeriesStorage() -> InfrastructureSystems.Hdf5TimeSeriesStorage
-
Constructs Hdf5TimeSeriesStorage by creating a temp file.
sourceInfrastructureSystems.InMemoryTimeSeriesStorage
— TypeStores all time series data in memory.
sourceInfrastructureSystems.InMemoryTimeSeriesStorage
— MethodInMemoryTimeSeriesStorage(hdf5_storage::InfrastructureSystems.Hdf5TimeSeriesStorage) -> InfrastructureSystems.InMemoryTimeSeriesStorage
-
Constructs InMemoryTimeSeriesStorage from an instance of Hdf5TimeSeriesStorage.
sourceInfrastructureSystems.InfrastructureSystemsComponent
— TypeBase type for structs that are stored in a system.
Required interface functions for subtypes:
- get_name()
- get_internal()
Optional interface functions:
- gettimeseries_container()
Subtypes may contain time series.
sourceInfrastructureSystems.InfrastructureSystemsGeo
— TypeBase type for structs that store infos
Required interface functions for subtypes:
- get_internal()
- getcomponentsuuid()
- gettimeseries_container()
Subtypes may contain time series, if no time series container is implemented return nothing
sourceInfrastructureSystems.InfrastructureSystemsInternal
— TypeInternal storage common to InfrastructureSystems types.
sourceInfrastructureSystems.InfrastructureSystemsInternal
— MethodInfrastructureSystemsInternal(u::Base.UUID) -> InfrastructureSystems.InfrastructureSystemsInternal
-
Creates InfrastructureSystemsInternal with an existing UUID.
sourceInfrastructureSystems.InfrastructureSystemsInternal
— MethodInfrastructureSystemsInternal(; uuid, units_info, ext) -> InfrastructureSystems.InfrastructureSystemsInternal
-
Creates InfrastructureSystemsInternal with a new UUID.
sourceInfrastructureSystems.InfrastructureSystemsSupplementalAttribute
— TypeBase type for structs that store supplemental attributes
Required interface functions for subtypes:
- get_internal()
Optional interface functions:
- gettimeseries_container()
- getcomponentsuuid()
- get_uuid()
Subtypes may contain time series. Which requires
- gettimeseries_container()
sourceInfrastructureSystems.InfrastructureSystemsType
— TypeBase type for any struct in the SIIP packages. All structs must implement a kwarg-only constructor to allow deserializing from a Dict.
sourceInfrastructureSystems.LazyDictFromIterator
— MethodLazyDictFromIterator creates a dictionary from an iterator, but only increments the iterator and adds items to the dictionary as it needs them. In the worst case it is identical to creating a dictionary by iterating over the entire list. Each V should have a K member.
Arguments
K
: type of the dictionary keysV
: type of the dictionary valuesiter
: any object implementing the Iterator interfacegetter::Function
: method to call on V to get its K
sourceInfrastructureSystems.LogEvent
— TypeContains information describing a log event.
sourceInfrastructureSystems.LogEventTracker
— TypeLogEventTracker() -> InfrastructureSystems.LogEventTracker
+end
A deterministic forecast for a particular data field in a Component that wraps a SingleTimeSeries.
Arguments
single_time_series::SingleTimeSeries
: wrapped SingleTimeSeries objectinitial_timestamp::Dates.DateTime
: time series availability timeinterval::Dates.Period
: time step between forecast windowscount::Int
: number of forecast windowshorizon::Int
: length of this time series
sourceInfrastructureSystems.DeviceParameter
— TypeBase type for auxillary structs. These should not be stored in a system.
sourceInfrastructureSystems.FileLogger
— TypeSpecializes the behavior of SimpleLogger by adding timestamps and process and thread IDs.
sourceInfrastructureSystems.FlattenIteratorWrapper
— TypeWrapper around Iterators.Flatten to provide total length.
sourceInfrastructureSystems.ForecastCache
— MethodConstruct ForecastCache to automatically control caching of forecast data. Maintains some count of forecast windows in memory based on cache_size_bytes
.
Call Base.iterate or get_next_time_series_array!
to retrieve data. Each iteration will return a TimeSeries.TimeArray covering one forecast window of length $horizon$.
Arguments
::Type{T}
: subtype of Forecastcomponent::InfrastructureSystemsComponent
: componentname::AbstractString
: forecast namestart_time::Union{Nothing, Dates.DateTime} = nothing
: forecast start timehorizon::Union{Nothing, Int} = nothing
: forecast horizoncache_size_bytes = TIME_SERIES_CACHE_SIZE_BYTES
: maximum size of data to keep in memoryignore_scaling_factors = false
: controls whether to ignore scaling_factor_multiplier
in the time series instance
sourceInfrastructureSystems.Hdf5TimeSeriesStorage
— TypeStores all time series data in an HDF5 file.
The file used is assumed to be temporary and will be automatically deleted when there are no more references to the storage object.
sourceInfrastructureSystems.Hdf5TimeSeriesStorage
— MethodHdf5TimeSeriesStorage(create_file::Bool; filename, directory, read_only, compression) -> InfrastructureSystems.Hdf5TimeSeriesStorage
+
Constructs Hdf5TimeSeriesStorage.
Arguments
create_file::Bool
: create new filefilename=nothing
: if nothing, create a temp file, else use this name.directory=nothing
: if set and filename is nothing, create a temp file in this directory. Use tempdir() if not set. This should be set if the time series data is larger than the tmp filesystem can hold.read_only = false
: If true, don't allow changes to the file. Allows simultaneous read access.
sourceInfrastructureSystems.Hdf5TimeSeriesStorage
— MethodHdf5TimeSeriesStorage() -> InfrastructureSystems.Hdf5TimeSeriesStorage
+
Constructs Hdf5TimeSeriesStorage by creating a temp file.
sourceInfrastructureSystems.InMemoryTimeSeriesStorage
— TypeStores all time series data in memory.
sourceInfrastructureSystems.InMemoryTimeSeriesStorage
— MethodInMemoryTimeSeriesStorage(hdf5_storage::InfrastructureSystems.Hdf5TimeSeriesStorage) -> InfrastructureSystems.InMemoryTimeSeriesStorage
+
Constructs InMemoryTimeSeriesStorage from an instance of Hdf5TimeSeriesStorage.
sourceInfrastructureSystems.InfrastructureSystemsComponent
— TypeBase type for structs that are stored in a system.
Required interface functions for subtypes:
- get_name()
- get_internal()
Optional interface functions:
- gettimeseries_container()
- getsupplementalattributes_container()
Subtypes may contain time series.
sourceInfrastructureSystems.InfrastructureSystemsGeo
— TypeBase type for structs that store attributes
Required interface functions for subtypes:
- get_internal()
- getcomponentsuuids()
- gettimeseries_container()
Subtypes may contain time series, if no time series container is implemented return nothing
sourceInfrastructureSystems.InfrastructureSystemsInternal
— TypeInternal storage common to InfrastructureSystems types.
sourceInfrastructureSystems.InfrastructureSystemsInternal
— MethodInfrastructureSystemsInternal(u::Base.UUID) -> InfrastructureSystems.InfrastructureSystemsInternal
+
Creates InfrastructureSystemsInternal with an existing UUID.
sourceInfrastructureSystems.InfrastructureSystemsInternal
— MethodInfrastructureSystemsInternal(; uuid, units_info, ext) -> InfrastructureSystems.InfrastructureSystemsInternal
+
Creates InfrastructureSystemsInternal with a new UUID.
sourceInfrastructureSystems.InfrastructureSystemsSupplementalAttribute
— TypeBase type for structs that store supplemental attributes
Required interface functions for subtypes:
- get_internal()
Optional interface functions:
- gettimeseries_container()
- getcomponentsuuids()
- get_uuid()
Subtypes may contain time series. Which requires
- gettimeseries_container()
sourceInfrastructureSystems.InfrastructureSystemsType
— TypeBase type for any struct in the SIIP packages. All structs must implement a kwarg-only constructor to allow deserializing from a Dict.
sourceInfrastructureSystems.LazyDictFromIterator
— MethodLazyDictFromIterator creates a dictionary from an iterator, but only increments the iterator and adds items to the dictionary as it needs them. In the worst case it is identical to creating a dictionary by iterating over the entire list. Each V should have a K member.
Arguments
K
: type of the dictionary keysV
: type of the dictionary valuesiter
: any object implementing the Iterator interfacegetter::Function
: method to call on V to get its K
sourceInfrastructureSystems.LogEvent
— TypeContains information describing a log event.
sourceInfrastructureSystems.LogEventTracker
— TypeLogEventTracker() -> InfrastructureSystems.LogEventTracker
LogEventTracker(levels) -> InfrastructureSystems.LogEventTracker
Tracks counts of all log events by level.
Examples
LogEventTracker()
-LogEventTracker((Logging.Info, Logging.Warn, Logging.Error))
sourceInfrastructureSystems.MultiLogger
— TypeRedirects log events to multiple loggers. The primary use case is to allow logging to both a file and the console. Secondarily, it can track the counts of all log messages.
Example
MultiLogger([TerminalLogger(stderr), SimpleLogger(stream)], LogEventTracker())
sourceInfrastructureSystems.MultiLogger
— MethodMultiLogger(loggers::Array{T<:Base.CoreLogging.AbstractLogger, N} where N) -> InfrastructureSystems.MultiLogger
-
Creates a MultiLogger with no event tracking.
Example
MultiLogger([TerminalLogger(stderr), SimpleLogger(stream)])
sourceInfrastructureSystems.Probabilistic
— Typemutable struct Probabilistic <: Forecast
+LogEventTracker((Logging.Info, Logging.Warn, Logging.Error))
sourceInfrastructureSystems.MultiLogger
— TypeRedirects log events to multiple loggers. The primary use case is to allow logging to both a file and the console. Secondarily, it can track the counts of all log messages.
Example
MultiLogger([TerminalLogger(stderr), SimpleLogger(stream)], LogEventTracker())
sourceInfrastructureSystems.MultiLogger
— MethodMultiLogger(loggers::Array{T<:Base.CoreLogging.AbstractLogger, N} where N) -> InfrastructureSystems.MultiLogger
+
Creates a MultiLogger with no event tracking.
Example
MultiLogger([TerminalLogger(stderr), SimpleLogger(stream)])
sourceInfrastructureSystems.Probabilistic
— Typemutable struct Probabilistic <: Forecast
name::String
resolution::Dates.Period
percentiles::Vector{Float64}
@@ -50,10 +50,10 @@
}
scaling_factor_multiplier::Union{Nothing, Function}
internal::InfrastructureSystemsInternal
-end
A Probabilistic forecast for a particular data field in a Component.
Arguments
name::String
: user-defined nameresolution::Dates.Period
: forecast resolutionpercentiles::Vector{Float64}
: Percentiles for the probabilistic forecastdata::Union{SortedDict{Dates.DateTime, Matrix{CONSTANT}}, SortedDict{Dates.DateTime, Matrix{POLYNOMIAL}}, SortedDict{Dates.DateTime, Matrix{PWL}}}
: timestamp - scalingfactorscaling_factor_multiplier::Union{Nothing, Function}
: Applicable when the time series data are scaling factors. Called on the associated component to convert the values.internal::InfrastructureSystemsInternal
sourceInfrastructureSystems.Probabilistic
— MethodProbabilistic(name::AbstractString, input_data::AbstractDict, percentiles::Vector{T} where T, resolution::Dates.Period; normalization_factor, scaling_factor_multiplier) -> InfrastructureSystems.Probabilistic
-
Construct Probabilistic from a SortedDict of Arrays.
Arguments
name::AbstractString
: user-defined nameinput_data::AbstractDict{Dates.DateTime, Matrix{Float64}}
: time series data.percentiles
: Percentiles represented in the probabilistic forecastresolution::Dates.Period
: The resolution of the forecast in Dates.Period`normalization_factor::NormalizationFactor = 1.0
: optional normalization factor to apply to each data entryscaling_factor_multiplier::Union{Nothing, Function} = nothing
: If the data are scaling factors then this function will be called on the component and applied to the data when get_time_series_array
is called.
sourceInfrastructureSystems.Probabilistic
— MethodProbabilistic(name::AbstractString, input_data::AbstractDict{Dates.DateTime, var"#s310"} where var"#s310"<:TimeSeries.TimeArray, percentiles::Vector{Float64}; normalization_factor, scaling_factor_multiplier) -> InfrastructureSystems.Probabilistic
-
Construct Probabilistic from a Dict of TimeArrays.
Arguments
name::AbstractString
: user-defined nameinput_data::AbstractDict{Dates.DateTime, TimeSeries.TimeArray}
: time series data.percentiles
: Percentiles represented in the probabilistic forecastnormalization_factor::NormalizationFactor = 1.0
: optional normalization factor to apply to each data entryscaling_factor_multiplier::Union{Nothing, Function} = nothing
: If the data are scaling factors then this function will be called on the component and applied to the data when get_time_series_array
is called.timestamp = :timestamp
: If the values are DataFrames is passed then this must be the column name that contains timestamps.
sourceInfrastructureSystems.Probabilistic
— MethodProbabilistic(name::AbstractString, series_data::InfrastructureSystems.RawTimeSeries, percentiles::Vector{T} where T, resolution::Dates.Period; normalization_factor, scaling_factor_multiplier) -> InfrastructureSystems.Probabilistic
-
Construct Deterministic from RawTimeSeries.
sourceInfrastructureSystems.ProbabilisticMetadata
— Typemutable struct ProbabilisticMetadata <: ForecastMetadata
+end
A Probabilistic forecast for a particular data field in a Component.
Arguments
name::String
: user-defined nameresolution::Dates.Period
: forecast resolutionpercentiles::Vector{Float64}
: Percentiles for the probabilistic forecastdata::Union{SortedDict{Dates.DateTime, Matrix{CONSTANT}}, SortedDict{Dates.DateTime, Matrix{POLYNOMIAL}}, SortedDict{Dates.DateTime, Matrix{PWL}}}
: timestamp - scalingfactorscaling_factor_multiplier::Union{Nothing, Function}
: Applicable when the time series data are scaling factors. Called on the associated component to convert the values.internal::InfrastructureSystemsInternal
sourceInfrastructureSystems.Probabilistic
— MethodProbabilistic(name::AbstractString, input_data::AbstractDict, percentiles::Vector{T} where T, resolution::Dates.Period; normalization_factor, scaling_factor_multiplier) -> InfrastructureSystems.Probabilistic
+
Construct Probabilistic from a SortedDict of Arrays.
Arguments
name::AbstractString
: user-defined nameinput_data::AbstractDict{Dates.DateTime, Matrix{Float64}}
: time series data.percentiles
: Percentiles represented in the probabilistic forecastresolution::Dates.Period
: The resolution of the forecast in Dates.Period`normalization_factor::NormalizationFactor = 1.0
: optional normalization factor to apply to each data entryscaling_factor_multiplier::Union{Nothing, Function} = nothing
: If the data are scaling factors then this function will be called on the component and applied to the data when get_time_series_array
is called.
sourceInfrastructureSystems.Probabilistic
— MethodProbabilistic(name::AbstractString, input_data::AbstractDict{Dates.DateTime, var"#s310"} where var"#s310"<:TimeSeries.TimeArray, percentiles::Vector{Float64}; normalization_factor, scaling_factor_multiplier) -> InfrastructureSystems.Probabilistic
+
Construct Probabilistic from a Dict of TimeArrays.
Arguments
name::AbstractString
: user-defined nameinput_data::AbstractDict{Dates.DateTime, TimeSeries.TimeArray}
: time series data.percentiles
: Percentiles represented in the probabilistic forecastnormalization_factor::NormalizationFactor = 1.0
: optional normalization factor to apply to each data entryscaling_factor_multiplier::Union{Nothing, Function} = nothing
: If the data are scaling factors then this function will be called on the component and applied to the data when get_time_series_array
is called.timestamp = :timestamp
: If the values are DataFrames is passed then this must be the column name that contains timestamps.
sourceInfrastructureSystems.Probabilistic
— MethodProbabilistic(name::AbstractString, series_data::InfrastructureSystems.RawTimeSeries, percentiles::Vector{T} where T, resolution::Dates.Period; normalization_factor, scaling_factor_multiplier) -> InfrastructureSystems.Probabilistic
+
Construct Deterministic from RawTimeSeries.
sourceInfrastructureSystems.ProbabilisticMetadata
— Typemutable struct ProbabilisticMetadata <: ForecastMetadata
name::String
initial_timestamp::Dates.DateTime
resolution::Dates.Period
@@ -64,8 +64,8 @@
horizon::Int
scaling_factor_multiplier::Union{Nothing, Function}
internal::InfrastructureSystemsInternal
-end
A Probabilistic forecast for a particular data field in a Component.
Arguments
name::String
: user-defined nameinitial_timestamp::Dates.DateTime
: time series availability timeresolution::Dates.Period
interval::Dates.Period
: time step between forecast windowscount::Int
: number of forecast windowspercentiles::Vector{Float64}
: Percentiles for the probabilistic forecasttime_series_uuid::UUIDs.UUID
: reference to time series datahorizon::Int
: length of this time seriesscaling_factor_multiplier::Union{Nothing, Function}
: Applicable when the time series data are scaling factors. Called on the associated component to convert the values.internal::InfrastructureSystemsInternal
sourceInfrastructureSystems.RawTimeSeries
— TypeWraps the data read from the text files with time series
sourceInfrastructureSystems.Recorder
— TypeRecords user-defined events in JSON format.
sourceInfrastructureSystems.Recorder
— MethodRecorder(name::Symbol; io, mode, directory) -> InfrastructureSystems.Recorder
-
Construct a Recorder.
Arguments
name::Symbol
: name of recorderio::Union{Nothing, IO}
: If nothing, record events in a file using name.mode = "w"
: Only used when io is nothing.directory = "."
: Only used when io is nothing.
sourceInfrastructureSystems.Results
— TypeTo implement a sub-type of this you need to implement the methods below.
sourceInfrastructureSystems.Scenarios
— Typemutable struct Scenarios <: Forecast
+end
A Probabilistic forecast for a particular data field in a Component.
Arguments
name::String
: user-defined nameinitial_timestamp::Dates.DateTime
: time series availability timeresolution::Dates.Period
interval::Dates.Period
: time step between forecast windowscount::Int
: number of forecast windowspercentiles::Vector{Float64}
: Percentiles for the probabilistic forecasttime_series_uuid::UUIDs.UUID
: reference to time series datahorizon::Int
: length of this time seriesscaling_factor_multiplier::Union{Nothing, Function}
: Applicable when the time series data are scaling factors. Called on the associated component to convert the values.internal::InfrastructureSystemsInternal
sourceInfrastructureSystems.RawTimeSeries
— TypeWraps the data read from the text files with time series
sourceInfrastructureSystems.Recorder
— TypeRecords user-defined events in JSON format.
sourceInfrastructureSystems.Recorder
— MethodRecorder(name::Symbol; io, mode, directory) -> InfrastructureSystems.Recorder
+
Construct a Recorder.
Arguments
name::Symbol
: name of recorderio::Union{Nothing, IO}
: If nothing, record events in a file using name.mode = "w"
: Only used when io is nothing.directory = "."
: Only used when io is nothing.
sourceInfrastructureSystems.Results
— TypeTo implement a sub-type of this you need to implement the methods below.
sourceInfrastructureSystems.Scenarios
— Typemutable struct Scenarios <: Forecast
name::String
resolution::Dates.Period
scenario_count::Int64
@@ -76,9 +76,9 @@
}
scaling_factor_multiplier::Union{Nothing, Function}
internal::InfrastructureSystemsInternal
-end
A Discrete Scenario Based time series for a particular data field in a Component.
Arguments
name::String
: user-defined nameresolution::Dates.Period
: forecast resolutionscenario_count::Int64
: Number of scenariosdata::Union{SortedDict{Dates.DateTime, Matrix{CONSTANT}}, SortedDict{Dates.DateTime, Matrix{POLYNOMIAL}}, SortedDict{Dates.DateTime, Matrix{PWL}}}
: timestamp - scalingfactorscaling_factor_multiplier::Union{Nothing, Function}
: Applicable when the time series data are scaling factors. Called on the associated component to convert the values.internal::InfrastructureSystemsInternal
sourceInfrastructureSystems.Scenarios
— MethodScenarios(name::AbstractString, input_data::AbstractDict, resolution::Dates.Period; normalization_factor, scaling_factor_multiplier) -> InfrastructureSystems.Scenarios
-
Construct Scenarios from a SortedDict of Arrays.
Arguments
name::AbstractString
: user-defined nameinput_data::AbstractDict{Dates.DateTime, Matrix{Float64}}
: time series data.resolution::Dates.Period
: The resolution of the forecast in Dates.Period`normalization_factor::NormalizationFactor = 1.0
: optional normalization factor to apply to each data entryscaling_factor_multiplier::Union{Nothing, Function} = nothing
: If the data are scaling factors then this function will be called on the component and applied to the data when get_time_series_array
is called.
sourceInfrastructureSystems.Scenarios
— MethodScenarios(name::AbstractString, input_data::AbstractDict{Dates.DateTime, var"#s310"} where var"#s310"<:TimeSeries.TimeArray; normalization_factor, scaling_factor_multiplier) -> InfrastructureSystems.Scenarios
-
Construct Scenarios from a Dict of TimeArrays.
Arguments
name::AbstractString
: user-defined nameinput_data::AbstractDict{Dates.DateTime, TimeSeries.TimeArray}
: time series data.normalization_factor::NormalizationFactor = 1.0
: optional normalization factor to apply to each data entryscaling_factor_multiplier::Union{Nothing, Function} = nothing
: If the data are scaling factors then this function will be called on the component and applied to the data when get_time_series_array
is called.timestamp = :timestamp
: If the values are DataFrames is passed then this must be the column name that contains timestamps.
sourceInfrastructureSystems.ScenariosMetadata
— Typemutable struct ScenariosMetadata <: ForecastMetadata
+end
A Discrete Scenario Based time series for a particular data field in a Component.
Arguments
name::String
: user-defined nameresolution::Dates.Period
: forecast resolutionscenario_count::Int64
: Number of scenariosdata::Union{SortedDict{Dates.DateTime, Matrix{CONSTANT}}, SortedDict{Dates.DateTime, Matrix{POLYNOMIAL}}, SortedDict{Dates.DateTime, Matrix{PWL}}}
: timestamp - scalingfactorscaling_factor_multiplier::Union{Nothing, Function}
: Applicable when the time series data are scaling factors. Called on the associated component to convert the values.internal::InfrastructureSystemsInternal
sourceInfrastructureSystems.Scenarios
— MethodScenarios(name::AbstractString, input_data::AbstractDict, resolution::Dates.Period; normalization_factor, scaling_factor_multiplier) -> InfrastructureSystems.Scenarios
+
Construct Scenarios from a SortedDict of Arrays.
Arguments
name::AbstractString
: user-defined nameinput_data::AbstractDict{Dates.DateTime, Matrix{Float64}}
: time series data.resolution::Dates.Period
: The resolution of the forecast in Dates.Period`normalization_factor::NormalizationFactor = 1.0
: optional normalization factor to apply to each data entryscaling_factor_multiplier::Union{Nothing, Function} = nothing
: If the data are scaling factors then this function will be called on the component and applied to the data when get_time_series_array
is called.
sourceInfrastructureSystems.Scenarios
— MethodScenarios(name::AbstractString, input_data::AbstractDict{Dates.DateTime, var"#s310"} where var"#s310"<:TimeSeries.TimeArray; normalization_factor, scaling_factor_multiplier) -> InfrastructureSystems.Scenarios
+
Construct Scenarios from a Dict of TimeArrays.
Arguments
name::AbstractString
: user-defined nameinput_data::AbstractDict{Dates.DateTime, TimeSeries.TimeArray}
: time series data.normalization_factor::NormalizationFactor = 1.0
: optional normalization factor to apply to each data entryscaling_factor_multiplier::Union{Nothing, Function} = nothing
: If the data are scaling factors then this function will be called on the component and applied to the data when get_time_series_array
is called.timestamp = :timestamp
: If the values are DataFrames is passed then this must be the column name that contains timestamps.
sourceInfrastructureSystems.ScenariosMetadata
— Typemutable struct ScenariosMetadata <: ForecastMetadata
name::String
resolution::Dates.Period
initial_timestamp::Dates.DateTime
@@ -89,16 +89,16 @@
horizon::Int
scaling_factor_multiplier::Union{Nothing, Function}
internal::InfrastructureSystemsInternal
-end
A Discrete Scenario Based time series for a particular data field in a Component.
Arguments
name::String
: user-defined nameresolution::Dates.Period
initial_timestamp::Dates.DateTime
: time series availability timeinterval::Dates.Period
: time step between forecast windowsscenario_count::Int64
: Number of scenarioscount::Int
: number of forecast windowstime_series_uuid::UUIDs.UUID
: reference to time series datahorizon::Int
: length of this time seriesscaling_factor_multiplier::Union{Nothing, Function}
: Applicable when the time series data are scaling factors. Called on the associated component to convert the values.internal::InfrastructureSystemsInternal
sourceInfrastructureSystems.SingleTimeSeries
— Typemutable struct SingleTimeSeries <: StaticTimeSeries
+end
A Discrete Scenario Based time series for a particular data field in a Component.
Arguments
name::String
: user-defined nameresolution::Dates.Period
initial_timestamp::Dates.DateTime
: time series availability timeinterval::Dates.Period
: time step between forecast windowsscenario_count::Int64
: Number of scenarioscount::Int
: number of forecast windowstime_series_uuid::UUIDs.UUID
: reference to time series datahorizon::Int
: length of this time seriesscaling_factor_multiplier::Union{Nothing, Function}
: Applicable when the time series data are scaling factors. Called on the associated component to convert the values.internal::InfrastructureSystemsInternal
sourceInfrastructureSystems.SingleTimeSeries
— Typemutable struct SingleTimeSeries <: StaticTimeSeries
name::String
data::TimeSeries.TimeArray
scaling_factor_multiplier::Union{Nothing, Function}
internal::InfrastructureSystemsInternal
-end
A deterministic forecast for a particular data field in a Component.
Arguments
name::String
: user-defined namedata::TimeSeries.TimeArray
: timestamp - scalingfactorscaling_factor_multiplier::Union{Nothing, Function}
: Applicable when the time series data are scaling factors. Called on the associated component to convert the values.internal::InfrastructureSystemsInternal
sourceInfrastructureSystems.SingleTimeSeries
— MethodSingleTimeSeries(name::AbstractString, filename::AbstractString, component::InfrastructureSystems.InfrastructureSystemsComponent, resolution::Dates.Period; normalization_factor, scaling_factor_multiplier) -> InfrastructureSystems.SingleTimeSeries
-
Construct SingleTimeSeries from a CSV file. The file must have a column that is the name of the component.
Arguments
name::AbstractString
: user-defined namefilename::AbstractString
: name of CSV file containing datacomponent::InfrastructureSystemsComponent
: component associated with the dataresolution::Dates.Period
: resolution of the time seriesnormalization_factor::NormalizationFactor = 1.0
: optional normalization factor to apply to each data entryscaling_factor_multiplier::Union{Nothing, Function} = nothing
: If the data are scaling factors then this function will be called on the component and applied to the data when get_time_series_array
is called.
sourceInfrastructureSystems.SingleTimeSeries
— MethodSingleTimeSeries(name::AbstractString, data::Union{DataFrames.DataFrame, TimeSeries.TimeArray}; normalization_factor, scaling_factor_multiplier, timestamp) -> InfrastructureSystems.SingleTimeSeries
-
Construct SingleTimeSeries from a TimeArray or DataFrame.
Arguments
name::AbstractString
: user-defined namedata::Union{TimeSeries.TimeArray, DataFrames.DataFrame}
: time series datanormalization_factor::NormalizationFactor = 1.0
: optional normalization factor to apply to each data entryscaling_factor_multiplier::Union{Nothing, Function} = nothing
: If the data are scaling factors then this function will be called on the component and applied to the data when get_time_series_array
is called.timestamp = :timestamp
: If a DataFrame is passed then this must be the column name that contains timestamps.
sourceInfrastructureSystems.SingleTimeSeries
— MethodSingleTimeSeries(time_series::InfrastructureSystems.SingleTimeSeries, data::TimeSeries.TimeArray) -> Any
-
Creates a new SingleTimeSeries from an existing instance and a subset of data.
sourceInfrastructureSystems.SingleTimeSeries
— MethodSingleTimeSeries(name::String, resolution::Dates.Period, initial_time::Dates.DateTime, time_steps::Int64) -> InfrastructureSystems.SingleTimeSeries
-
Construct SingleTimeSeries after constructing a TimeArray from initial_time
and time_steps
.
sourceInfrastructureSystems.SingleTimeSeriesMetadata
— Typemutable struct SingleTimeSeriesMetadata <: StaticTimeSeriesMetadata
+end
A deterministic forecast for a particular data field in a Component.
Arguments
name::String
: user-defined namedata::TimeSeries.TimeArray
: timestamp - scalingfactorscaling_factor_multiplier::Union{Nothing, Function}
: Applicable when the time series data are scaling factors. Called on the associated component to convert the values.internal::InfrastructureSystemsInternal
sourceInfrastructureSystems.SingleTimeSeries
— MethodSingleTimeSeries(name::AbstractString, filename::AbstractString, component::InfrastructureSystems.InfrastructureSystemsComponent, resolution::Dates.Period; normalization_factor, scaling_factor_multiplier) -> InfrastructureSystems.SingleTimeSeries
+
Construct SingleTimeSeries from a CSV file. The file must have a column that is the name of the component.
Arguments
name::AbstractString
: user-defined namefilename::AbstractString
: name of CSV file containing datacomponent::InfrastructureSystemsComponent
: component associated with the dataresolution::Dates.Period
: resolution of the time seriesnormalization_factor::NormalizationFactor = 1.0
: optional normalization factor to apply to each data entryscaling_factor_multiplier::Union{Nothing, Function} = nothing
: If the data are scaling factors then this function will be called on the component and applied to the data when get_time_series_array
is called.
sourceInfrastructureSystems.SingleTimeSeries
— MethodSingleTimeSeries(name::AbstractString, data::Union{DataFrames.DataFrame, TimeSeries.TimeArray}; normalization_factor, scaling_factor_multiplier, timestamp) -> InfrastructureSystems.SingleTimeSeries
+
Construct SingleTimeSeries from a TimeArray or DataFrame.
Arguments
name::AbstractString
: user-defined namedata::Union{TimeSeries.TimeArray, DataFrames.DataFrame}
: time series datanormalization_factor::NormalizationFactor = 1.0
: optional normalization factor to apply to each data entryscaling_factor_multiplier::Union{Nothing, Function} = nothing
: If the data are scaling factors then this function will be called on the component and applied to the data when get_time_series_array
is called.timestamp = :timestamp
: If a DataFrame is passed then this must be the column name that contains timestamps.
sourceInfrastructureSystems.SingleTimeSeries
— MethodSingleTimeSeries(time_series::InfrastructureSystems.SingleTimeSeries, data::TimeSeries.TimeArray) -> Any
+
Creates a new SingleTimeSeries from an existing instance and a subset of data.
sourceInfrastructureSystems.SingleTimeSeries
— MethodSingleTimeSeries(name::String, resolution::Dates.Period, initial_time::Dates.DateTime, time_steps::Int64) -> InfrastructureSystems.SingleTimeSeries
+
Construct SingleTimeSeries after constructing a TimeArray from initial_time
and time_steps
.
sourceInfrastructureSystems.SingleTimeSeriesMetadata
— Typemutable struct SingleTimeSeriesMetadata <: StaticTimeSeriesMetadata
name::String
resolution::Dates.Period
initial_timestamp::Dates.DateTime
@@ -106,9 +106,9 @@
length::Int
scaling_factor_multiplier::Union{Nothing, Function}
internal::InfrastructureSystemsInternal
-end
A TimeSeries Data object in contigous form.
Arguments
name::String
: user-defined nameresolution::Dates.Period
initial_timestamp::Dates.DateTime
: time series availability timetime_series_uuid::UUIDs.UUID
: reference to time series datalength::Int
: length of this time seriesscaling_factor_multiplier::Union{Nothing, Function}
: Applicable when the time series data are scaling factors. Called on the associated component to convert the values.internal::InfrastructureSystemsInternal
sourceInfrastructureSystems.StaticTimeSeriesCache
— MethodConstruct StaticTimeSeriesCache to automatically control caching of time series data. Maintains rows of data in memory based on cache_size_bytes
.
Call Base.iterate or get_time_series_array
to retrieve data. Each iteration will return a TimeSeries.TimeArray of size 1.
Arguments
::Type{T}
: subtype of StaticTimeSeriescomponent::InfrastructureSystemsComponent
: componentname::AbstractString
: time series namecache_size_bytes = TIME_SERIES_CACHE_SIZE_BYTES
: maximum size of data to keep in memoryignore_scaling_factors = false
: controls whether to ignore scalingfactormultiplier in the time series instance
sourceInfrastructureSystems.StructDefinition
— MethodStructDefinition(; struct_name, fields, supertype, docstring, is_component)
-
Construct a StructDefinition for code auto-generation purposes.
Arguments
struct_name::AbstractString
: Struct namefields::Vector{StructField}
: Struct fields. Refer to StructField
.docstring::AbstractString
: Struct docstring. Defaults to an empty string.supertype::Union{String, DataType}
: Struct supertype. Defaults to no supertype.is_component::Bool
: Set to true for component types that will be attached to a system. Do not set to Default to true.
sourceInfrastructureSystems.StructField
— MethodStructField(; name, data_type, default, comment, needs_conversion, exclude_setter, valid_range, validation_action, null_value, internal_default)
-
Construct a StructField for code auto-generation purposes.
Arguments
name::String
: Field namedata_type::Union{DataType, String}
: Field typedefault::Any
: The generated constructors will define this as a default value.comment::String
: Include this comment above the field name. Defaults to empty string.needs_conversion::Bool
: Set to true if the getter and setter functions need to apply unit conversion. The type must implement get_value(::Component, ::Type)
and set_value(::Component, ::Type)
for this combination of component type and field type.exclude_setter::Bool
: Do not generate a setter function for this field. Defaults to false.valid_range::Union{Nothing, String, Dict}
: Enables range validation when the component is added to a system. Define this as a Dict with "min" and "max" or as a String with the field name in the struct that defines this field's valid range and InfrastructureSystems will validate any value against that range. Use nothing
if one doesn't apply, such as if there is no max limit.validation_action
: Define this as "error" or "warn". If it is "error" then InfrastructureSystems will throw an exception if the validation code detects a problem. Otherwise, it will log a warning.null_value::Any
: Value to indicate the field is zero or empty, such as 0.0 for Float64. If all members in the struct define this field then a "demo" constructor will be generated. This allows entering val = MyType(nothing)
in the REPL to see the layout of a struct without worrying about valid values.internal_default
: Set to true for non-user-facing fields like InfrastructureSystemsInternal
that have default values.
sourceInfrastructureSystems.SystemData
— Typemutable struct SystemData <: InfrastructureSystemsType
+end
A TimeSeries Data object in contigous form.
Arguments
name::String
: user-defined nameresolution::Dates.Period
initial_timestamp::Dates.DateTime
: time series availability timetime_series_uuid::UUIDs.UUID
: reference to time series datalength::Int
: length of this time seriesscaling_factor_multiplier::Union{Nothing, Function}
: Applicable when the time series data are scaling factors. Called on the associated component to convert the values.internal::InfrastructureSystemsInternal
sourceInfrastructureSystems.StaticTimeSeriesCache
— MethodConstruct StaticTimeSeriesCache to automatically control caching of time series data. Maintains rows of data in memory based on cache_size_bytes
.
Call Base.iterate or get_time_series_array
to retrieve data. Each iteration will return a TimeSeries.TimeArray of size 1.
Arguments
::Type{T}
: subtype of StaticTimeSeriescomponent::InfrastructureSystemsComponent
: componentname::AbstractString
: time series namecache_size_bytes = TIME_SERIES_CACHE_SIZE_BYTES
: maximum size of data to keep in memoryignore_scaling_factors = false
: controls whether to ignore scalingfactormultiplier in the time series instance
sourceInfrastructureSystems.StructDefinition
— MethodStructDefinition(; struct_name, fields, supertype, docstring, is_component)
+
Construct a StructDefinition for code auto-generation purposes.
Arguments
struct_name::AbstractString
: Struct namefields::Vector{StructField}
: Struct fields. Refer to StructField
.docstring::AbstractString
: Struct docstring. Defaults to an empty string.supertype::Union{String, DataType}
: Struct supertype. Defaults to no supertype.is_component::Bool
: Set to true for component types that will be attached to a system. Do not set to Default to true.
sourceInfrastructureSystems.StructField
— MethodStructField(; name, data_type, default, comment, needs_conversion, exclude_setter, valid_range, validation_action, null_value, internal_default)
+
Construct a StructField for code auto-generation purposes.
Arguments
name::String
: Field namedata_type::Union{DataType, String}
: Field typedefault::Any
: The generated constructors will define this as a default value.comment::String
: Include this comment above the field name. Defaults to empty string.needs_conversion::Bool
: Set to true if the getter and setter functions need to apply unit conversion. The type must implement get_value(::Component, ::Type)
and set_value(::Component, ::Type)
for this combination of component type and field type.exclude_setter::Bool
: Do not generate a setter function for this field. Defaults to false.valid_range::Union{Nothing, String, Dict}
: Enables range validation when the component is added to a system. Define this as a Dict with "min" and "max" or as a String with the field name in the struct that defines this field's valid range and InfrastructureSystems will validate any value against that range. Use nothing
if one doesn't apply, such as if there is no max limit.validation_action
: Define this as "error" or "warn". If it is "error" then InfrastructureSystems will throw an exception if the validation code detects a problem. Otherwise, it will log a warning.null_value::Any
: Value to indicate the field is zero or empty, such as 0.0 for Float64. If all members in the struct define this field then a "demo" constructor will be generated. This allows entering val = MyType(nothing)
in the REPL to see the layout of a struct without worrying about valid values.internal_default
: Set to true for non-user-facing fields like InfrastructureSystemsInternal
that have default values.
sourceInfrastructureSystems.SystemData
— Typemutable struct SystemData <: InfrastructureSystemsType
components::Components
"Masked components are attached to the system for overall management purposes but
are not exposed in the standard library calls like [`get_components`](@ref).
@@ -119,290 +119,290 @@
time_series_storage::TimeSeriesStorage
time_series_storage_file::Union{Nothing, String}
internal::InfrastructureSystemsInternal
-end
Container for system components and time series data
sourceInfrastructureSystems.SystemData
— MethodSystemData(; validation_descriptor_file, time_series_in_memory, time_series_directory, compression) -> InfrastructureSystems.SystemData
-
Construct SystemData to store components and time series data.
Arguments
validation_descriptor_file = nothing
: Optionally, a file defining component validation descriptors.time_series_in_memory = false
: Controls whether time series data is stored in memory or in a file.time_series_directory = nothing
: Controls what directory time series data is stored in. Default is tempdir().compression = CompressionSettings()
: Controls compression of time series data.
sourceInfrastructureSystems.TimeSeriesContainer
— TypeTime series container for a component.
sourceInfrastructureSystems.TimeSeriesData
— TypeAbstract type for time series stored in the system. Components store references to these through TimeSeriesMetadata values so that data can reside on storage media instead of memory.
sourceInfrastructureSystems.TimeSeriesFileMetadata
— TypeDescribes how to construct time_series from raw time series data files.
sourceInfrastructureSystems.TimeSeriesMetadata
— TypeAbstract type for time_series that are stored in a system. Users never create them or get access to them. Stores references to TimeSeriesData.
sourceInfrastructureSystems.TimeSeriesStorage
— TypeAbstract type for time series storage implementations.
All subtypes must implement:
- addtimeseries_reference!
- checkreadonly
- cleartimeseries!
- deserializetimeseries
- getcompressionsettings
- getnumtime_series
- isreadonly
- removetimeseries!
- serializetimeseries!
- replacecomponentuuid!
- Base.isempty
sourceBase.close
— Methodclose(logger::InfrastructureSystems.MultiLogger)
-
Ensures that any file streams are flushed and closed.
sourceBase.flush
— Methodflush(logger::InfrastructureSystems.MultiLogger)
-
Flush any file streams.
sourceBase.get
— Methodget(container::InfrastructureSystems.LazyDictFromIterator, key) -> Any
-
Returns the item mapped to key. If the key is already stored then it will be returned with a dictionary lookup. If it has not been stored then iterate over the list until it is found.
Returns nothing if key is not found.
sourceInfrastructureSystems._get_all_concrete_subtypes
— Method_get_all_concrete_subtypes(_::Type{T}, sub_types::Vector{DataType})
-
Recursively builds a vector of subtypes.
sourceInfrastructureSystems._validate_component
— Method_validate_component(data::InfrastructureSystems.SystemData, component::InfrastructureSystems.InfrastructureSystemsComponent)
-
Checks that the component exists in data and the UUID's match.
sourceInfrastructureSystems.add_component!
— Methodadd_component!(components::InfrastructureSystems.Components, component::InfrastructureSystems.InfrastructureSystemsComponent; kwargs...)
-
Add a component.
Throws ArgumentError if the component's name is already stored for its concrete type.
Throws InvalidRange if any of the component's field values are outside of defined valid range.
sourceInfrastructureSystems.add_serialization_metadata!
— Methodadd_serialization_metadata!(data::Dict, _::Type{T})
-
Add type information to the dictionary that can be used to deserialize the value.
sourceInfrastructureSystems.add_time_series!
— Methodadd_time_series!(data::InfrastructureSystems.SystemData, components, time_series::InfrastructureSystems.TimeSeriesData)
-
Add the same time series data to multiple components.
Arguments
data::SystemData
: SystemDatacomponents
: iterable of components that will store the same time series referencetime_series::TimeSeriesData
: Any object of subtype TimeSeriesData
This is significantly more efficent than calling add_time_series!
for each component individually with the same data because in this case, only one time series array is stored.
Throws ArgumentError if a component is not stored in the system.
sourceInfrastructureSystems.add_time_series!
— Methodadd_time_series!(data::InfrastructureSystems.SystemData, component::InfrastructureSystems.InfrastructureSystemsComponent, time_series::InfrastructureSystems.TimeSeriesData; skip_if_present)
-
Add time series data to a component.
Arguments
data::SystemData
: SystemDatacomponent::InfrastructureSystemsComponent
: will store the time series referencetime_series::TimeSeriesData
: Any object of subtype TimeSeriesData
Throws ArgumentError if the component is not stored in the system.
sourceInfrastructureSystems.add_time_series!
— Methodadd_time_series!(data::InfrastructureSystems.SystemData, component::InfrastructureSystems.InfrastructureSystemsSupplementalAttribute, time_series::InfrastructureSystems.TimeSeriesData; skip_if_present)
-
Add time series data to a component.
Arguments
data::SystemData
: SystemDatacomponent::InfrastructureSystemsComponent
: will store the time series referencetime_series::TimeSeriesData
: Any object of subtype TimeSeriesData
Throws ArgumentError if the component is not stored in the system.
sourceInfrastructureSystems.add_time_series_from_file_metadata!
— Methodadd_time_series_from_file_metadata!(data::InfrastructureSystems.SystemData, ::Type{T<:InfrastructureSystems.InfrastructureSystemsComponent}, metadata_file::AbstractString; resolution)
-
Adds time_series from a metadata file or metadata descriptors.
Arguments
data::SystemData
: system::Type{T}
: type of the component associated with time series data; may be abstractmetadata_file::AbstractString
: metadata file for time series that includes an array of TimeSeriesFileMetadata instances or a vector.resolution::DateTime.Period=nothing
: skip time_series that don't match this resolution.
sourceInfrastructureSystems.add_time_series_from_file_metadata!
— Methodadd_time_series_from_file_metadata!(data::InfrastructureSystems.SystemData, ::Type{T<:InfrastructureSystems.InfrastructureSystemsComponent}, file_metadata::Vector{InfrastructureSystems.TimeSeriesFileMetadata}; resolution)
-
Adds time series data from a metadata file or metadata descriptors.
Arguments
data::SystemData
: systemfile_metadata::Vector{TimeSeriesFileMetadata}
: metadata for time seriesresolution::DateTime.Period=nothing
: skip time_series that don't match this resolution.
sourceInfrastructureSystems.assign_new_uuid!
— Methodassign_new_uuid!(obj::InfrastructureSystems.InfrastructureSystemsType)
-
Assign a new UUID.
sourceInfrastructureSystems.attach_supplemental_attribute!
— Methodattach_supplemental_attribute!(component::InfrastructureSystems.InfrastructureSystemsComponent, info::InfrastructureSystems.InfrastructureSystemsSupplementalAttribute)
-
Attach an attribute to a component.
sourceInfrastructureSystems.check_params_compatibility
— Methodcheck_params_compatibility(params::InfrastructureSystems.TimeSeriesParameters, other::InfrastructureSystems.TimeSeriesParameters) -> Union{Nothing, Bool}
-
Return true if params
match other
or if one of them is uninitialized.
sourceInfrastructureSystems.clear_components!
— Methodclear_components!(components::InfrastructureSystems.Components)
-
Removes all components from the system.
sourceInfrastructureSystems.clear_ext!
— Methodclear_ext!(obj::InfrastructureSystems.InfrastructureSystemsInternal)
-
Clear any value stored in ext.
sourceInfrastructureSystems.clear_supplemental_attributes!
— Methodclear_supplemental_attributes!(supplemental_attributes::InfrastructureSystems.SupplementalAttributes)
-
Removes all supplemental_attributes from the system.
sourceInfrastructureSystems.compare_values
— Methodcompare_values(x, y; compare_uuids) -> Bool
-
Recursively compares struct values. Prints all mismatched values to stdout.
Arguments
x::T
: First valuey::T
: Second valuecompare_uuids::Bool = false
: Compare any UUID in the object or composed objects.
sourceInfrastructureSystems.configure_logging
— Methodconfigure_logging(; console, console_stream, console_level, progress, file, filename, file_level, file_mode, tracker, set_global) -> InfrastructureSystems.MultiLogger
+end
Container for system components and time series data
sourceInfrastructureSystems.SystemData
— MethodSystemData(; validation_descriptor_file, time_series_in_memory, time_series_directory, compression) -> InfrastructureSystems.SystemData
+
Construct SystemData to store components and time series data.
Arguments
validation_descriptor_file = nothing
: Optionally, a file defining component validation descriptors.time_series_in_memory = false
: Controls whether time series data is stored in memory or in a file.time_series_directory = nothing
: Controls what directory time series data is stored in. Default is tempdir().compression = CompressionSettings()
: Controls compression of time series data.
sourceInfrastructureSystems.TimeSeriesContainer
— TypeTime series container for a component.
sourceInfrastructureSystems.TimeSeriesData
— TypeAbstract type for time series stored in the system. Components store references to these through TimeSeriesMetadata values so that data can reside on storage media instead of memory.
sourceInfrastructureSystems.TimeSeriesFileMetadata
— TypeDescribes how to construct time_series from raw time series data files.
sourceInfrastructureSystems.TimeSeriesMetadata
— TypeAbstract type for time_series that are stored in a system. Users never create them or get access to them. Stores references to TimeSeriesData.
sourceInfrastructureSystems.TimeSeriesStorage
— TypeAbstract type for time series storage implementations.
All subtypes must implement:
- addtimeseries_reference!
- checkreadonly
- cleartimeseries!
- deserializetimeseries
- getcompressionsettings
- getnumtime_series
- isreadonly
- removetimeseries!
- serializetimeseries!
- replacecomponentuuid!
- Base.isempty
sourceBase.close
— Methodclose(logger::InfrastructureSystems.MultiLogger)
+
Ensures that any file streams are flushed and closed.
sourceBase.flush
— Methodflush(logger::InfrastructureSystems.MultiLogger)
+
Flush any file streams.
sourceBase.get
— Methodget(container::InfrastructureSystems.LazyDictFromIterator, key) -> Any
+
Returns the item mapped to key. If the key is already stored then it will be returned with a dictionary lookup. If it has not been stored then iterate over the list until it is found.
Returns nothing if key is not found.
sourceInfrastructureSystems._get_all_concrete_subtypes
— Method_get_all_concrete_subtypes(_::Type{T}, sub_types::Vector{DataType})
+
Recursively builds a vector of subtypes.
sourceInfrastructureSystems._validate_component
— Method_validate_component(data::InfrastructureSystems.SystemData, component::InfrastructureSystems.InfrastructureSystemsComponent)
+
Checks that the component exists in data and the UUID's match.
sourceInfrastructureSystems.add_component!
— Methodadd_component!(components::InfrastructureSystems.Components, component::InfrastructureSystems.InfrastructureSystemsComponent; kwargs...)
+
Add a component.
Throws ArgumentError if the component's name is already stored for its concrete type.
Throws InvalidRange if any of the component's field values are outside of defined valid range.
sourceInfrastructureSystems.add_serialization_metadata!
— Methodadd_serialization_metadata!(data::Dict, _::Type{T})
+
Add type information to the dictionary that can be used to deserialize the value.
sourceInfrastructureSystems.add_time_series!
— Methodadd_time_series!(data::InfrastructureSystems.SystemData, components, time_series::InfrastructureSystems.TimeSeriesData)
+
Add the same time series data to multiple components.
Arguments
data::SystemData
: SystemDatacomponents
: iterable of components that will store the same time series referencetime_series::TimeSeriesData
: Any object of subtype TimeSeriesData
This is significantly more efficent than calling add_time_series!
for each component individually with the same data because in this case, only one time series array is stored.
Throws ArgumentError if a component is not stored in the system.
sourceInfrastructureSystems.add_time_series!
— Methodadd_time_series!(data::InfrastructureSystems.SystemData, component::InfrastructureSystems.InfrastructureSystemsComponent, time_series::InfrastructureSystems.TimeSeriesData; skip_if_present)
+
Add time series data to a component.
Arguments
data::SystemData
: SystemDatacomponent::InfrastructureSystemsComponent
: will store the time series referencetime_series::TimeSeriesData
: Any object of subtype TimeSeriesData
Throws ArgumentError if the component is not stored in the system.
sourceInfrastructureSystems.add_time_series!
— Methodadd_time_series!(data::InfrastructureSystems.SystemData, component::InfrastructureSystems.InfrastructureSystemsSupplementalAttribute, time_series::InfrastructureSystems.TimeSeriesData; skip_if_present)
+
Add time series data to a component.
Arguments
data::SystemData
: SystemDatacomponent::InfrastructureSystemsComponent
: will store the time series referencetime_series::TimeSeriesData
: Any object of subtype TimeSeriesData
Throws ArgumentError if the component is not stored in the system.
sourceInfrastructureSystems.add_time_series_from_file_metadata!
— Methodadd_time_series_from_file_metadata!(data::InfrastructureSystems.SystemData, ::Type{T<:InfrastructureSystems.InfrastructureSystemsComponent}, metadata_file::AbstractString; resolution)
+
Adds time_series from a metadata file or metadata descriptors.
Arguments
data::SystemData
: system::Type{T}
: type of the component associated with time series data; may be abstractmetadata_file::AbstractString
: metadata file for time series that includes an array of TimeSeriesFileMetadata instances or a vector.resolution::DateTime.Period=nothing
: skip time_series that don't match this resolution.
sourceInfrastructureSystems.add_time_series_from_file_metadata!
— Methodadd_time_series_from_file_metadata!(data::InfrastructureSystems.SystemData, ::Type{T<:InfrastructureSystems.InfrastructureSystemsComponent}, file_metadata::Vector{InfrastructureSystems.TimeSeriesFileMetadata}; resolution)
+
Adds time series data from a metadata file or metadata descriptors.
Arguments
data::SystemData
: systemfile_metadata::Vector{TimeSeriesFileMetadata}
: metadata for time seriesresolution::DateTime.Period=nothing
: skip time_series that don't match this resolution.
sourceInfrastructureSystems.assign_new_uuid!
— Methodassign_new_uuid!(obj::InfrastructureSystems.InfrastructureSystemsType)
+
Assign a new UUID.
sourceInfrastructureSystems.attach_supplemental_attribute!
— Methodattach_supplemental_attribute!(component::InfrastructureSystems.InfrastructureSystemsComponent, attribute::InfrastructureSystems.InfrastructureSystemsSupplementalAttribute)
+
Attach an attribute to a component.
sourceInfrastructureSystems.check_params_compatibility
— Methodcheck_params_compatibility(params::InfrastructureSystems.TimeSeriesParameters, other::InfrastructureSystems.TimeSeriesParameters) -> Union{Nothing, Bool}
+
Return true if params
match other
or if one of them is uninitialized.
sourceInfrastructureSystems.clear_components!
— Methodclear_components!(components::InfrastructureSystems.Components)
+
Removes all components from the system.
sourceInfrastructureSystems.clear_ext!
— Methodclear_ext!(obj::InfrastructureSystems.InfrastructureSystemsInternal)
+
Clear any value stored in ext.
sourceInfrastructureSystems.clear_supplemental_attributes!
— Methodclear_supplemental_attributes!(supplemental_attributes::InfrastructureSystems.SupplementalAttributes)
+
Removes all supplemental_attributes from the system.
sourceInfrastructureSystems.compare_values
— Methodcompare_values(x, y; compare_uuids) -> Bool
+
Recursively compares struct values. Prints all mismatched values to stdout.
Arguments
x::T
: First valuey::T
: Second valuecompare_uuids::Bool = false
: Compare any UUID in the object or composed objects.
sourceInfrastructureSystems.configure_logging
— Methodconfigure_logging(; console, console_stream, console_level, progress, file, filename, file_level, file_mode, tracker, set_global) -> InfrastructureSystems.MultiLogger
Creates console and file loggers per caller specification and returns a MultiLogger.
Suppress noisy events by specifying per-event values of maxlog = X
and _suppression_period = Y
where X is the max number of events that can occur in Y seconds. After the period ends, messages will no longer be suppressed. Note that if you don't specify _suppression_period
then maxlog
applies for the for the duration of your process (standard Julia logging behavior).
Note: Use of log message suppression and the LogEventTracker are not thread-safe. Please contact the package developers if you need this functionality.
Note: If logging to a file users must call Base.close() on the returned MultiLogger to ensure that all events get flushed.
Arguments
console::Bool=true
: create console loggerconsole_stream::IOStream=stderr
: stream for console loggerconsole_level::Logging.LogLevel=Logging.Error
: level for console messagesprogress::Bool=true
: enable progress loggerfile::Bool=true
: create file loggerfilename::Union{Nothing, String}=log.txt
: log filefile_level::Logging.LogLevel=Logging.Info
: level for file messagesfile_mode::String=w+
: mode used when opening log filetracker::Union{LogEventTracker, Nothing}=LogEventTracker()
: optionally track log eventsset_global::Bool=true
: set the created logger as the global logger
Example
logger = configure_logging(filename="mylog.txt")
@info "hello world"
-@info "hello world" maxlog = 5 _suppression_period = 10
sourceInfrastructureSystems.copy_h5_file
— Methodcopy_h5_file(src::AbstractString, dst::AbstractString)
-
Copies an HDF5 file to a new file. This should be used instead of a system call to copy because it won't copy unused space that results from deleting datasets.
sourceInfrastructureSystems.copy_time_series!
— Methodcopy_time_series!(dst::Union{InfrastructureSystems.InfrastructureSystemsComponent, InfrastructureSystems.InfrastructureSystemsSupplementalAttribute}, src::Union{InfrastructureSystems.InfrastructureSystemsComponent, InfrastructureSystems.InfrastructureSystemsSupplementalAttribute}; name_mapping, scaling_factor_multiplier_mapping)
-
Efficiently add all time_series in one component to another by copying the underlying references.
Arguments
dst::SUPPORTED_TIME_SERIES_TYPES
: Destination componentsrc::SUPPORTED_TIME_SERIES_TYPES
: Source componentname_mapping::Dict = nothing
: Optionally map src names to different dst names. If provided and src has a timeseries with a name not present in namemapping, that timeseries will not copied. If namemapping is nothing then all time_series will be copied with src's names.scaling_factor_multiplier_mapping::Dict = nothing
: Optionally map src multipliers to different dst multipliers. If provided and src has a timeseries with a multiplier not present in scalingfactormultipliermapping, that timeseries will not copied. If scalingfactormultipliermapping is nothing then all time_series will be copied with src's multipliers.
sourceInfrastructureSystems.copy_to_new_file!
— Functioncopy_to_new_file!(storage::InfrastructureSystems.Hdf5TimeSeriesStorage)
+@info "hello world" maxlog = 5 _suppression_period = 10
sourceInfrastructureSystems.copy_h5_file
— Methodcopy_h5_file(src::AbstractString, dst::AbstractString)
+
Copies an HDF5 file to a new file. This should be used instead of a system call to copy because it won't copy unused space that results from deleting datasets.
sourceInfrastructureSystems.copy_time_series!
— Methodcopy_time_series!(dst::Union{InfrastructureSystems.InfrastructureSystemsComponent, InfrastructureSystems.InfrastructureSystemsSupplementalAttribute}, src::Union{InfrastructureSystems.InfrastructureSystemsComponent, InfrastructureSystems.InfrastructureSystemsSupplementalAttribute}; name_mapping, scaling_factor_multiplier_mapping)
+
Efficiently add all time_series in one component to another by copying the underlying references.
Arguments
dst::SUPPORTED_TIME_SERIES_TYPES
: Destination componentsrc::SUPPORTED_TIME_SERIES_TYPES
: Source componentname_mapping::Dict = nothing
: Optionally map src names to different dst names. If provided and src has a timeseries with a name not present in namemapping, that timeseries will not copied. If namemapping is nothing then all time_series will be copied with src's names.scaling_factor_multiplier_mapping::Dict = nothing
: Optionally map src multipliers to different dst multipliers. If provided and src has a timeseries with a multiplier not present in scalingfactormultipliermapping, that timeseries will not copied. If scalingfactormultipliermapping is nothing then all time_series will be copied with src's multipliers.
sourceInfrastructureSystems.copy_to_new_file!
— Functioncopy_to_new_file!(storage::InfrastructureSystems.Hdf5TimeSeriesStorage)
copy_to_new_file!(storage::InfrastructureSystems.Hdf5TimeSeriesStorage, directory)
-
Copy the time series data to a new file. This should get called when the system is undergoing a deepcopy.
Arguments
storage::Hdf5TimeSeriesStorage
: storage instancedirectory::String
: If nothing, use tempdir
sourceInfrastructureSystems.deserialize
— Methoddeserialize(_::Type{T<:InfrastructureSystems.InfrastructureSystemsType}, data::Dict) -> InfrastructureSystems.SystemData
-
Deserialize an object from standard types stored in non-Julia formats, such as JSON, into Julia types.
sourceInfrastructureSystems.empty_group_levels!
— Methodempty_group_levels!(logger::InfrastructureSystems.MultiLogger)
-
Empty the minimum log levels stored for each group.
sourceInfrastructureSystems.from
— Methodfrom(time_series::InfrastructureSystems.SingleTimeSeries, timestamp) -> InfrastructureSystems.SingleTimeSeries
-
Return a time_series truncated starting with timestamp.
sourceInfrastructureSystems.from_file
— Methodfrom_file(::Type{InfrastructureSystems.Hdf5TimeSeriesStorage}, filename::AbstractString; read_only, directory) -> InfrastructureSystems.Hdf5TimeSeriesStorage
-
Constructs Hdf5TimeSeriesStorage from an existing file.
sourceInfrastructureSystems.from_json
— Methodfrom_json(_::Type{T<:InfrastructureSystems.InfrastructureSystemsType}, filename::String) -> Any
-
Deserializes a InfrastructureSystemsType from a JSON filename.
sourceInfrastructureSystems.from_json
— Methodfrom_json(io::Union{IO, String}, _::Type{T<:InfrastructureSystems.InfrastructureSystemsType}) -> Any
-
Deserializes a InfrastructureSystemsType from String or IO.
sourceInfrastructureSystems.generate_struct_file
— Methodgenerate_struct_file(definition::InfrastructureSystems.StructDefinition; filename, output_directory)
-
Generate a Julia source code file for one struct from a StructDefinition
.
Refer to StructDefinition
and StructField
for descriptions of the available fields.
Arguments
definition::StructDefinition
: Defines the struct and all fields.filename::AbstractString
: Add the struct definition to this JSON file. Defaults to src/descriptors/structs.json
output_directory::AbstractString
: Generate the files in this directory. Defaults to src/generated
sourceInfrastructureSystems.generate_struct_files
— Methodgenerate_struct_files(definitions; filename, output_directory)
-
Generate Julia source code files for multiple structs from a iterable of StructDefinition
instances.
Refer to StructDefinition
and StructField
for descriptions of the available fields.
Arguments
definitions
: Defines the structs and all fields.filename::AbstractString
: Add the struct definition to this JSON file. Defaults to src/descriptors/power_system_structs.json
output_directory::AbstractString
: Generate the files in this directory. Defaults to src/generated
sourceInfrastructureSystems.get_abstract_subtypes
— MethodReturns an array of abstract types that are direct subtypes of T.
sourceInfrastructureSystems.get_all_concrete_subtypes
— MethodReturns an array of all concrete subtypes of T. Note that this does not find parameterized types.
sourceInfrastructureSystems.get_component
— MethodGet the component of type T with name. Returns nothing if no component matches. If T is an abstract type then the names of components across all subtypes of T must be unique.
See get_components_by_name
for abstract types with non-unique names across subtypes.
Throws ArgumentError if T is not a concrete type and there is more than one component with requested name
sourceInfrastructureSystems.get_components
— Methodget_components(::Type{T<:InfrastructureSystems.InfrastructureSystemsComponent}, components::InfrastructureSystems.Components) -> InfrastructureSystems.FlattenIteratorWrapper{_A, _B} where {_A, _B}
+
Copy the time series data to a new file. This should get called when the system is undergoing a deepcopy.
Arguments
storage::Hdf5TimeSeriesStorage
: storage instancedirectory::String
: If nothing, use tempdir
sourceInfrastructureSystems.deserialize
— Methoddeserialize(_::Type{T<:InfrastructureSystems.InfrastructureSystemsType}, data::Dict) -> InfrastructureSystems.TestComponent
+
Deserialize an object from standard types stored in non-Julia formats, such as JSON, into Julia types.
sourceInfrastructureSystems.empty_group_levels!
— Methodempty_group_levels!(logger::InfrastructureSystems.MultiLogger)
+
Empty the minimum log levels stored for each group.
sourceInfrastructureSystems.from
— Methodfrom(time_series::InfrastructureSystems.SingleTimeSeries, timestamp) -> InfrastructureSystems.SingleTimeSeries
+
Return a time_series truncated starting with timestamp.
sourceInfrastructureSystems.from_file
— Methodfrom_file(::Type{InfrastructureSystems.Hdf5TimeSeriesStorage}, filename::AbstractString; read_only, directory) -> InfrastructureSystems.Hdf5TimeSeriesStorage
+
Constructs Hdf5TimeSeriesStorage from an existing file.
sourceInfrastructureSystems.from_json
— Methodfrom_json(_::Type{T<:InfrastructureSystems.InfrastructureSystemsType}, filename::String) -> Any
+
Deserializes a InfrastructureSystemsType from a JSON filename.
sourceInfrastructureSystems.from_json
— Methodfrom_json(io::Union{IO, String}, _::Type{T<:InfrastructureSystems.InfrastructureSystemsType}) -> Any
+
Deserializes a InfrastructureSystemsType from String or IO.
sourceInfrastructureSystems.generate_struct_file
— Methodgenerate_struct_file(definition::InfrastructureSystems.StructDefinition; filename, output_directory)
+
Generate a Julia source code file for one struct from a StructDefinition
.
Refer to StructDefinition
and StructField
for descriptions of the available fields.
Arguments
definition::StructDefinition
: Defines the struct and all fields.filename::AbstractString
: Add the struct definition to this JSON file. Defaults to src/descriptors/structs.json
output_directory::AbstractString
: Generate the files in this directory. Defaults to src/generated
sourceInfrastructureSystems.generate_struct_files
— Methodgenerate_struct_files(definitions; filename, output_directory)
+
Generate Julia source code files for multiple structs from a iterable of StructDefinition
instances.
Refer to StructDefinition
and StructField
for descriptions of the available fields.
Arguments
definitions
: Defines the structs and all fields.filename::AbstractString
: Add the struct definition to this JSON file. Defaults to src/descriptors/power_system_structs.json
output_directory::AbstractString
: Generate the files in this directory. Defaults to src/generated
sourceInfrastructureSystems.get_abstract_subtypes
— MethodReturns an array of abstract types that are direct subtypes of T.
sourceInfrastructureSystems.get_all_concrete_subtypes
— MethodReturns an array of all concrete subtypes of T. Note that this does not find parameterized types.
sourceInfrastructureSystems.get_component
— MethodGet the component of type T with name. Returns nothing if no component matches. If T is an abstract type then the names of components across all subtypes of T must be unique.
See get_components_by_name
for abstract types with non-unique names across subtypes.
Throws ArgumentError if T is not a concrete type and there is more than one component with requested name
sourceInfrastructureSystems.get_components
— Methodget_components(::Type{T<:InfrastructureSystems.InfrastructureSystemsComponent}, components::InfrastructureSystems.Components) -> InfrastructureSystems.FlattenIteratorWrapper{_A, _B} where {_A, _B}
get_components(::Type{T<:InfrastructureSystems.InfrastructureSystemsComponent}, components::InfrastructureSystems.Components, filter_func::Union{Nothing, Function}) -> InfrastructureSystems.FlattenIteratorWrapper{_A, _B} where {_A, _B}
-
Returns an iterator of components. T can be concrete or abstract. Call collect on the result if an array is desired.
Arguments
T
: component typecomponents::Components
: Components of the systemfilter_func::Union{Nothing, Function} = nothing
: Optional function that accepts a component of type T and returns a Bool. Apply this function to each component and only return components where the result is true.
See also: iterate_components
sourceInfrastructureSystems.get_components_by_name
— Methodget_components_by_name(_::Type{T<:InfrastructureSystems.InfrastructureSystemsComponent}, components::InfrastructureSystems.Components, name::AbstractString) -> Vector{_A} where _A
-
Get the components of abstract type T with name. Note that InfrastructureSystems enforces unique names on each concrete type but not across concrete types.
See get_component
if the concrete type is known.
Throws ArgumentError if T is not an abstract type.
sourceInfrastructureSystems.get_concrete_subtypes
— MethodReturns an array of concrete types that are direct subtypes of T.
sourceInfrastructureSystems.get_count
— Methodget_count(value::InfrastructureSystems.DeterministicMetadata) -> Int64
-
Get DeterministicMetadata
count
.
sourceInfrastructureSystems.get_count
— Methodget_count(value::InfrastructureSystems.DeterministicSingleTimeSeries) -> Int64
-
Get DeterministicSingleTimeSeries
count
.
sourceInfrastructureSystems.get_count
— Methodget_count(value::InfrastructureSystems.ProbabilisticMetadata) -> Int64
-
Get ProbabilisticMetadata
count
.
sourceInfrastructureSystems.get_count
— Methodget_count(value::InfrastructureSystems.ScenariosMetadata) -> Int64
-
Get ScenariosMetadata
count
.
sourceInfrastructureSystems.get_data
— Methodget_data(value::InfrastructureSystems.Deterministic) -> Union{DataStructures.SortedDict{Dates.DateTime, Vector{Vector{Tuple{Float64, Float64}}}, Ord} where Ord<:Base.Order.Ordering, DataStructures.SortedDict{Dates.DateTime, Vector{Float64}, Ord} where Ord<:Base.Order.Ordering, DataStructures.SortedDict{Dates.DateTime, Vector{Tuple{Float64, Float64}}, Ord} where Ord<:Base.Order.Ordering}
-
Get Deterministic
data
.
sourceInfrastructureSystems.get_data
— Methodget_data(value::InfrastructureSystems.Probabilistic) -> Union{DataStructures.SortedDict{Dates.DateTime, Matrix{Vector{Tuple{Float64, Float64}}}, Ord} where Ord<:Base.Order.Ordering, DataStructures.SortedDict{Dates.DateTime, Matrix{Float64}, Ord} where Ord<:Base.Order.Ordering, DataStructures.SortedDict{Dates.DateTime, Matrix{Tuple{Float64, Float64}}, Ord} where Ord<:Base.Order.Ordering}
-
Get Probabilistic
data
.
sourceInfrastructureSystems.get_data
— Methodget_data(value::InfrastructureSystems.Scenarios) -> Union{DataStructures.SortedDict{Dates.DateTime, Matrix{Vector{Tuple{Float64, Float64}}}, Ord} where Ord<:Base.Order.Ordering, DataStructures.SortedDict{Dates.DateTime, Matrix{Float64}, Ord} where Ord<:Base.Order.Ordering, DataStructures.SortedDict{Dates.DateTime, Matrix{Tuple{Float64, Float64}}, Ord} where Ord<:Base.Order.Ordering}
-
Get Scenarios
data
.
sourceInfrastructureSystems.get_data
— Methodget_data(value::InfrastructureSystems.SingleTimeSeries) -> TimeSeries.TimeArray
-
Get SingleTimeSeries
data
.
sourceInfrastructureSystems.get_data_type
— Methodget_data_type(ts::InfrastructureSystems.TimeSeriesData) -> String
-
Return a String for the data type of the forecast data, this implementation avoids the use of eval
on arbitrary code stored in HDF dataset.
sourceInfrastructureSystems.get_ext
— Methodget_ext(obj::InfrastructureSystems.InfrastructureSystemsInternal) -> Union{Nothing, Dict{String, Any}}
-
Return a user-modifiable dictionary to store extra information.
sourceInfrastructureSystems.get_group_level
— Methodget_group_level(logger::InfrastructureSystems.MultiLogger, group::Symbol) -> Union{Nothing, Base.CoreLogging.LogLevel}
-
Return the minimum logging level for a group or nothing if group
is not stored.
sourceInfrastructureSystems.get_group_levels
— Methodget_group_levels(logger::InfrastructureSystems.MultiLogger) -> Dict{Symbol, Base.CoreLogging.LogLevel}
-
Return the minimum logging levels for groups that have been stored.
sourceInfrastructureSystems.get_horizon
— Methodget_horizon(value::InfrastructureSystems.DeterministicMetadata) -> Int64
-
Get DeterministicMetadata
horizon
.
sourceInfrastructureSystems.get_horizon
— Methodget_horizon(value::InfrastructureSystems.DeterministicSingleTimeSeries) -> Int64
-
Get DeterministicSingleTimeSeries
horizon
.
sourceInfrastructureSystems.get_horizon
— Methodget_horizon(value::InfrastructureSystems.ProbabilisticMetadata) -> Int64
-
Get ProbabilisticMetadata
horizon
.
sourceInfrastructureSystems.get_horizon
— Methodget_horizon(value::InfrastructureSystems.ScenariosMetadata) -> Int64
-
Get ScenariosMetadata
horizon
.
sourceInfrastructureSystems.get_initial_times
— Methodget_initial_times(f::InfrastructureSystems.Forecast) -> DataStructures.SDMKeyIteration
-
Return the initial times in the forecast.
sourceInfrastructureSystems.get_initial_timestamp
— Methodget_initial_timestamp(value::InfrastructureSystems.DeterministicMetadata) -> Dates.DateTime
-
Get DeterministicMetadata
initial_timestamp
.
sourceInfrastructureSystems.get_initial_timestamp
— Methodget_initial_timestamp(value::InfrastructureSystems.DeterministicSingleTimeSeries) -> Dates.DateTime
-
Get DeterministicSingleTimeSeries
initial_timestamp
.
sourceInfrastructureSystems.get_initial_timestamp
— Methodget_initial_timestamp(value::InfrastructureSystems.ProbabilisticMetadata) -> Dates.DateTime
-
Get ProbabilisticMetadata
initial_timestamp
.
sourceInfrastructureSystems.get_initial_timestamp
— Methodget_initial_timestamp(value::InfrastructureSystems.ScenariosMetadata) -> Dates.DateTime
-
Get ScenariosMetadata
initial_timestamp
.
sourceInfrastructureSystems.get_initial_timestamp
— Methodget_initial_timestamp(value::InfrastructureSystems.SingleTimeSeriesMetadata) -> Dates.DateTime
-
Get SingleTimeSeriesMetadata
initial_timestamp
.
sourceInfrastructureSystems.get_internal
— Methodget_internal(value::InfrastructureSystems.DeterministicMetadata) -> InfrastructureSystems.InfrastructureSystemsInternal
-
Get DeterministicMetadata
internal
.
sourceInfrastructureSystems.get_internal
— Methodget_internal(value::InfrastructureSystems.Deterministic) -> InfrastructureSystems.InfrastructureSystemsInternal
-
Get Deterministic
internal
.
sourceInfrastructureSystems.get_internal
— Methodget_internal(value::InfrastructureSystems.ProbabilisticMetadata) -> InfrastructureSystems.InfrastructureSystemsInternal
-
Get ProbabilisticMetadata
internal
.
sourceInfrastructureSystems.get_internal
— Methodget_internal(value::InfrastructureSystems.Probabilistic) -> InfrastructureSystems.InfrastructureSystemsInternal
-
Get Probabilistic
internal
.
sourceInfrastructureSystems.get_internal
— Methodget_internal(value::InfrastructureSystems.ScenariosMetadata) -> InfrastructureSystems.InfrastructureSystemsInternal
-
Get ScenariosMetadata
internal
.
sourceInfrastructureSystems.get_internal
— Methodget_internal(value::InfrastructureSystems.Scenarios) -> InfrastructureSystems.InfrastructureSystemsInternal
-
Get Scenarios
internal
.
sourceInfrastructureSystems.get_internal
— Methodget_internal(value::InfrastructureSystems.SingleTimeSeriesMetadata) -> InfrastructureSystems.InfrastructureSystemsInternal
-
Get SingleTimeSeriesMetadata
internal
.
sourceInfrastructureSystems.get_internal
— Methodget_internal(value::InfrastructureSystems.SingleTimeSeries) -> InfrastructureSystems.InfrastructureSystemsInternal
-
Get SingleTimeSeries
internal
.
sourceInfrastructureSystems.get_interval
— Methodget_interval(value::InfrastructureSystems.DeterministicMetadata) -> Dates.Period
-
Get DeterministicMetadata
interval
.
sourceInfrastructureSystems.get_interval
— Methodget_interval(value::InfrastructureSystems.DeterministicSingleTimeSeries) -> Dates.Period
-
Get DeterministicSingleTimeSeries
interval
.
sourceInfrastructureSystems.get_interval
— Methodget_interval(value::InfrastructureSystems.ProbabilisticMetadata) -> Dates.Period
-
Get ProbabilisticMetadata
interval
.
sourceInfrastructureSystems.get_interval
— Methodget_interval(value::InfrastructureSystems.ScenariosMetadata) -> Dates.Period
-
Get ScenariosMetadata
interval
.
sourceInfrastructureSystems.get_length
— Methodget_length(value::InfrastructureSystems.SingleTimeSeriesMetadata) -> Int64
-
Get SingleTimeSeriesMetadata
length
.
sourceInfrastructureSystems.get_log_events
— Methodget_log_events(tracker::InfrastructureSystems.LogEventTracker, level::Base.CoreLogging.LogLevel) -> Union{Base.ValueIterator{Dict{Symbol, InfrastructureSystems.LogEvent}}, Vector{Any}}
-
Returns an iterable of log events for a level.
sourceInfrastructureSystems.get_name
— Methodget_name(value::InfrastructureSystems.DeterministicMetadata) -> String
-
Get DeterministicMetadata
name
.
sourceInfrastructureSystems.get_name
— Methodget_name(value::InfrastructureSystems.Deterministic) -> String
-
Get Deterministic
name
.
sourceInfrastructureSystems.get_name
— Methodget_name(value::InfrastructureSystems.ProbabilisticMetadata) -> String
-
Get ProbabilisticMetadata
name
.
sourceInfrastructureSystems.get_name
— Methodget_name(value::InfrastructureSystems.Probabilistic) -> String
-
Get Probabilistic
name
.
sourceInfrastructureSystems.get_name
— Methodget_name(value::InfrastructureSystems.ScenariosMetadata) -> String
-
Get ScenariosMetadata
name
.
sourceInfrastructureSystems.get_name
— Methodget_name(value::InfrastructureSystems.Scenarios) -> String
-
Get Scenarios
name
.
sourceInfrastructureSystems.get_name
— Methodget_name(value::InfrastructureSystems.SingleTimeSeriesMetadata) -> String
-
Get SingleTimeSeriesMetadata
name
.
sourceInfrastructureSystems.get_name
— Methodget_name(value::InfrastructureSystems.SingleTimeSeries) -> String
-
Get SingleTimeSeries
name
.
sourceInfrastructureSystems.get_next_time
— Methodget_next_time(cache::InfrastructureSystems.TimeSeriesCache) -> Any
-
Return the timestamp for the next read with get_next_time_series_array!
.
Return nothing
if all data has been read.
sourceInfrastructureSystems.get_next_time_series_array!
— Methodget_next_time_series_array!(cache::InfrastructureSystems.TimeSeriesCache) -> Any
-
Return the next TimeSeries.TimeArray.
Returns nothing
when all data has been read. Call reset!
to restart. Call get_next_time
to check the start time.
Reads from storage if the data is not already in cache.
Arguments
cache::StaticTimeSeriesCache
: cached instance
sourceInfrastructureSystems.get_num_steps
— Methodget_num_steps(_::Type{T<:InfrastructureSystems.TimeSeriesFileFormat}, file::CSV.File, period::AbstractArray) -> Any
-
Return the number of steps specified by the period in the file.
sourceInfrastructureSystems.get_num_steps
— Methodget_num_steps(_::Type{T<:InfrastructureSystems.TimeSeriesFormatPeriodAsHeader}, file::CSV.File, period::AbstractArray) -> Any
-
Return the number of steps specified by the period in the file.
sourceInfrastructureSystems.get_num_steps
— Methodget_num_steps(_::Type{T<:Union{InfrastructureSystems.TimeSeriesFormatDateTimeAsColumn, InfrastructureSystems.TimeSeriesFormatPeriodAsColumn}}, file::CSV.File, period::AbstractArray) -> Any
-
Return the number of steps specified by the period in the file.
sourceInfrastructureSystems.get_num_supplemental_attributes
— Methodget_num_supplemental_attributes(supplemental_attributes::InfrastructureSystems.SupplementalAttributes) -> Int64
-
Returns the total number of stored supplemental_attributes
sourceInfrastructureSystems.get_percentiles
— Methodget_percentiles(value::InfrastructureSystems.ProbabilisticMetadata) -> Vector{Float64}
-
Get ProbabilisticMetadata
percentiles
.
sourceInfrastructureSystems.get_percentiles
— Methodget_percentiles(value::InfrastructureSystems.Probabilistic) -> Vector{Float64}
-
Get Probabilistic
percentiles
.
sourceInfrastructureSystems.get_period_columns
— Methodget_period_columns(_::Type{InfrastructureSystems.TimeSeriesFormatPeriodAsColumn}, file::CSV.File) -> Vector{Symbol}
-
Return the column names that specify the Period.
sourceInfrastructureSystems.get_resolution
— Methodget_resolution(value::InfrastructureSystems.DeterministicMetadata) -> Dates.Period
-
Get DeterministicMetadata
resolution
.
sourceInfrastructureSystems.get_resolution
— Methodget_resolution(value::InfrastructureSystems.Deterministic) -> Dates.Period
-
Get Deterministic
resolution
.
sourceInfrastructureSystems.get_resolution
— Methodget_resolution(value::InfrastructureSystems.ProbabilisticMetadata) -> Dates.Period
-
Get ProbabilisticMetadata
resolution
.
sourceInfrastructureSystems.get_resolution
— Methodget_resolution(value::InfrastructureSystems.Probabilistic) -> Dates.Period
-
Get Probabilistic
resolution
.
sourceInfrastructureSystems.get_resolution
— Methodget_resolution(value::InfrastructureSystems.ScenariosMetadata) -> Dates.Period
-
Get ScenariosMetadata
resolution
.
sourceInfrastructureSystems.get_resolution
— Methodget_resolution(value::InfrastructureSystems.Scenarios) -> Dates.Period
-
Get Scenarios
resolution
.
sourceInfrastructureSystems.get_resolution
— Methodget_resolution(value::InfrastructureSystems.SingleTimeSeriesMetadata) -> Dates.Period
-
Get SingleTimeSeriesMetadata
resolution
.
sourceInfrastructureSystems.get_resolution
— Methodget_resolution(value::InfrastructureSystems.SingleTimeSeries) -> Dates.Period
-
Get SingleTimeSeries
resolution
.
sourceInfrastructureSystems.get_resolution
— Methodget_resolution(ts::TimeSeries.TimeArray) -> Any
-
Return the resolution from a TimeArray.
sourceInfrastructureSystems.get_scaling_factor_multiplier
— Methodget_scaling_factor_multiplier(value::InfrastructureSystems.DeterministicMetadata) -> Union{Nothing, Function}
-
Get DeterministicMetadata
scaling_factor_multiplier
.
sourceInfrastructureSystems.get_scaling_factor_multiplier
— Methodget_scaling_factor_multiplier(value::InfrastructureSystems.Deterministic) -> Union{Nothing, Function}
-
Get Deterministic
scaling_factor_multiplier
.
sourceInfrastructureSystems.get_scaling_factor_multiplier
— Methodget_scaling_factor_multiplier(value::InfrastructureSystems.ProbabilisticMetadata) -> Union{Nothing, Function}
-
Get ProbabilisticMetadata
scaling_factor_multiplier
.
sourceInfrastructureSystems.get_scaling_factor_multiplier
— Methodget_scaling_factor_multiplier(value::InfrastructureSystems.Probabilistic) -> Union{Nothing, Function}
-
Get Probabilistic
scaling_factor_multiplier
.
sourceInfrastructureSystems.get_scaling_factor_multiplier
— Methodget_scaling_factor_multiplier(value::InfrastructureSystems.ScenariosMetadata) -> Union{Nothing, Function}
-
Get ScenariosMetadata
scaling_factor_multiplier
.
sourceInfrastructureSystems.get_scaling_factor_multiplier
— Methodget_scaling_factor_multiplier(value::InfrastructureSystems.Scenarios) -> Union{Nothing, Function}
-
Get Scenarios
scaling_factor_multiplier
.
sourceInfrastructureSystems.get_scaling_factor_multiplier
— Methodget_scaling_factor_multiplier(value::InfrastructureSystems.SingleTimeSeriesMetadata) -> Union{Nothing, Function}
-
Get SingleTimeSeriesMetadata
scaling_factor_multiplier
.
sourceInfrastructureSystems.get_scaling_factor_multiplier
— Methodget_scaling_factor_multiplier(value::InfrastructureSystems.SingleTimeSeries) -> Union{Nothing, Function}
-
Get SingleTimeSeries
scaling_factor_multiplier
.
sourceInfrastructureSystems.get_scenario_count
— Methodget_scenario_count(value::InfrastructureSystems.ScenariosMetadata) -> Int64
-
Get ScenariosMetadata
scenario_count
.
sourceInfrastructureSystems.get_scenario_count
— Methodget_scenario_count(value::InfrastructureSystems.Scenarios) -> Int64
-
Get Scenarios
scenario_count
.
sourceInfrastructureSystems.get_serialization_metadata
— Methodget_serialization_metadata(data::Dict) -> Any
-
Return the type information for the serialized struct.
sourceInfrastructureSystems.get_single_time_series
— Methodget_single_time_series(value::InfrastructureSystems.DeterministicSingleTimeSeries) -> InfrastructureSystems.SingleTimeSeries
-
Get DeterministicSingleTimeSeries
single_time_series
.
sourceInfrastructureSystems.get_supplemental_attributes
— Methodget_supplemental_attributes(::Type{T<:InfrastructureSystems.InfrastructureSystemsSupplementalAttribute}, supplemental_attributes::InfrastructureSystems.SupplementalAttributes) -> InfrastructureSystems.FlattenIteratorWrapper{_A, _B} where {_A, _B}
+
Returns an iterator of components. T can be concrete or abstract. Call collect on the result if an array is desired.
Arguments
T
: component typecomponents::Components
: Components of the systemfilter_func::Union{Nothing, Function} = nothing
: Optional function that accepts a component of type T and returns a Bool. Apply this function to each component and only return components where the result is true.
See also: iterate_components
sourceInfrastructureSystems.get_components_by_name
— MethodGet the components of abstract type T with name. Note that InfrastructureSystems enforces unique names on each concrete type but not across concrete types.
See get_component
if the concrete type is known.
Throws ArgumentError if T is not an abstract type.
sourceInfrastructureSystems.get_concrete_subtypes
— MethodReturns an array of concrete types that are direct subtypes of T.
sourceInfrastructureSystems.get_count
— Methodget_count(value::InfrastructureSystems.DeterministicMetadata) -> Int64
+
Get DeterministicMetadata
count
.
sourceInfrastructureSystems.get_count
— Methodget_count(value::InfrastructureSystems.DeterministicSingleTimeSeries) -> Int64
+
Get DeterministicSingleTimeSeries
count
.
sourceInfrastructureSystems.get_count
— Methodget_count(value::InfrastructureSystems.ProbabilisticMetadata) -> Int64
+
Get ProbabilisticMetadata
count
.
sourceInfrastructureSystems.get_count
— Methodget_count(value::InfrastructureSystems.ScenariosMetadata) -> Int64
+
Get ScenariosMetadata
count
.
sourceInfrastructureSystems.get_data
— Methodget_data(value::InfrastructureSystems.Deterministic) -> Union{DataStructures.SortedDict{Dates.DateTime, Vector{Vector{Tuple{Float64, Float64}}}, Ord} where Ord<:Base.Order.Ordering, DataStructures.SortedDict{Dates.DateTime, Vector{Float64}, Ord} where Ord<:Base.Order.Ordering, DataStructures.SortedDict{Dates.DateTime, Vector{Tuple{Float64, Float64}}, Ord} where Ord<:Base.Order.Ordering}
+
Get Deterministic
data
.
sourceInfrastructureSystems.get_data
— Methodget_data(value::InfrastructureSystems.Probabilistic) -> Union{DataStructures.SortedDict{Dates.DateTime, Matrix{Vector{Tuple{Float64, Float64}}}, Ord} where Ord<:Base.Order.Ordering, DataStructures.SortedDict{Dates.DateTime, Matrix{Float64}, Ord} where Ord<:Base.Order.Ordering, DataStructures.SortedDict{Dates.DateTime, Matrix{Tuple{Float64, Float64}}, Ord} where Ord<:Base.Order.Ordering}
+
Get Probabilistic
data
.
sourceInfrastructureSystems.get_data
— Methodget_data(value::InfrastructureSystems.Scenarios) -> Union{DataStructures.SortedDict{Dates.DateTime, Matrix{Vector{Tuple{Float64, Float64}}}, Ord} where Ord<:Base.Order.Ordering, DataStructures.SortedDict{Dates.DateTime, Matrix{Float64}, Ord} where Ord<:Base.Order.Ordering, DataStructures.SortedDict{Dates.DateTime, Matrix{Tuple{Float64, Float64}}, Ord} where Ord<:Base.Order.Ordering}
+
Get Scenarios
data
.
sourceInfrastructureSystems.get_data
— Methodget_data(value::InfrastructureSystems.SingleTimeSeries) -> TimeSeries.TimeArray
+
Get SingleTimeSeries
data
.
sourceInfrastructureSystems.get_data_type
— Methodget_data_type(ts::InfrastructureSystems.TimeSeriesData) -> String
+
Return a String for the data type of the forecast data, this implementation avoids the use of eval
on arbitrary code stored in HDF dataset.
sourceInfrastructureSystems.get_ext
— Methodget_ext(obj::InfrastructureSystems.InfrastructureSystemsInternal) -> Union{Nothing, Dict{String, Any}}
+
Return a user-modifiable dictionary to store extra information.
sourceInfrastructureSystems.get_group_level
— Methodget_group_level(logger::InfrastructureSystems.MultiLogger, group::Symbol) -> Union{Nothing, Base.CoreLogging.LogLevel}
+
Return the minimum logging level for a group or nothing if group
is not stored.
sourceInfrastructureSystems.get_group_levels
— Methodget_group_levels(logger::InfrastructureSystems.MultiLogger) -> Dict{Symbol, Base.CoreLogging.LogLevel}
+
Return the minimum logging levels for groups that have been stored.
sourceInfrastructureSystems.get_horizon
— Methodget_horizon(value::InfrastructureSystems.DeterministicMetadata) -> Int64
+
Get DeterministicMetadata
horizon
.
sourceInfrastructureSystems.get_horizon
— Methodget_horizon(value::InfrastructureSystems.DeterministicSingleTimeSeries) -> Int64
+
Get DeterministicSingleTimeSeries
horizon
.
sourceInfrastructureSystems.get_horizon
— Methodget_horizon(value::InfrastructureSystems.ProbabilisticMetadata) -> Int64
+
Get ProbabilisticMetadata
horizon
.
sourceInfrastructureSystems.get_horizon
— Methodget_horizon(value::InfrastructureSystems.ScenariosMetadata) -> Int64
+
Get ScenariosMetadata
horizon
.
sourceInfrastructureSystems.get_initial_times
— Methodget_initial_times(f::InfrastructureSystems.Forecast) -> DataStructures.SDMKeyIteration
+
Return the initial times in the forecast.
sourceInfrastructureSystems.get_initial_timestamp
— Methodget_initial_timestamp(value::InfrastructureSystems.DeterministicMetadata) -> Dates.DateTime
+
Get DeterministicMetadata
initial_timestamp
.
sourceInfrastructureSystems.get_initial_timestamp
— Methodget_initial_timestamp(value::InfrastructureSystems.DeterministicSingleTimeSeries) -> Dates.DateTime
+
Get DeterministicSingleTimeSeries
initial_timestamp
.
sourceInfrastructureSystems.get_initial_timestamp
— Methodget_initial_timestamp(value::InfrastructureSystems.ProbabilisticMetadata) -> Dates.DateTime
+
Get ProbabilisticMetadata
initial_timestamp
.
sourceInfrastructureSystems.get_initial_timestamp
— Methodget_initial_timestamp(value::InfrastructureSystems.ScenariosMetadata) -> Dates.DateTime
+
Get ScenariosMetadata
initial_timestamp
.
sourceInfrastructureSystems.get_initial_timestamp
— Methodget_initial_timestamp(value::InfrastructureSystems.SingleTimeSeriesMetadata) -> Dates.DateTime
+
Get SingleTimeSeriesMetadata
initial_timestamp
.
sourceInfrastructureSystems.get_internal
— Methodget_internal(value::InfrastructureSystems.DeterministicMetadata) -> InfrastructureSystems.InfrastructureSystemsInternal
+
Get DeterministicMetadata
internal
.
sourceInfrastructureSystems.get_internal
— Methodget_internal(value::InfrastructureSystems.Deterministic) -> InfrastructureSystems.InfrastructureSystemsInternal
+
Get Deterministic
internal
.
sourceInfrastructureSystems.get_internal
— Methodget_internal(value::InfrastructureSystems.ProbabilisticMetadata) -> InfrastructureSystems.InfrastructureSystemsInternal
+
Get ProbabilisticMetadata
internal
.
sourceInfrastructureSystems.get_internal
— Methodget_internal(value::InfrastructureSystems.Probabilistic) -> InfrastructureSystems.InfrastructureSystemsInternal
+
Get Probabilistic
internal
.
sourceInfrastructureSystems.get_internal
— Methodget_internal(value::InfrastructureSystems.ScenariosMetadata) -> InfrastructureSystems.InfrastructureSystemsInternal
+
Get ScenariosMetadata
internal
.
sourceInfrastructureSystems.get_internal
— Methodget_internal(value::InfrastructureSystems.Scenarios) -> InfrastructureSystems.InfrastructureSystemsInternal
+
Get Scenarios
internal
.
sourceInfrastructureSystems.get_internal
— Methodget_internal(value::InfrastructureSystems.SingleTimeSeriesMetadata) -> InfrastructureSystems.InfrastructureSystemsInternal
+
Get SingleTimeSeriesMetadata
internal
.
sourceInfrastructureSystems.get_internal
— Methodget_internal(value::InfrastructureSystems.SingleTimeSeries) -> InfrastructureSystems.InfrastructureSystemsInternal
+
Get SingleTimeSeries
internal
.
sourceInfrastructureSystems.get_interval
— Methodget_interval(value::InfrastructureSystems.DeterministicMetadata) -> Dates.Period
+
Get DeterministicMetadata
interval
.
sourceInfrastructureSystems.get_interval
— Methodget_interval(value::InfrastructureSystems.DeterministicSingleTimeSeries) -> Dates.Period
+
Get DeterministicSingleTimeSeries
interval
.
sourceInfrastructureSystems.get_interval
— Methodget_interval(value::InfrastructureSystems.ProbabilisticMetadata) -> Dates.Period
+
Get ProbabilisticMetadata
interval
.
sourceInfrastructureSystems.get_interval
— Methodget_interval(value::InfrastructureSystems.ScenariosMetadata) -> Dates.Period
+
Get ScenariosMetadata
interval
.
sourceInfrastructureSystems.get_length
— Methodget_length(value::InfrastructureSystems.SingleTimeSeriesMetadata) -> Int64
+
Get SingleTimeSeriesMetadata
length
.
sourceInfrastructureSystems.get_log_events
— Methodget_log_events(tracker::InfrastructureSystems.LogEventTracker, level::Base.CoreLogging.LogLevel) -> Union{Base.ValueIterator{Dict{Symbol, InfrastructureSystems.LogEvent}}, Vector{Any}}
+
Returns an iterable of log events for a level.
sourceInfrastructureSystems.get_name
— Methodget_name(value::InfrastructureSystems.DeterministicMetadata) -> String
+
Get DeterministicMetadata
name
.
sourceInfrastructureSystems.get_name
— Methodget_name(value::InfrastructureSystems.Deterministic) -> String
+
Get Deterministic
name
.
sourceInfrastructureSystems.get_name
— Methodget_name(value::InfrastructureSystems.ProbabilisticMetadata) -> String
+
Get ProbabilisticMetadata
name
.
sourceInfrastructureSystems.get_name
— Methodget_name(value::InfrastructureSystems.Probabilistic) -> String
+
Get Probabilistic
name
.
sourceInfrastructureSystems.get_name
— Methodget_name(value::InfrastructureSystems.ScenariosMetadata) -> String
+
Get ScenariosMetadata
name
.
sourceInfrastructureSystems.get_name
— Methodget_name(value::InfrastructureSystems.Scenarios) -> String
+
Get Scenarios
name
.
sourceInfrastructureSystems.get_name
— Methodget_name(value::InfrastructureSystems.SingleTimeSeriesMetadata) -> String
+
Get SingleTimeSeriesMetadata
name
.
sourceInfrastructureSystems.get_name
— Methodget_name(value::InfrastructureSystems.SingleTimeSeries) -> String
+
Get SingleTimeSeries
name
.
sourceInfrastructureSystems.get_next_time
— Methodget_next_time(cache::InfrastructureSystems.TimeSeriesCache) -> Any
+
Return the timestamp for the next read with get_next_time_series_array!
.
Return nothing
if all data has been read.
sourceInfrastructureSystems.get_next_time_series_array!
— Methodget_next_time_series_array!(cache::InfrastructureSystems.TimeSeriesCache) -> Any
+
Return the next TimeSeries.TimeArray.
Returns nothing
when all data has been read. Call reset!
to restart. Call get_next_time
to check the start time.
Reads from storage if the data is not already in cache.
Arguments
cache::StaticTimeSeriesCache
: cached instance
sourceInfrastructureSystems.get_num_steps
— Methodget_num_steps(_::Type{T<:InfrastructureSystems.TimeSeriesFileFormat}, file::CSV.File, period::AbstractArray) -> Any
+
Return the number of steps specified by the period in the file.
sourceInfrastructureSystems.get_num_steps
— Methodget_num_steps(_::Type{T<:InfrastructureSystems.TimeSeriesFormatPeriodAsHeader}, file::CSV.File, period::AbstractArray) -> Any
+
Return the number of steps specified by the period in the file.
sourceInfrastructureSystems.get_num_steps
— Methodget_num_steps(_::Type{T<:Union{InfrastructureSystems.TimeSeriesFormatDateTimeAsColumn, InfrastructureSystems.TimeSeriesFormatPeriodAsColumn}}, file::CSV.File, period::AbstractArray) -> Any
+
Return the number of steps specified by the period in the file.
sourceInfrastructureSystems.get_num_supplemental_attributes
— Methodget_num_supplemental_attributes(supplemental_attributes::InfrastructureSystems.SupplementalAttributes) -> Int64
+
Returns the total number of stored supplemental_attributes
sourceInfrastructureSystems.get_percentiles
— Methodget_percentiles(value::InfrastructureSystems.ProbabilisticMetadata) -> Vector{Float64}
+
Get ProbabilisticMetadata
percentiles
.
sourceInfrastructureSystems.get_percentiles
— Methodget_percentiles(value::InfrastructureSystems.Probabilistic) -> Vector{Float64}
+
Get Probabilistic
percentiles
.
sourceInfrastructureSystems.get_period_columns
— Methodget_period_columns(_::Type{InfrastructureSystems.TimeSeriesFormatPeriodAsColumn}, file::CSV.File) -> Vector{Symbol}
+
Return the column names that specify the Period.
sourceInfrastructureSystems.get_resolution
— Methodget_resolution(value::InfrastructureSystems.DeterministicMetadata) -> Dates.Period
+
Get DeterministicMetadata
resolution
.
sourceInfrastructureSystems.get_resolution
— Methodget_resolution(value::InfrastructureSystems.Deterministic) -> Dates.Period
+
Get Deterministic
resolution
.
sourceInfrastructureSystems.get_resolution
— Methodget_resolution(value::InfrastructureSystems.ProbabilisticMetadata) -> Dates.Period
+
Get ProbabilisticMetadata
resolution
.
sourceInfrastructureSystems.get_resolution
— Methodget_resolution(value::InfrastructureSystems.Probabilistic) -> Dates.Period
+
Get Probabilistic
resolution
.
sourceInfrastructureSystems.get_resolution
— Methodget_resolution(value::InfrastructureSystems.ScenariosMetadata) -> Dates.Period
+
Get ScenariosMetadata
resolution
.
sourceInfrastructureSystems.get_resolution
— Methodget_resolution(value::InfrastructureSystems.Scenarios) -> Dates.Period
+
Get Scenarios
resolution
.
sourceInfrastructureSystems.get_resolution
— Methodget_resolution(value::InfrastructureSystems.SingleTimeSeriesMetadata) -> Dates.Period
+
Get SingleTimeSeriesMetadata
resolution
.
sourceInfrastructureSystems.get_resolution
— Methodget_resolution(value::InfrastructureSystems.SingleTimeSeries) -> Dates.Period
+
Get SingleTimeSeries
resolution
.
sourceInfrastructureSystems.get_resolution
— Methodget_resolution(ts::TimeSeries.TimeArray) -> Any
+
Return the resolution from a TimeArray.
sourceInfrastructureSystems.get_scaling_factor_multiplier
— Methodget_scaling_factor_multiplier(value::InfrastructureSystems.DeterministicMetadata) -> Union{Nothing, Function}
+
Get DeterministicMetadata
scaling_factor_multiplier
.
sourceInfrastructureSystems.get_scaling_factor_multiplier
— Methodget_scaling_factor_multiplier(value::InfrastructureSystems.Deterministic) -> Union{Nothing, Function}
+
Get Deterministic
scaling_factor_multiplier
.
sourceInfrastructureSystems.get_scaling_factor_multiplier
— Methodget_scaling_factor_multiplier(value::InfrastructureSystems.ProbabilisticMetadata) -> Union{Nothing, Function}
+
Get ProbabilisticMetadata
scaling_factor_multiplier
.
sourceInfrastructureSystems.get_scaling_factor_multiplier
— Methodget_scaling_factor_multiplier(value::InfrastructureSystems.Probabilistic) -> Union{Nothing, Function}
+
Get Probabilistic
scaling_factor_multiplier
.
sourceInfrastructureSystems.get_scaling_factor_multiplier
— Methodget_scaling_factor_multiplier(value::InfrastructureSystems.ScenariosMetadata) -> Union{Nothing, Function}
+
Get ScenariosMetadata
scaling_factor_multiplier
.
sourceInfrastructureSystems.get_scaling_factor_multiplier
— Methodget_scaling_factor_multiplier(value::InfrastructureSystems.Scenarios) -> Union{Nothing, Function}
+
Get Scenarios
scaling_factor_multiplier
.
sourceInfrastructureSystems.get_scaling_factor_multiplier
— Methodget_scaling_factor_multiplier(value::InfrastructureSystems.SingleTimeSeriesMetadata) -> Union{Nothing, Function}
+
Get SingleTimeSeriesMetadata
scaling_factor_multiplier
.
sourceInfrastructureSystems.get_scaling_factor_multiplier
— Methodget_scaling_factor_multiplier(value::InfrastructureSystems.SingleTimeSeries) -> Union{Nothing, Function}
+
Get SingleTimeSeries
scaling_factor_multiplier
.
sourceInfrastructureSystems.get_scenario_count
— Methodget_scenario_count(value::InfrastructureSystems.ScenariosMetadata) -> Int64
+
Get ScenariosMetadata
scenario_count
.
sourceInfrastructureSystems.get_scenario_count
— Methodget_scenario_count(value::InfrastructureSystems.Scenarios) -> Int64
+
Get Scenarios
scenario_count
.
sourceInfrastructureSystems.get_serialization_metadata
— Methodget_serialization_metadata(data::Dict) -> Any
+
Return the type information for the serialized struct.
sourceInfrastructureSystems.get_single_time_series
— Methodget_single_time_series(value::InfrastructureSystems.DeterministicSingleTimeSeries) -> InfrastructureSystems.SingleTimeSeries
+
Get DeterministicSingleTimeSeries
single_time_series
.
sourceInfrastructureSystems.get_supplemental_attributes
— Methodget_supplemental_attributes(::Type{T<:InfrastructureSystems.InfrastructureSystemsSupplementalAttribute}, supplemental_attributes::InfrastructureSystems.SupplementalAttributes) -> InfrastructureSystems.FlattenIteratorWrapper{_A, _B} where {_A, _B}
get_supplemental_attributes(::Type{T<:InfrastructureSystems.InfrastructureSystemsSupplementalAttribute}, supplemental_attributes::InfrastructureSystems.SupplementalAttributes, filter_func::Union{Nothing, Function}) -> InfrastructureSystems.FlattenIteratorWrapper{_A, _B} where {_A, _B}
-
Returns an iterator of supplemental_attributes. T can be concrete or abstract. Call collect on the result if an array is desired.
Arguments
T
: supplemental_attribute typesupplemental_attributes::SupplementalAttributes
: SupplementalAttributes in the systemfilter_func::Union{Nothing, Function} = nothing
: Optional function that accepts a component of type T and returns a Bool. Apply this function to each component and only return components where the result is true.
sourceInfrastructureSystems.get_time_series
— MethodReturn a time series corresponding to the given parameters.
Arguments
::Type{T}
: Concrete subtype of TimeSeriesData to returncomponent::SUPPORTED_TIME_SERIES_TYPES
: Component containing the time seriesname::AbstractString
: name of time seriesstart_time::Union{Nothing, Dates.DateTime} = nothing
: If nothing, use the initial_timestamp
of the time series. If T is a subtype of Forecast then start_time
must be the first timstamp of a window.len::Union{Nothing, Int} = nothing
: Length in the time dimension. If nothing, use the entire length.count::Union{Nothing, Int} = nothing
: Only applicable to subtypes of Forecast. Number of forecast windows starting at start_time
to return. Defaults to all available.
sourceInfrastructureSystems.get_time_series_array
— Functionget_time_series_array(component::Union{InfrastructureSystems.InfrastructureSystemsComponent, InfrastructureSystems.InfrastructureSystemsSupplementalAttribute}, time_series::InfrastructureSystems.StaticTimeSeries) -> Any
+
Returns an iterator of supplemental_attributes. T can be concrete or abstract. Call collect on the result if an array is desired.
Arguments
T
: supplemental_attribute typesupplemental_attributes::SupplementalAttributes
: SupplementalAttributes in the systemfilter_func::Union{Nothing, Function} = nothing
: Optional function that accepts a component of type T and returns a Bool. Apply this function to each component and only return components where the result is true.
sourceInfrastructureSystems.get_time_series
— Methodget_time_series(::Type{T<:InfrastructureSystems.TimeSeriesData}, component::Union{InfrastructureSystems.InfrastructureSystemsComponent, InfrastructureSystems.InfrastructureSystemsSupplementalAttribute}, name::AbstractString; start_time, len, count) -> Any
+
Return a time series corresponding to the given parameters.
Arguments
::Type{T}
: Concrete subtype of TimeSeriesData to returncomponent::SUPPORTED_TIME_SERIES_TYPES
: Component containing the time seriesname::AbstractString
: name of time seriesstart_time::Union{Nothing, Dates.DateTime} = nothing
: If nothing, use the initial_timestamp
of the time series. If T is a subtype of Forecast then start_time
must be the first timstamp of a window.len::Union{Nothing, Int} = nothing
: Length in the time dimension. If nothing, use the entire length.count::Union{Nothing, Int} = nothing
: Only applicable to subtypes of Forecast. Number of forecast windows starting at start_time
to return. Defaults to all available.
sourceInfrastructureSystems.get_time_series_array
— Functionget_time_series_array(component::Union{InfrastructureSystems.InfrastructureSystemsComponent, InfrastructureSystems.InfrastructureSystemsSupplementalAttribute}, time_series::InfrastructureSystems.StaticTimeSeries) -> Any
get_time_series_array(component::Union{InfrastructureSystems.InfrastructureSystemsComponent, InfrastructureSystems.InfrastructureSystemsSupplementalAttribute}, time_series::InfrastructureSystems.StaticTimeSeries, start_time::Union{Nothing, Dates.DateTime}; len, ignore_scaling_factors) -> Any
-
Return a TimeSeries.TimeArray from a cached StaticTimeSeries instance.
If the data are scaling factors then the stored scalingfactormultiplier will be called on the component and applied to the data unless ignorescalingfactors is true.
See also StaticTimeSeriesCache
.
sourceInfrastructureSystems.get_time_series_array!
— Methodget_time_series_array!(cache::InfrastructureSystems.TimeSeriesCache, timestamp::Dates.DateTime) -> Any
-
Return the TimeSeries.TimeArray starting at timestamp. Reads from storage if the data is not already in cache.
Timestamps must be read sequentially. Random access may be added in the future.
Arguments
cache::StaticTimeSeriesCache
: cached instancetimestamp::Dates.DateTime
: starting timestamp for the time series array
sourceInfrastructureSystems.get_time_series_array
— Methodget_time_series_array(component::Union{InfrastructureSystems.InfrastructureSystemsComponent, InfrastructureSystems.InfrastructureSystemsSupplementalAttribute}, forecast::InfrastructureSystems.Forecast, start_time::Dates.DateTime; len, ignore_scaling_factors) -> Any
-
Return a TimeSeries.TimeArray for one forecast window from a cached Forecast instance.
If the data are scaling factors then the stored scalingfactormultiplier will be called on the component and applied to the data unless ignorescalingfactors is true.
See also ForecastCache
.
sourceInfrastructureSystems.get_time_series_array
— MethodReturn a TimeSeries.TimeArray from storage for the given time series parameters.
If the data are scaling factors then the stored scalingfactormultiplier will be called on the component and applied to the data unless ignorescalingfactors is true.
sourceInfrastructureSystems.get_time_series_container
— Methodget_time_series_container(value::InfrastructureSystems.InfrastructureSystemsComponent) -> InfrastructureSystems.TimeSeriesContainer
-
Return the internal time_series storage container or nothing, if the type doesn't store time series.
Subtypes need to implement this method if they store time series.
sourceInfrastructureSystems.get_time_series_counts
— Methodget_time_series_counts(data::InfrastructureSystems.SystemData) -> Tuple{Int64, Any, Any}
-
Return a tuple of counts of components with time series and total time series and forecasts.
sourceInfrastructureSystems.get_time_series_format
— Methodget_time_series_format(file::CSV.File) -> Type
-
Return the time series format used in the CSV file.
sourceInfrastructureSystems.get_time_series_multiple
— Functionget_time_series_multiple(component::InfrastructureSystems.InfrastructureSystemsComponent) -> Channel{Any}
-get_time_series_multiple(component::InfrastructureSystems.InfrastructureSystemsComponent, filter_func; type, start_time, name) -> Channel{Any}
-
Returns an iterator of TimeSeriesData instances attached to the component.
Note that passing a filter function can be much slower than the other filtering parameters because it reads time series data from media.
Call collect
on the result to get an array.
Arguments
component::InfrastructureSystemsComponent
: component from which to get time_seriesfilter_func = nothing
: Only return time_series for which this returns true.type = nothing
: Only return time_series with this type.name = nothing
: Only return time_series matching this value.
sourceInfrastructureSystems.get_time_series_multiple
— Functionget_time_series_multiple(data::InfrastructureSystems.SystemData) -> Channel{Any}
+
Return a TimeSeries.TimeArray from a cached StaticTimeSeries instance.
If the data are scaling factors then the stored scalingfactormultiplier will be called on the component and applied to the data unless ignorescalingfactors is true.
See also StaticTimeSeriesCache
.
sourceInfrastructureSystems.get_time_series_array!
— Methodget_time_series_array!(cache::InfrastructureSystems.TimeSeriesCache, timestamp::Dates.DateTime) -> Any
+
Return the TimeSeries.TimeArray starting at timestamp. Reads from storage if the data is not already in cache.
Timestamps must be read sequentially. Random access may be added in the future.
Arguments
cache::StaticTimeSeriesCache
: cached instancetimestamp::Dates.DateTime
: starting timestamp for the time series array
sourceInfrastructureSystems.get_time_series_array
— Methodget_time_series_array(component::Union{InfrastructureSystems.InfrastructureSystemsComponent, InfrastructureSystems.InfrastructureSystemsSupplementalAttribute}, forecast::InfrastructureSystems.Forecast, start_time::Dates.DateTime; len, ignore_scaling_factors) -> Any
+
Return a TimeSeries.TimeArray for one forecast window from a cached Forecast instance.
If the data are scaling factors then the stored scalingfactormultiplier will be called on the component and applied to the data unless ignorescalingfactors is true.
See also ForecastCache
.
sourceInfrastructureSystems.get_time_series_array
— MethodReturn a TimeSeries.TimeArray from storage for the given time series parameters.
If the data are scaling factors then the stored scalingfactormultiplier will be called on the component and applied to the data unless ignorescalingfactors is true.
sourceInfrastructureSystems.get_time_series_container
— Methodget_time_series_container(value::InfrastructureSystems.InfrastructureSystemsComponent) -> InfrastructureSystems.TimeSeriesContainer
+
Return the internal time_series storage container or nothing, if the type doesn't store time series.
Subtypes need to implement this method if they store time series.
sourceInfrastructureSystems.get_time_series_counts
— Methodget_time_series_counts(data::InfrastructureSystems.SystemData) -> Tuple{Int64, Any, Any}
+
Return a tuple of counts of components with time series and total time series and forecasts.
sourceInfrastructureSystems.get_time_series_format
— Methodget_time_series_format(file::CSV.File) -> Type
+
Return the time series format used in the CSV file.
sourceInfrastructureSystems.get_time_series_multiple
— Functionget_time_series_multiple(data::InfrastructureSystems.SystemData) -> Channel{Any}
get_time_series_multiple(data::InfrastructureSystems.SystemData, filter_func; type, name) -> Channel{Any}
-
Returns an iterator of TimeSeriesData instances attached to the system.
Note that passing a filter function can be much slower than the other filtering parameters because it reads time series data from media.
Call collect
on the result to get an array.
Arguments
data::SystemData
: systemfilter_func = nothing
: Only return time_series for which this returns true.type = nothing
: Only return time_series with this type.name = nothing
: Only return time_series matching this value.
sourceInfrastructureSystems.get_time_series_multiple
— Methodget_time_series_multiple(_::Type{InfrastructureSystems.TimeSeriesMetadata}, component::InfrastructureSystems.InfrastructureSystemsComponent) -> Channel{Any}
-
Returns an iterator of TimeSeriesMetadata instances attached to the component.
sourceInfrastructureSystems.get_time_series_timestamps
— Functionget_time_series_timestamps(component::Union{InfrastructureSystems.InfrastructureSystemsComponent, InfrastructureSystems.InfrastructureSystemsSupplementalAttribute}, time_series::InfrastructureSystems.StaticTimeSeries) -> Vector{D} where D<:Dates.TimeType
-get_time_series_timestamps(component::Union{InfrastructureSystems.InfrastructureSystemsComponent, InfrastructureSystems.InfrastructureSystemsSupplementalAttribute}, time_series::InfrastructureSystems.StaticTimeSeries, start_time::Union{Nothing, Dates.DateTime}; len) -> Vector{D} where D<:Dates.TimeType
-
Return a vector of timestamps from a cached StaticTimeSeries instance.
sourceInfrastructureSystems.get_time_series_timestamps
— Functionget_time_series_timestamps(component::Union{InfrastructureSystems.InfrastructureSystemsComponent, InfrastructureSystems.InfrastructureSystemsSupplementalAttribute}, forecast::InfrastructureSystems.Forecast)
+
Returns an iterator of TimeSeriesData instances attached to the system.
Note that passing a filter function can be much slower than the other filtering parameters because it reads time series data from media.
Call collect
on the result to get an array.
Arguments
data::SystemData
: systemfilter_func = nothing
: Only return time_series for which this returns true.type = nothing
: Only return time_series with this type.name = nothing
: Only return time_series matching this value.
sourceInfrastructureSystems.get_time_series_multiple
— Functionget_time_series_multiple(component::InfrastructureSystems.InfrastructureSystemsComponent) -> Channel{Any}
+get_time_series_multiple(component::InfrastructureSystems.InfrastructureSystemsComponent, filter_func; type, start_time, name) -> Channel{Any}
+
Returns an iterator of TimeSeriesData instances attached to the component.
Note that passing a filter function can be much slower than the other filtering parameters because it reads time series data from media.
Call collect
on the result to get an array.
Arguments
component::InfrastructureSystemsComponent
: component from which to get time_seriesfilter_func = nothing
: Only return time_series for which this returns true.type = nothing
: Only return time_series with this type.name = nothing
: Only return time_series matching this value.
sourceInfrastructureSystems.get_time_series_multiple
— Methodget_time_series_multiple(_::Type{InfrastructureSystems.TimeSeriesMetadata}, component::InfrastructureSystems.InfrastructureSystemsComponent) -> Channel{Any}
+
Returns an iterator of TimeSeriesMetadata instances attached to the component.
sourceInfrastructureSystems.get_time_series_timestamps
— Functionget_time_series_timestamps(component::Union{InfrastructureSystems.InfrastructureSystemsComponent, InfrastructureSystems.InfrastructureSystemsSupplementalAttribute}, forecast::InfrastructureSystems.Forecast)
get_time_series_timestamps(component::Union{InfrastructureSystems.InfrastructureSystemsComponent, InfrastructureSystems.InfrastructureSystemsSupplementalAttribute}, forecast::InfrastructureSystems.Forecast, start_time::Union{Nothing, Dates.DateTime}; len) -> Vector{D} where D<:Dates.TimeType
-
Return a vector of timestamps from a cached Forecast instance.
sourceInfrastructureSystems.get_time_series_timestamps
— Methodget_time_series_timestamps(::Type{T<:InfrastructureSystems.TimeSeriesData}, component::Union{InfrastructureSystems.InfrastructureSystemsComponent, InfrastructureSystems.InfrastructureSystemsSupplementalAttribute}, name::AbstractString; start_time, len) -> Vector{D} where D<:Dates.TimeType
-
Return a vector of timestamps from storage for the given time series parameters.
sourceInfrastructureSystems.get_time_series_type
— Methodget_time_series_type(value::InfrastructureSystems.DeterministicMetadata) -> Type{var"#s448"} where var"#s448"<:InfrastructureSystems.AbstractDeterministic
-
Get DeterministicMetadata
time_series_type
.
sourceInfrastructureSystems.get_time_series_uuid
— Methodget_time_series_uuid(value::InfrastructureSystems.DeterministicMetadata) -> Base.UUID
-
Get DeterministicMetadata
time_series_uuid
.
sourceInfrastructureSystems.get_time_series_uuid
— Methodget_time_series_uuid(value::InfrastructureSystems.ProbabilisticMetadata) -> Base.UUID
-
Get ProbabilisticMetadata
time_series_uuid
.
sourceInfrastructureSystems.get_time_series_uuid
— Methodget_time_series_uuid(value::InfrastructureSystems.ScenariosMetadata) -> Base.UUID
-
Get ScenariosMetadata
time_series_uuid
.
sourceInfrastructureSystems.get_time_series_uuid
— Methodget_time_series_uuid(value::InfrastructureSystems.SingleTimeSeriesMetadata) -> Base.UUID
-
Get SingleTimeSeriesMetadata
time_series_uuid
.
sourceInfrastructureSystems.get_time_series_values
— Functionget_time_series_values(component::Union{InfrastructureSystems.InfrastructureSystemsComponent, InfrastructureSystems.InfrastructureSystemsSupplementalAttribute}, time_series::InfrastructureSystems.StaticTimeSeries) -> Any
+
Return a vector of timestamps from a cached Forecast instance.
sourceInfrastructureSystems.get_time_series_timestamps
— Functionget_time_series_timestamps(component::Union{InfrastructureSystems.InfrastructureSystemsComponent, InfrastructureSystems.InfrastructureSystemsSupplementalAttribute}, time_series::InfrastructureSystems.StaticTimeSeries) -> Vector{D} where D<:Dates.TimeType
+get_time_series_timestamps(component::Union{InfrastructureSystems.InfrastructureSystemsComponent, InfrastructureSystems.InfrastructureSystemsSupplementalAttribute}, time_series::InfrastructureSystems.StaticTimeSeries, start_time::Union{Nothing, Dates.DateTime}; len) -> Vector{D} where D<:Dates.TimeType
+
Return a vector of timestamps from a cached StaticTimeSeries instance.
sourceInfrastructureSystems.get_time_series_timestamps
— MethodReturn a vector of timestamps from storage for the given time series parameters.
sourceInfrastructureSystems.get_time_series_type
— Methodget_time_series_type(value::InfrastructureSystems.DeterministicMetadata) -> Type{var"#s448"} where var"#s448"<:InfrastructureSystems.AbstractDeterministic
+
Get DeterministicMetadata
time_series_type
.
sourceInfrastructureSystems.get_time_series_uuid
— Methodget_time_series_uuid(value::InfrastructureSystems.DeterministicMetadata) -> Base.UUID
+
Get DeterministicMetadata
time_series_uuid
.
sourceInfrastructureSystems.get_time_series_uuid
— Methodget_time_series_uuid(value::InfrastructureSystems.ProbabilisticMetadata) -> Base.UUID
+
Get ProbabilisticMetadata
time_series_uuid
.
sourceInfrastructureSystems.get_time_series_uuid
— Methodget_time_series_uuid(value::InfrastructureSystems.ScenariosMetadata) -> Base.UUID
+
Get ScenariosMetadata
time_series_uuid
.
sourceInfrastructureSystems.get_time_series_uuid
— Methodget_time_series_uuid(value::InfrastructureSystems.SingleTimeSeriesMetadata) -> Base.UUID
+
Get SingleTimeSeriesMetadata
time_series_uuid
.
sourceInfrastructureSystems.get_time_series_values
— Functionget_time_series_values(component::Union{InfrastructureSystems.InfrastructureSystemsComponent, InfrastructureSystems.InfrastructureSystemsSupplementalAttribute}, time_series::InfrastructureSystems.StaticTimeSeries) -> Any
get_time_series_values(component::Union{InfrastructureSystems.InfrastructureSystemsComponent, InfrastructureSystems.InfrastructureSystemsSupplementalAttribute}, time_series::InfrastructureSystems.StaticTimeSeries, start_time::Union{Nothing, Dates.DateTime}; len, ignore_scaling_factors) -> Any
-
Return an Array of values from a cached StaticTimeSeries instance for the requested time series parameters.
sourceInfrastructureSystems.get_time_series_values
— Methodget_time_series_values(component::Union{InfrastructureSystems.InfrastructureSystemsComponent, InfrastructureSystems.InfrastructureSystemsSupplementalAttribute}, forecast::InfrastructureSystems.Forecast, start_time::Dates.DateTime; len, ignore_scaling_factors) -> Any
-
Return an Array of values for one forecast window from a cached Forecast instance.
sourceInfrastructureSystems.get_time_series_values
— MethodReturn an Array of values from storage for the requested time series parameters.
If the data size is small and this will be called many times, consider using the version that accepts a cached TimeSeriesData instance.
sourceInfrastructureSystems.get_timestamp
— Methodget_timestamp(_::Type{InfrastructureSystems.TimeSeriesFormatYMDPeriodAsColumn}, file::CSV.File, row_index::Int64) -> Any
-
Return a Dates.DateTime for the row in the CSV file.
sourceInfrastructureSystems.get_total_period
— Methodget_total_period(f::InfrastructureSystems.Forecast) -> Any
-
Return the total period covered by the forecast.
sourceInfrastructureSystems.get_unique_timestamps
— Methodget_unique_timestamps(_::Type{T<:InfrastructureSystems.TimeSeriesFileFormat}, file::CSV.File) -> Vector{Dict{String, Any}}
-
Return a vector of dicts of unique timestamps and their counts.
sourceInfrastructureSystems.get_uuid
— Methodget_uuid(obj::InfrastructureSystems.InfrastructureSystemsType) -> Base.UUID
-
Gets the UUID for any InfrastructureSystemsType.
sourceInfrastructureSystems.get_value_columns
— Methodget_value_columns(_::Type{InfrastructureSystems.TimeSeriesFormatComponentsAsColumnsNoTime}, file::CSV.File) -> Vector{Symbol}
-
Return the column names with values.
sourceInfrastructureSystems.get_value_columns
— Methodget_value_columns(_::Type{InfrastructureSystems.TimeSeriesFormatYMDPeriodAsColumn}, file::CSV.File) -> Vector{Symbol}
-
Return the column names with values (components).
sourceInfrastructureSystems.get_window
— Methodget_window(forecast::InfrastructureSystems.Forecast, index::Int64; len) -> Any
-
Return the forecast window corresponsing to interval index.
sourceInfrastructureSystems.has_component
— MethodCheck to see if a component exists.
sourceInfrastructureSystems.has_supplemental_attribute
— Methodhas_supplemental_attribute(_::Type{T<:InfrastructureSystems.InfrastructureSystemsSupplementalAttribute}, component::InfrastructureSystems.InfrastructureSystemsComponent) -> Bool
-
Check to see if supplemental_attribute exists.
sourceInfrastructureSystems.has_supplemental_attributes
— Methodhas_supplemental_attributes(component::InfrastructureSystems.InfrastructureSystemsComponent) -> Bool
-
Return true if the component has infos.
sourceInfrastructureSystems.has_time_series
— Methodhas_time_series(info::InfrastructureSystems.InfrastructureSystemsSupplementalAttribute) -> Bool
-
Return true if the info has time series data.
sourceInfrastructureSystems.has_time_series
— Methodhas_time_series(component::Union{InfrastructureSystems.InfrastructureSystemsComponent, InfrastructureSystems.InfrastructureSystemsSupplementalAttribute}) -> Bool
-
Return true if the component has time series data.
sourceInfrastructureSystems.has_time_series
— Methodhas_time_series(component::Union{InfrastructureSystems.InfrastructureSystemsComponent, InfrastructureSystems.InfrastructureSystemsSupplementalAttribute}, _::Type{T<:InfrastructureSystems.TimeSeriesData}) -> Bool
-
Return true if the component has time series data of type T.
sourceInfrastructureSystems.head
— Methodhead(time_series::InfrastructureSystems.SingleTimeSeries) -> Any
-
Return a time_series with only the first num values.
sourceInfrastructureSystems.increment_count!
— Methodincrement_count!(tracker::InfrastructureSystems.LogEventTracker, event::InfrastructureSystems.LogEvent, suppressed::Bool) -> Union{Nothing, Int64, InfrastructureSystems.LogEvent}
-
Increments the count of a log event.
sourceInfrastructureSystems.index_to_initial_time
— Methodindex_to_initial_time(forecast::InfrastructureSystems.Forecast, index::Int64) -> Any
-
Return the Dates.DateTime corresponding to an interval index.
sourceInfrastructureSystems.is_ext_valid_for_serialization
— Methodis_ext_valid_for_serialization(value) -> Bool
-
Perform a test to see if JSON3 can convert this value so that the code can give the user a a comprehensible corrective action.
sourceInfrastructureSystems.iterate_components
— Methoditerate_components(components::InfrastructureSystems.Components) -> Channel{Any}
+
Return an Array of values from a cached StaticTimeSeries instance for the requested time series parameters.
sourceInfrastructureSystems.get_time_series_values
— Methodget_time_series_values(component::Union{InfrastructureSystems.InfrastructureSystemsComponent, InfrastructureSystems.InfrastructureSystemsSupplementalAttribute}, forecast::InfrastructureSystems.Forecast, start_time::Dates.DateTime; len, ignore_scaling_factors) -> Any
+
Return an Array of values for one forecast window from a cached Forecast instance.
sourceInfrastructureSystems.get_time_series_values
— MethodReturn an Array of values from storage for the requested time series parameters.
If the data size is small and this will be called many times, consider using the version that accepts a cached TimeSeriesData instance.
sourceInfrastructureSystems.get_timestamp
— Methodget_timestamp(_::Type{InfrastructureSystems.TimeSeriesFormatYMDPeriodAsColumn}, file::CSV.File, row_index::Int64) -> Any
+
Return a Dates.DateTime for the row in the CSV file.
sourceInfrastructureSystems.get_total_period
— Methodget_total_period(f::InfrastructureSystems.Forecast) -> Any
+
Return the total period covered by the forecast.
sourceInfrastructureSystems.get_unique_timestamps
— Methodget_unique_timestamps(_::Type{T<:InfrastructureSystems.TimeSeriesFileFormat}, file::CSV.File) -> Vector{Dict{String, Any}}
+
Return a vector of dicts of unique timestamps and their counts.
sourceInfrastructureSystems.get_uuid
— Methodget_uuid(obj::InfrastructureSystems.InfrastructureSystemsType) -> Base.UUID
+
Gets the UUID for any InfrastructureSystemsType.
sourceInfrastructureSystems.get_value_columns
— Methodget_value_columns(_::Type{InfrastructureSystems.TimeSeriesFormatComponentsAsColumnsNoTime}, file::CSV.File) -> Vector{Symbol}
+
Return the column names with values.
sourceInfrastructureSystems.get_value_columns
— Methodget_value_columns(_::Type{InfrastructureSystems.TimeSeriesFormatYMDPeriodAsColumn}, file::CSV.File) -> Vector{Symbol}
+
Return the column names with values (components).
sourceInfrastructureSystems.get_window
— Methodget_window(forecast::InfrastructureSystems.Forecast, index::Int64; len) -> Any
+
Return the forecast window corresponsing to interval index.
sourceInfrastructureSystems.has_component
— MethodCheck to see if a component exists.
sourceInfrastructureSystems.has_supplemental_attribute
— Methodhas_supplemental_attribute(_::Type{T<:InfrastructureSystems.InfrastructureSystemsSupplementalAttribute}, component::InfrastructureSystems.InfrastructureSystemsComponent) -> Bool
+
Check to see if supplemental_attribute exists.
sourceInfrastructureSystems.has_supplemental_attributes
— Methodhas_supplemental_attributes(component::InfrastructureSystems.InfrastructureSystemsComponent) -> Bool
+
Return true if the component has attributes.
sourceInfrastructureSystems.has_time_series
— Methodhas_time_series(info::InfrastructureSystems.InfrastructureSystemsSupplementalAttribute) -> Bool
+
Return true if the info has time series data.
sourceInfrastructureSystems.has_time_series
— Methodhas_time_series(component::Union{InfrastructureSystems.InfrastructureSystemsComponent, InfrastructureSystems.InfrastructureSystemsSupplementalAttribute}) -> Bool
+
Return true if the component has time series data.
sourceInfrastructureSystems.has_time_series
— Methodhas_time_series(component::Union{InfrastructureSystems.InfrastructureSystemsComponent, InfrastructureSystems.InfrastructureSystemsSupplementalAttribute}, _::Type{T<:InfrastructureSystems.TimeSeriesData}) -> Bool
+
Return true if the component has time series data of type T.
sourceInfrastructureSystems.head
— Methodhead(time_series::InfrastructureSystems.SingleTimeSeries) -> Any
+
Return a time_series with only the first num values.
sourceInfrastructureSystems.increment_count!
— Methodincrement_count!(tracker::InfrastructureSystems.LogEventTracker, event::InfrastructureSystems.LogEvent, suppressed::Bool) -> Union{Nothing, Int64, InfrastructureSystems.LogEvent}
+
Increments the count of a log event.
sourceInfrastructureSystems.index_to_initial_time
— Methodindex_to_initial_time(forecast::InfrastructureSystems.Forecast, index::Int64) -> Any
+
Return the Dates.DateTime corresponding to an interval index.
sourceInfrastructureSystems.is_ext_valid_for_serialization
— Methodis_ext_valid_for_serialization(value) -> Bool
+
Perform a test to see if JSON3 can convert this value so that the code can give the user a a comprehensible corrective action.
sourceInfrastructureSystems.iterate_components
— Methoditerate_components(components::InfrastructureSystems.Components) -> Channel{Any}
Iterates over all components.
Examples
for component in iterate_components(obj)
@show component
-end
See also: get_components
sourceInfrastructureSystems.iterate_container
— Methoditerate_container(container::InfrastructureSystems.InfrastructureSystemsContainer) -> Channel{Any}
-
Iterates over all data in the container.
sourceInfrastructureSystems.iterate_supplemental_attributes
— Methoditerate_supplemental_attributes(supplemental_attributes::InfrastructureSystems.SupplementalAttributes) -> Channel{Any}
+end
See also: get_components
sourceInfrastructureSystems.iterate_container
— Methoditerate_container(container::InfrastructureSystems.InfrastructureSystemsContainer) -> Channel{Any}
+
Iterates over all data in the container.
sourceInfrastructureSystems.iterate_supplemental_attributes
— Methoditerate_supplemental_attributes(supplemental_attributes::InfrastructureSystems.SupplementalAttributes) -> Channel{Any}
Iterates over all supplemental_attributes.
Examples
for supplemental_attribute in iterate_supplemental_attributes(obj)
@show supplemental_attribute
-end
sourceInfrastructureSystems.list_recorder_events
— MethodReturn the events of type T in filename.
Arguments
T
: event typefilename::AbstractString
: filename containing recorder eventsfilter_func::Union{Nothing, Function} = nothing
: Optional function that accepts an event of type T and returns a Bool. Apply this function to each event and only return events where the result is true.
sourceInfrastructureSystems.make_time_array
— Methodmake_time_array(forecast::InfrastructureSystems.Forecast, start_time::Dates.DateTime; len) -> Any
-
Return a TimeSeries.TimeArray for one forecast window.
sourceInfrastructureSystems.make_time_series!
— Methodmake_time_series!(cache::InfrastructureSystems.TimeSeriesParsingCache, ts_file_metadata::InfrastructureSystems.TimeSeriesFileMetadata) -> Any
-
Return a time series from TimeSeriesFileMetadata.
Arguments
cache::TimeSeriesParsingCache
: cached datats_file_metadata::TimeSeriesFileMetadata
: metadataresolution::{Nothing, Dates.Period}
: skip any time_series that don't match this resolution
sourceInfrastructureSystems.mask_component!
— Methodmask_component!(data::InfrastructureSystems.SystemData, component::InfrastructureSystems.InfrastructureSystemsComponent)
-
Removes the component from the main container and adds it to the masked container.
sourceInfrastructureSystems.open_file_logger
— Functionopen_file_logger(func::Function, filename::String) -> Any
+end
sourceInfrastructureSystems.list_recorder_events
— MethodReturn the events of type T in filename.
Arguments
T
: event typefilename::AbstractString
: filename containing recorder eventsfilter_func::Union{Nothing, Function} = nothing
: Optional function that accepts an event of type T and returns a Bool. Apply this function to each event and only return events where the result is true.
sourceInfrastructureSystems.make_time_array
— Methodmake_time_array(forecast::InfrastructureSystems.Forecast, start_time::Dates.DateTime; len) -> Any
+
Return a TimeSeries.TimeArray for one forecast window.
sourceInfrastructureSystems.make_time_series!
— Methodmake_time_series!(cache::InfrastructureSystems.TimeSeriesParsingCache, ts_file_metadata::InfrastructureSystems.TimeSeriesFileMetadata) -> Any
+
Return a time series from TimeSeriesFileMetadata.
Arguments
cache::TimeSeriesParsingCache
: cached datats_file_metadata::TimeSeriesFileMetadata
: metadataresolution::{Nothing, Dates.Period}
: skip any time_series that don't match this resolution
sourceInfrastructureSystems.mask_component!
— Methodmask_component!(data::InfrastructureSystems.SystemData, component::InfrastructureSystems.InfrastructureSystemsComponent)
+
Removes the component from the main container and adds it to the masked container.
sourceInfrastructureSystems.open_file_logger
— Functionopen_file_logger(func::Function, filename::String) -> Any
open_file_logger(func::Function, filename::String, level) -> Any
open_file_logger(func::Function, filename::String, level, mode) -> Any
Opens a file logger using Logging.SimpleLogger.
Example
open_file_logger("log.txt", Logging.Info) do logger
global_logger(logger)
@info "hello world"
-end
sourceInfrastructureSystems.prepare_for_removal!
— Methodprepare_for_removal!(component::InfrastructureSystems.InfrastructureSystemsComponent)
-
This function must be called when a component is removed from a system.
sourceInfrastructureSystems.prepare_for_removal!
— MethodThis function must be called when a component is removed from a system.
sourceInfrastructureSystems.prepare_for_serialization!
— Methodprepare_for_serialization!(data::InfrastructureSystems.SystemData, filename::AbstractString; force)
-
Parent object should call this prior to serialization so that SystemData can store the appropriate path information for the time series data.
sourceInfrastructureSystems.read_time_series
— Methodread_time_series(::Type{T<:InfrastructureSystems.TimeSeriesData}, data_file::AbstractString) -> InfrastructureSystems.RawTimeSeries
+end
sourceInfrastructureSystems.prepare_for_removal!
— Methodprepare_for_removal!(component::InfrastructureSystems.InfrastructureSystemsComponent)
+
This function must be called when a component is removed from a system.
sourceInfrastructureSystems.prepare_for_removal!
— MethodThis function must be called when an attribute is removed from a system.
sourceInfrastructureSystems.prepare_for_serialization!
— Methodprepare_for_serialization!(data::InfrastructureSystems.SystemData, filename::AbstractString; force)
+
Parent object should call this prior to serialization so that SystemData can store the appropriate path information for the time series data.
sourceInfrastructureSystems.read_time_series
— Methodread_time_series(::Type{T<:InfrastructureSystems.TimeSeriesData}, data_file::AbstractString) -> InfrastructureSystems.RawTimeSeries
read_time_series(::Type{T<:InfrastructureSystems.TimeSeriesData}, data_file::AbstractString, component_name; kwargs...) -> Any
-
Return a TimeArray from a CSV file.
Pass component_name when the file does not have the component name in a column header.
sourceInfrastructureSystems.read_time_series
— Methodread_time_series(::Type{T<:InfrastructureSystems.TimeSeriesFormatDateTimeAsColumn}, ::Type{InfrastructureSystems.Deterministic}, file::CSV.File) -> InfrastructureSystems.RawTimeSeries
+
Return a TimeArray from a CSV file.
Pass component_name when the file does not have the component name in a column header.
sourceInfrastructureSystems.read_time_series
— Methodread_time_series(::Type{T<:InfrastructureSystems.TimeSeriesFormatDateTimeAsColumn}, ::Type{InfrastructureSystems.Deterministic}, file::CSV.File) -> InfrastructureSystems.RawTimeSeries
read_time_series(::Type{T<:InfrastructureSystems.TimeSeriesFormatDateTimeAsColumn}, ::Type{InfrastructureSystems.Deterministic}, file::CSV.File, component_name; kwargs...) -> InfrastructureSystems.RawTimeSeries
-
Return a RawTimeSeries from a CSV file.
Pass component_name when the file does not have the component name in a column header.
sourceInfrastructureSystems.read_time_series
— Methodread_time_series(::Type{T<:InfrastructureSystems.TimeSeriesFormatComponentsAsColumnsNoTime}, ::Type{var"#s443"} where var"#s443"<:InfrastructureSystems.StaticTimeSeries, file::CSV.File) -> InfrastructureSystems.RawTimeSeries
+
Return a RawTimeSeries from a CSV file.
Pass component_name when the file does not have the component name in a column header.
sourceInfrastructureSystems.read_time_series
— Methodread_time_series(::Type{T<:InfrastructureSystems.TimeSeriesFormatComponentsAsColumnsNoTime}, ::Type{var"#s443"} where var"#s443"<:InfrastructureSystems.StaticTimeSeries, file::CSV.File) -> InfrastructureSystems.RawTimeSeries
read_time_series(::Type{T<:InfrastructureSystems.TimeSeriesFormatComponentsAsColumnsNoTime}, ::Type{var"#s310"} where var"#s310"<:InfrastructureSystems.StaticTimeSeries, file::CSV.File, component_name; kwargs...) -> InfrastructureSystems.RawTimeSeries
-
This version of the function only has component_name to match the interface. It is unused.
Set start_datetime as a keyword argument for the starting timestamp, otherwise the current day is used.
sourceInfrastructureSystems.read_time_series
— Methodread_time_series(::Type{T<:Union{InfrastructureSystems.TimeSeriesFormatDateTimeAsColumn, InfrastructureSystems.TimeSeriesFormatPeriodAsColumn}}, ::Type{var"#s443"} where var"#s443"<:InfrastructureSystems.StaticTimeSeries, file::CSV.File) -> InfrastructureSystems.RawTimeSeries
+
This version of the function only has component_name to match the interface. It is unused.
Set start_datetime as a keyword argument for the starting timestamp, otherwise the current day is used.
sourceInfrastructureSystems.read_time_series
— Methodread_time_series(::Type{T<:Union{InfrastructureSystems.TimeSeriesFormatDateTimeAsColumn, InfrastructureSystems.TimeSeriesFormatPeriodAsColumn}}, ::Type{var"#s443"} where var"#s443"<:InfrastructureSystems.StaticTimeSeries, file::CSV.File) -> InfrastructureSystems.RawTimeSeries
read_time_series(::Type{T<:Union{InfrastructureSystems.TimeSeriesFormatDateTimeAsColumn, InfrastructureSystems.TimeSeriesFormatPeriodAsColumn}}, ::Type{var"#s310"} where var"#s310"<:InfrastructureSystems.StaticTimeSeries, file::CSV.File, component_name; kwargs...) -> InfrastructureSystems.RawTimeSeries
-
Return a TimeSeries.TimeArray representing the CSV file.
This version of the function only has component_name to match the interface. It is unused.
sourceInfrastructureSystems.read_time_series
— Methodread_time_series(::Type{T<:InfrastructureSystems.TimeSeriesFormatPeriodAsHeader}, ::Type{var"#s444"} where var"#s444"<:InfrastructureSystems.StaticTimeSeries, file::CSV.File, component_name::AbstractString; kwargs...) -> InfrastructureSystems.RawTimeSeries
-
This version of the function supports the format where there is no column header for a component, so the component_name must be passed in.
sourceInfrastructureSystems.read_time_series_file_metadata
— Methodread_time_series_file_metadata(file_path::AbstractString) -> Any
-
Reads time_series metadata and fixes relative paths to the data files.
sourceInfrastructureSystems.redirect_stdout_to_log
— Methodredirect_stdout_to_log(func::Function) -> Any
-
Redirect all data written to stdout by a function to log events.
sourceInfrastructureSystems.register_recorder!
— Methodregister_recorder!(name::Symbol; io, mode, directory)
-
Register a recorder to log events. Afterwards, calls to @record name <event-type>() will record the event as JSON in <name>.log.
Callers should guarantee that unregister_recorder!
is called to close the file handle.
Arguments
name::Symbol
: name of recorderio::Union{Nothing, IO}
: If nothing, record events in a file using name.mode = "w"
: Only used when io is nothing.directory = "."
: Only used when io is nothing.
sourceInfrastructureSystems.remove_component!
— MethodRemove a component by its value.
Throws ArgumentError if the component is not stored.
sourceInfrastructureSystems.remove_component!
— MethodRemove a component by its name.
Throws ArgumentError if the component is not stored.
sourceInfrastructureSystems.remove_components!
— Methodremove_components!(_::Type{T<:InfrastructureSystems.InfrastructureSystemsComponent}, components::InfrastructureSystems.Components) -> Base.ValueIterator
-
Remove all components of type T.
Throws ArgumentError if the type is not stored.
sourceInfrastructureSystems.remove_supplemental_attributes!
— Methodremove_supplemental_attributes!(_::Type{T<:InfrastructureSystems.InfrastructureSystemsSupplementalAttribute}, supplemental_attributes::InfrastructureSystems.SupplementalAttributes) -> Base.ValueIterator
-
Remove all supplemental_attributes of type T.
Throws ArgumentError if the type is not stored.
sourceInfrastructureSystems.remove_time_series!
— Methodremove_time_series!(data::InfrastructureSystems.SystemData, _::Type{T<:InfrastructureSystems.TimeSeriesData}, component::InfrastructureSystems.InfrastructureSystemsComponent, name::String)
-
Remove the time series data for a component.
sourceInfrastructureSystems.remove_time_series!
— Methodremove_time_series!(data::InfrastructureSystems.SystemData, _::Type{T<:InfrastructureSystems.TimeSeriesData})
-
Removes all time series of a particular type from a System.
Arguments
data::SystemData
: systemtype::Type{<:TimeSeriesData}
: Type of time series objects to remove.
sourceInfrastructureSystems.remove_time_series_metadata!
— Methodremove_time_series_metadata!(component::Union{InfrastructureSystems.InfrastructureSystemsComponent, InfrastructureSystems.InfrastructureSystemsSupplementalAttribute}, _::Type{T<:InfrastructureSystems.TimeSeriesMetadata}, name::AbstractString) -> Bool
-
Removes the metadata for a time_series. If this returns true then the caller must also remove the actual time series data.
sourceInfrastructureSystems.replace_iterator
— Methodreplace_iterator(container::InfrastructureSystems.LazyDictFromIterator, iter)
-
Replace the iterator, maintaining the cached dict.
sourceInfrastructureSystems.report_log_summary
— Methodreport_log_summary(tracker::InfrastructureSystems.LogEventTracker) -> String
-
Returns a summary of log event counts by level.
sourceInfrastructureSystems.report_log_summary
— Methodreport_log_summary(logger::InfrastructureSystems.MultiLogger) -> String
-
Returns a summary of log event counts by level.
sourceInfrastructureSystems.reset!
— Methodreset!(cache::InfrastructureSystems.TimeSeriesCache)
-
Reset parameters in order to start reading data from the beginning with get_next_time_series_array!
sourceInfrastructureSystems.reset_iterator
— Methodreset_iterator(container::InfrastructureSystems.LazyDictFromIterator)
-
Reset the iterator for cases where underlying arrays have changed.
sourceInfrastructureSystems.serialize
— MethodSerialize the Julia value into standard types that can be converted to non-Julia formats, such as JSON. In cases where val is an instance of a struct, return a Dict. In cases where val is a scalar value, return that value.
sourceInfrastructureSystems.set_component!
— Methodset_component!(metadata::InfrastructureSystems.TimeSeriesFileMetadata, data::InfrastructureSystems.SystemData, mod::Module) -> Any
-
Set the component value in metadata by looking up the category in module. This requires that category be a string version of a component's abstract type. Modules can override for custom behavior.
sourceInfrastructureSystems.set_count!
— Methodset_count!(value::InfrastructureSystems.DeterministicMetadata, val) -> Any
-
Set DeterministicMetadata
count
.
sourceInfrastructureSystems.set_count!
— Methodset_count!(value::InfrastructureSystems.DeterministicSingleTimeSeries, val) -> Any
-
Set DeterministicSingleTimeSeries
count
.
sourceInfrastructureSystems.set_count!
— Methodset_count!(value::InfrastructureSystems.ProbabilisticMetadata, val) -> Any
-
Set ProbabilisticMetadata
count
.
sourceInfrastructureSystems.set_count!
— Methodset_count!(value::InfrastructureSystems.ScenariosMetadata, val) -> Any
-
Set ScenariosMetadata
count
.
sourceInfrastructureSystems.set_data!
— Methodset_data!(value::InfrastructureSystems.Deterministic, val) -> Any
-
Set Deterministic
data
.
sourceInfrastructureSystems.set_data!
— Methodset_data!(value::InfrastructureSystems.Probabilistic, val) -> Any
-
Set Probabilistic
data
.
sourceInfrastructureSystems.set_data!
— Methodset_data!(value::InfrastructureSystems.Scenarios, val) -> Any
-
Set Scenarios
data
.
sourceInfrastructureSystems.set_data!
— Methodset_data!(value::InfrastructureSystems.SingleTimeSeries, val) -> Any
-
Set SingleTimeSeries
data
.
sourceInfrastructureSystems.set_group_level!
— Methodset_group_level!(logger::InfrastructureSystems.MultiLogger, group::Symbol, level::Base.CoreLogging.LogLevel)
-
Set the minimum log level for a group.
The group
field of a log message defaults to its file's base name (no extension) as a symbol. It can be customized by setting _group = :a_group_name
.
The minimum log level stored for a console or file logger supercede this setting.
sourceInfrastructureSystems.set_group_levels!
— Methodset_group_levels!(logger::InfrastructureSystems.MultiLogger, group_levels::Dict{Symbol, Base.CoreLogging.LogLevel})
-
Set the minimum log levels for multiple groups. Refer to set_group_level
for more information.
sourceInfrastructureSystems.set_horizon!
— Methodset_horizon!(value::InfrastructureSystems.DeterministicMetadata, val) -> Any
-
Set DeterministicMetadata
horizon
.
sourceInfrastructureSystems.set_horizon!
— Methodset_horizon!(value::InfrastructureSystems.DeterministicSingleTimeSeries, val) -> Any
-
Set DeterministicSingleTimeSeries
horizon
.
sourceInfrastructureSystems.set_horizon!
— Methodset_horizon!(value::InfrastructureSystems.ProbabilisticMetadata, val) -> Any
-
Set ProbabilisticMetadata
horizon
.
sourceInfrastructureSystems.set_horizon!
— Methodset_horizon!(value::InfrastructureSystems.ScenariosMetadata, val) -> Any
-
Set ScenariosMetadata
horizon
.
sourceInfrastructureSystems.set_initial_timestamp!
— Methodset_initial_timestamp!(value::InfrastructureSystems.DeterministicMetadata, val) -> Any
-
Set DeterministicMetadata
initial_timestamp
.
sourceInfrastructureSystems.set_initial_timestamp!
— Methodset_initial_timestamp!(value::InfrastructureSystems.DeterministicSingleTimeSeries, val) -> Any
-
Set DeterministicSingleTimeSeries
initial_timestamp
.
sourceInfrastructureSystems.set_initial_timestamp!
— Methodset_initial_timestamp!(value::InfrastructureSystems.ProbabilisticMetadata, val) -> Any
-
Set ProbabilisticMetadata
initial_timestamp
.
sourceInfrastructureSystems.set_initial_timestamp!
— Methodset_initial_timestamp!(value::InfrastructureSystems.ScenariosMetadata, val) -> Any
-
Set ScenariosMetadata
initial_timestamp
.
sourceInfrastructureSystems.set_initial_timestamp!
— Methodset_initial_timestamp!(value::InfrastructureSystems.SingleTimeSeriesMetadata, val) -> Any
-
Set SingleTimeSeriesMetadata
initial_timestamp
.
sourceInfrastructureSystems.set_internal!
— Methodset_internal!(value::InfrastructureSystems.Deterministic, val) -> Any
-
Set Deterministic
internal
.
sourceInfrastructureSystems.set_internal!
— Methodset_internal!(value::InfrastructureSystems.DeterministicMetadata, val) -> Any
-
Set DeterministicMetadata
internal
.
sourceInfrastructureSystems.set_internal!
— Methodset_internal!(value::InfrastructureSystems.Probabilistic, val) -> Any
-
Set Probabilistic
internal
.
sourceInfrastructureSystems.set_internal!
— Methodset_internal!(value::InfrastructureSystems.ProbabilisticMetadata, val) -> Any
-
Set ProbabilisticMetadata
internal
.
sourceInfrastructureSystems.set_internal!
— Methodset_internal!(value::InfrastructureSystems.Scenarios, val) -> Any
-
Set Scenarios
internal
.
sourceInfrastructureSystems.set_internal!
— Methodset_internal!(value::InfrastructureSystems.ScenariosMetadata, val) -> Any
-
Set ScenariosMetadata
internal
.
sourceInfrastructureSystems.set_internal!
— Methodset_internal!(value::InfrastructureSystems.SingleTimeSeries, val) -> Any
-
Set SingleTimeSeries
internal
.
sourceInfrastructureSystems.set_internal!
— Methodset_internal!(value::InfrastructureSystems.SingleTimeSeriesMetadata, val) -> Any
-
Set SingleTimeSeriesMetadata
internal
.
sourceInfrastructureSystems.set_interval!
— Methodset_interval!(value::InfrastructureSystems.DeterministicMetadata, val) -> Any
-
Set DeterministicMetadata
interval
.
sourceInfrastructureSystems.set_interval!
— Methodset_interval!(value::InfrastructureSystems.DeterministicSingleTimeSeries, val) -> Any
-
Set DeterministicSingleTimeSeries
interval
.
sourceInfrastructureSystems.set_interval!
— Methodset_interval!(value::InfrastructureSystems.ProbabilisticMetadata, val) -> Any
-
Set ProbabilisticMetadata
interval
.
sourceInfrastructureSystems.set_interval!
— Methodset_interval!(value::InfrastructureSystems.ScenariosMetadata, val) -> Any
-
Set ScenariosMetadata
interval
.
sourceInfrastructureSystems.set_length!
— Methodset_length!(value::InfrastructureSystems.SingleTimeSeriesMetadata, val) -> Any
-
Set SingleTimeSeriesMetadata
length
.
sourceInfrastructureSystems.set_name!
— Methodset_name!(value::InfrastructureSystems.Deterministic, val) -> Any
-
Set Deterministic
name
.
sourceInfrastructureSystems.set_name!
— Methodset_name!(value::InfrastructureSystems.DeterministicMetadata, val) -> Any
-
Set DeterministicMetadata
name
.
sourceInfrastructureSystems.set_name!
— Methodset_name!(value::InfrastructureSystems.Probabilistic, val) -> Any
-
Set Probabilistic
name
.
sourceInfrastructureSystems.set_name!
— Methodset_name!(value::InfrastructureSystems.ProbabilisticMetadata, val) -> Any
-
Set ProbabilisticMetadata
name
.
sourceInfrastructureSystems.set_name!
— Methodset_name!(value::InfrastructureSystems.Scenarios, val) -> Any
-
Set Scenarios
name
.
sourceInfrastructureSystems.set_name!
— Methodset_name!(value::InfrastructureSystems.ScenariosMetadata, val) -> Any
-
Set ScenariosMetadata
name
.
sourceInfrastructureSystems.set_name!
— Methodset_name!(value::InfrastructureSystems.SingleTimeSeries, val) -> Any
-
Set SingleTimeSeries
name
.
sourceInfrastructureSystems.set_name!
— Methodset_name!(value::InfrastructureSystems.SingleTimeSeriesMetadata, val) -> Any
-
Set SingleTimeSeriesMetadata
name
.
sourceInfrastructureSystems.set_percentiles!
— Methodset_percentiles!(value::InfrastructureSystems.Probabilistic, val) -> Any
-
Set Probabilistic
percentiles
.
sourceInfrastructureSystems.set_percentiles!
— Methodset_percentiles!(value::InfrastructureSystems.ProbabilisticMetadata, val) -> Any
-
Set ProbabilisticMetadata
percentiles
.
sourceInfrastructureSystems.set_resolution!
— Methodset_resolution!(value::InfrastructureSystems.Deterministic, val) -> Any
-
Set Deterministic
resolution
.
sourceInfrastructureSystems.set_resolution!
— Methodset_resolution!(value::InfrastructureSystems.DeterministicMetadata, val) -> Any
-
Set DeterministicMetadata
resolution
.
sourceInfrastructureSystems.set_resolution!
— Methodset_resolution!(value::InfrastructureSystems.Probabilistic, val) -> Any
-
Set Probabilistic
resolution
.
sourceInfrastructureSystems.set_resolution!
— Methodset_resolution!(value::InfrastructureSystems.ProbabilisticMetadata, val) -> Any
-
Set ProbabilisticMetadata
resolution
.
sourceInfrastructureSystems.set_resolution!
— Methodset_resolution!(value::InfrastructureSystems.Scenarios, val) -> Any
-
Set Scenarios
resolution
.
sourceInfrastructureSystems.set_resolution!
— Methodset_resolution!(value::InfrastructureSystems.ScenariosMetadata, val) -> Any
-
Set ScenariosMetadata
resolution
.
sourceInfrastructureSystems.set_resolution!
— Methodset_resolution!(value::InfrastructureSystems.SingleTimeSeriesMetadata, val) -> Any
-
Set SingleTimeSeriesMetadata
resolution
.
sourceInfrastructureSystems.set_scaling_factor_multiplier!
— Methodset_scaling_factor_multiplier!(value::InfrastructureSystems.Deterministic, val) -> Any
-
Set Deterministic
scaling_factor_multiplier
.
sourceInfrastructureSystems.set_scaling_factor_multiplier!
— Methodset_scaling_factor_multiplier!(value::InfrastructureSystems.DeterministicMetadata, val) -> Any
-
Set DeterministicMetadata
scaling_factor_multiplier
.
sourceInfrastructureSystems.set_scaling_factor_multiplier!
— Methodset_scaling_factor_multiplier!(value::InfrastructureSystems.Probabilistic, val) -> Any
-
Set Probabilistic
scaling_factor_multiplier
.
sourceInfrastructureSystems.set_scaling_factor_multiplier!
— Methodset_scaling_factor_multiplier!(value::InfrastructureSystems.ProbabilisticMetadata, val) -> Any
-
Set ProbabilisticMetadata
scaling_factor_multiplier
.
sourceInfrastructureSystems.set_scaling_factor_multiplier!
— Methodset_scaling_factor_multiplier!(value::InfrastructureSystems.Scenarios, val) -> Any
-
Set Scenarios
scaling_factor_multiplier
.
sourceInfrastructureSystems.set_scaling_factor_multiplier!
— Methodset_scaling_factor_multiplier!(value::InfrastructureSystems.ScenariosMetadata, val) -> Any
-
Set ScenariosMetadata
scaling_factor_multiplier
.
sourceInfrastructureSystems.set_scaling_factor_multiplier!
— Methodset_scaling_factor_multiplier!(value::InfrastructureSystems.SingleTimeSeries, val) -> Any
-
Set SingleTimeSeries
scaling_factor_multiplier
.
sourceInfrastructureSystems.set_scaling_factor_multiplier!
— Methodset_scaling_factor_multiplier!(value::InfrastructureSystems.SingleTimeSeriesMetadata, val) -> Any
-
Set SingleTimeSeriesMetadata
scaling_factor_multiplier
.
sourceInfrastructureSystems.set_scenario_count!
— Methodset_scenario_count!(value::InfrastructureSystems.Scenarios, val) -> Any
-
Set Scenarios
scenario_count
.
sourceInfrastructureSystems.set_scenario_count!
— Methodset_scenario_count!(value::InfrastructureSystems.ScenariosMetadata, val) -> Any
-
Set ScenariosMetadata
scenario_count
.
sourceInfrastructureSystems.set_single_time_series!
— Methodset_single_time_series!(value::InfrastructureSystems.DeterministicSingleTimeSeries, val) -> Any
-
Set DeterministicSingleTimeSeries
single_time_series
.
sourceInfrastructureSystems.set_time_series_type!
— Methodset_time_series_type!(value::InfrastructureSystems.DeterministicMetadata, val) -> Any
-
Set DeterministicMetadata
time_series_type
.
sourceInfrastructureSystems.set_time_series_uuid!
— Methodset_time_series_uuid!(value::InfrastructureSystems.DeterministicMetadata, val) -> Any
-
Set DeterministicMetadata
time_series_uuid
.
sourceInfrastructureSystems.set_time_series_uuid!
— Methodset_time_series_uuid!(value::InfrastructureSystems.ProbabilisticMetadata, val) -> Any
-
Set ProbabilisticMetadata
time_series_uuid
.
sourceInfrastructureSystems.set_time_series_uuid!
— Methodset_time_series_uuid!(value::InfrastructureSystems.ScenariosMetadata, val) -> Any
-
Set ScenariosMetadata
time_series_uuid
.
sourceInfrastructureSystems.set_time_series_uuid!
— Methodset_time_series_uuid!(value::InfrastructureSystems.SingleTimeSeriesMetadata, val) -> Any
-
Set SingleTimeSeriesMetadata
time_series_uuid
.
sourceInfrastructureSystems.show_recorder_events
— Methodshow_recorder_events(::Type{T<:InfrastructureSystems.AbstractRecorderEvent}, filename::AbstractString)
+
Return a TimeSeries.TimeArray representing the CSV file.
This version of the function only has component_name to match the interface. It is unused.
sourceInfrastructureSystems.read_time_series
— Methodread_time_series(::Type{T<:InfrastructureSystems.TimeSeriesFormatPeriodAsHeader}, ::Type{var"#s444"} where var"#s444"<:InfrastructureSystems.StaticTimeSeries, file::CSV.File, component_name::AbstractString; kwargs...) -> InfrastructureSystems.RawTimeSeries
+
This version of the function supports the format where there is no column header for a component, so the component_name must be passed in.
sourceInfrastructureSystems.read_time_series_file_metadata
— Methodread_time_series_file_metadata(file_path::AbstractString) -> Any
+
Reads time_series metadata and fixes relative paths to the data files.
sourceInfrastructureSystems.redirect_stdout_to_log
— Methodredirect_stdout_to_log(func::Function) -> Any
+
Redirect all data written to stdout by a function to log events.
sourceInfrastructureSystems.register_recorder!
— Methodregister_recorder!(name::Symbol; io, mode, directory)
+
Register a recorder to log events. Afterwards, calls to @record name <event-type>() will record the event as JSON in <name>.log.
Callers should guarantee that unregister_recorder!
is called to close the file handle.
Arguments
name::Symbol
: name of recorderio::Union{Nothing, IO}
: If nothing, record events in a file using name.mode = "w"
: Only used when io is nothing.directory = "."
: Only used when io is nothing.
sourceInfrastructureSystems.remove_component!
— MethodRemove a component by its value.
Throws ArgumentError if the component is not stored.
sourceInfrastructureSystems.remove_component!
— Methodremove_component!(::Type{T<:InfrastructureSystems.InfrastructureSystemsComponent}, components::InfrastructureSystems.Components, name::AbstractString; remove_time_series) -> InfrastructureSystems.InfrastructureSystemsComponent
+
Remove a component by its name.
Throws ArgumentError if the component is not stored.
sourceInfrastructureSystems.remove_components!
— Methodremove_components!(_::Type{T<:InfrastructureSystems.InfrastructureSystemsComponent}, components::InfrastructureSystems.Components) -> Base.ValueIterator
+
Remove all components of type T.
Throws ArgumentError if the type is not stored.
sourceInfrastructureSystems.remove_supplemental_attributes!
— Methodremove_supplemental_attributes!(_::Type{T<:InfrastructureSystems.InfrastructureSystemsSupplementalAttribute}, supplemental_attributes::InfrastructureSystems.SupplementalAttributes) -> Base.ValueIterator
+
Remove all supplemental_attributes of type T.
Throws ArgumentError if the type is not stored.
sourceInfrastructureSystems.remove_time_series!
— Methodremove_time_series!(data::InfrastructureSystems.SystemData, _::Type{T<:InfrastructureSystems.TimeSeriesData}, component::InfrastructureSystems.InfrastructureSystemsComponent, name::String)
+
Remove the time series data for a component.
sourceInfrastructureSystems.remove_time_series!
— Methodremove_time_series!(data::InfrastructureSystems.SystemData, _::Type{T<:InfrastructureSystems.TimeSeriesData})
+
Removes all time series of a particular type from a System.
Arguments
data::SystemData
: systemtype::Type{<:TimeSeriesData}
: Type of time series objects to remove.
sourceInfrastructureSystems.remove_time_series_metadata!
— Methodremove_time_series_metadata!(component::Union{InfrastructureSystems.InfrastructureSystemsComponent, InfrastructureSystems.InfrastructureSystemsSupplementalAttribute}, _::Type{T<:InfrastructureSystems.TimeSeriesMetadata}, name::AbstractString) -> Bool
+
Removes the metadata for a time_series. If this returns true then the caller must also remove the actual time series data.
sourceInfrastructureSystems.replace_iterator
— Methodreplace_iterator(container::InfrastructureSystems.LazyDictFromIterator, iter)
+
Replace the iterator, maintaining the cached dict.
sourceInfrastructureSystems.report_log_summary
— Methodreport_log_summary(tracker::InfrastructureSystems.LogEventTracker) -> String
+
Returns a summary of log event counts by level.
sourceInfrastructureSystems.report_log_summary
— Methodreport_log_summary(logger::InfrastructureSystems.MultiLogger) -> String
+
Returns a summary of log event counts by level.
sourceInfrastructureSystems.reset!
— Methodreset!(cache::InfrastructureSystems.TimeSeriesCache)
+
Reset parameters in order to start reading data from the beginning with get_next_time_series_array!
sourceInfrastructureSystems.reset_iterator
— Methodreset_iterator(container::InfrastructureSystems.LazyDictFromIterator)
+
Reset the iterator for cases where underlying arrays have changed.
sourceInfrastructureSystems.serialize
— MethodSerialize the Julia value into standard types that can be converted to non-Julia formats, such as JSON. In cases where val is an instance of a struct, return a Dict. In cases where val is a scalar value, return that value.
sourceInfrastructureSystems.set_component!
— Methodset_component!(metadata::InfrastructureSystems.TimeSeriesFileMetadata, data::InfrastructureSystems.SystemData, mod::Module) -> Any
+
Set the component value in metadata by looking up the category in module. This requires that category be a string version of a component's abstract type. Modules can override for custom behavior.
sourceInfrastructureSystems.set_count!
— Methodset_count!(value::InfrastructureSystems.DeterministicMetadata, val) -> Any
+
Set DeterministicMetadata
count
.
sourceInfrastructureSystems.set_count!
— Methodset_count!(value::InfrastructureSystems.DeterministicSingleTimeSeries, val) -> Any
+
Set DeterministicSingleTimeSeries
count
.
sourceInfrastructureSystems.set_count!
— Methodset_count!(value::InfrastructureSystems.ProbabilisticMetadata, val) -> Any
+
Set ProbabilisticMetadata
count
.
sourceInfrastructureSystems.set_count!
— Methodset_count!(value::InfrastructureSystems.ScenariosMetadata, val) -> Any
+
Set ScenariosMetadata
count
.
sourceInfrastructureSystems.set_data!
— Methodset_data!(value::InfrastructureSystems.Deterministic, val) -> Any
+
Set Deterministic
data
.
sourceInfrastructureSystems.set_data!
— Methodset_data!(value::InfrastructureSystems.Probabilistic, val) -> Any
+
Set Probabilistic
data
.
sourceInfrastructureSystems.set_data!
— Methodset_data!(value::InfrastructureSystems.Scenarios, val) -> Any
+
Set Scenarios
data
.
sourceInfrastructureSystems.set_data!
— Methodset_data!(value::InfrastructureSystems.SingleTimeSeries, val) -> Any
+
Set SingleTimeSeries
data
.
sourceInfrastructureSystems.set_group_level!
— Methodset_group_level!(logger::InfrastructureSystems.MultiLogger, group::Symbol, level::Base.CoreLogging.LogLevel)
+
Set the minimum log level for a group.
The group
field of a log message defaults to its file's base name (no extension) as a symbol. It can be customized by setting _group = :a_group_name
.
The minimum log level stored for a console or file logger supercede this setting.
sourceInfrastructureSystems.set_group_levels!
— Methodset_group_levels!(logger::InfrastructureSystems.MultiLogger, group_levels::Dict{Symbol, Base.CoreLogging.LogLevel})
+
Set the minimum log levels for multiple groups. Refer to set_group_level
for more information.
sourceInfrastructureSystems.set_horizon!
— Methodset_horizon!(value::InfrastructureSystems.DeterministicMetadata, val) -> Any
+
Set DeterministicMetadata
horizon
.
sourceInfrastructureSystems.set_horizon!
— Methodset_horizon!(value::InfrastructureSystems.DeterministicSingleTimeSeries, val) -> Any
+
Set DeterministicSingleTimeSeries
horizon
.
sourceInfrastructureSystems.set_horizon!
— Methodset_horizon!(value::InfrastructureSystems.ProbabilisticMetadata, val) -> Any
+
Set ProbabilisticMetadata
horizon
.
sourceInfrastructureSystems.set_horizon!
— Methodset_horizon!(value::InfrastructureSystems.ScenariosMetadata, val) -> Any
+
Set ScenariosMetadata
horizon
.
sourceInfrastructureSystems.set_initial_timestamp!
— Methodset_initial_timestamp!(value::InfrastructureSystems.DeterministicMetadata, val) -> Any
+
Set DeterministicMetadata
initial_timestamp
.
sourceInfrastructureSystems.set_initial_timestamp!
— Methodset_initial_timestamp!(value::InfrastructureSystems.DeterministicSingleTimeSeries, val) -> Any
+
Set DeterministicSingleTimeSeries
initial_timestamp
.
sourceInfrastructureSystems.set_initial_timestamp!
— Methodset_initial_timestamp!(value::InfrastructureSystems.ProbabilisticMetadata, val) -> Any
+
Set ProbabilisticMetadata
initial_timestamp
.
sourceInfrastructureSystems.set_initial_timestamp!
— Methodset_initial_timestamp!(value::InfrastructureSystems.ScenariosMetadata, val) -> Any
+
Set ScenariosMetadata
initial_timestamp
.
sourceInfrastructureSystems.set_initial_timestamp!
— Methodset_initial_timestamp!(value::InfrastructureSystems.SingleTimeSeriesMetadata, val) -> Any
+
Set SingleTimeSeriesMetadata
initial_timestamp
.
sourceInfrastructureSystems.set_internal!
— Methodset_internal!(value::InfrastructureSystems.Deterministic, val) -> Any
+
Set Deterministic
internal
.
sourceInfrastructureSystems.set_internal!
— Methodset_internal!(value::InfrastructureSystems.DeterministicMetadata, val) -> Any
+
Set DeterministicMetadata
internal
.
sourceInfrastructureSystems.set_internal!
— Methodset_internal!(value::InfrastructureSystems.Probabilistic, val) -> Any
+
Set Probabilistic
internal
.
sourceInfrastructureSystems.set_internal!
— Methodset_internal!(value::InfrastructureSystems.ProbabilisticMetadata, val) -> Any
+
Set ProbabilisticMetadata
internal
.
sourceInfrastructureSystems.set_internal!
— Methodset_internal!(value::InfrastructureSystems.Scenarios, val) -> Any
+
Set Scenarios
internal
.
sourceInfrastructureSystems.set_internal!
— Methodset_internal!(value::InfrastructureSystems.ScenariosMetadata, val) -> Any
+
Set ScenariosMetadata
internal
.
sourceInfrastructureSystems.set_internal!
— Methodset_internal!(value::InfrastructureSystems.SingleTimeSeries, val) -> Any
+
Set SingleTimeSeries
internal
.
sourceInfrastructureSystems.set_internal!
— Methodset_internal!(value::InfrastructureSystems.SingleTimeSeriesMetadata, val) -> Any
+
Set SingleTimeSeriesMetadata
internal
.
sourceInfrastructureSystems.set_interval!
— Methodset_interval!(value::InfrastructureSystems.DeterministicMetadata, val) -> Any
+
Set DeterministicMetadata
interval
.
sourceInfrastructureSystems.set_interval!
— Methodset_interval!(value::InfrastructureSystems.DeterministicSingleTimeSeries, val) -> Any
+
Set DeterministicSingleTimeSeries
interval
.
sourceInfrastructureSystems.set_interval!
— Methodset_interval!(value::InfrastructureSystems.ProbabilisticMetadata, val) -> Any
+
Set ProbabilisticMetadata
interval
.
sourceInfrastructureSystems.set_interval!
— Methodset_interval!(value::InfrastructureSystems.ScenariosMetadata, val) -> Any
+
Set ScenariosMetadata
interval
.
sourceInfrastructureSystems.set_length!
— Methodset_length!(value::InfrastructureSystems.SingleTimeSeriesMetadata, val) -> Any
+
Set SingleTimeSeriesMetadata
length
.
sourceInfrastructureSystems.set_name!
— Methodset_name!(value::InfrastructureSystems.Deterministic, val) -> Any
+
Set Deterministic
name
.
sourceInfrastructureSystems.set_name!
— Methodset_name!(value::InfrastructureSystems.DeterministicMetadata, val) -> Any
+
Set DeterministicMetadata
name
.
sourceInfrastructureSystems.set_name!
— Methodset_name!(value::InfrastructureSystems.Probabilistic, val) -> Any
+
Set Probabilistic
name
.
sourceInfrastructureSystems.set_name!
— Methodset_name!(value::InfrastructureSystems.ProbabilisticMetadata, val) -> Any
+
Set ProbabilisticMetadata
name
.
sourceInfrastructureSystems.set_name!
— Methodset_name!(value::InfrastructureSystems.Scenarios, val) -> Any
+
Set Scenarios
name
.
sourceInfrastructureSystems.set_name!
— Methodset_name!(value::InfrastructureSystems.ScenariosMetadata, val) -> Any
+
Set ScenariosMetadata
name
.
sourceInfrastructureSystems.set_name!
— Methodset_name!(value::InfrastructureSystems.SingleTimeSeries, val) -> Any
+
Set SingleTimeSeries
name
.
sourceInfrastructureSystems.set_name!
— Methodset_name!(value::InfrastructureSystems.SingleTimeSeriesMetadata, val) -> Any
+
Set SingleTimeSeriesMetadata
name
.
sourceInfrastructureSystems.set_percentiles!
— Methodset_percentiles!(value::InfrastructureSystems.Probabilistic, val) -> Any
+
Set Probabilistic
percentiles
.
sourceInfrastructureSystems.set_percentiles!
— Methodset_percentiles!(value::InfrastructureSystems.ProbabilisticMetadata, val) -> Any
+
Set ProbabilisticMetadata
percentiles
.
sourceInfrastructureSystems.set_resolution!
— Methodset_resolution!(value::InfrastructureSystems.Deterministic, val) -> Any
+
Set Deterministic
resolution
.
sourceInfrastructureSystems.set_resolution!
— Methodset_resolution!(value::InfrastructureSystems.DeterministicMetadata, val) -> Any
+
Set DeterministicMetadata
resolution
.
sourceInfrastructureSystems.set_resolution!
— Methodset_resolution!(value::InfrastructureSystems.Probabilistic, val) -> Any
+
Set Probabilistic
resolution
.
sourceInfrastructureSystems.set_resolution!
— Methodset_resolution!(value::InfrastructureSystems.ProbabilisticMetadata, val) -> Any
+
Set ProbabilisticMetadata
resolution
.
sourceInfrastructureSystems.set_resolution!
— Methodset_resolution!(value::InfrastructureSystems.Scenarios, val) -> Any
+
Set Scenarios
resolution
.
sourceInfrastructureSystems.set_resolution!
— Methodset_resolution!(value::InfrastructureSystems.ScenariosMetadata, val) -> Any
+
Set ScenariosMetadata
resolution
.
sourceInfrastructureSystems.set_resolution!
— Methodset_resolution!(value::InfrastructureSystems.SingleTimeSeriesMetadata, val) -> Any
+
Set SingleTimeSeriesMetadata
resolution
.
sourceInfrastructureSystems.set_scaling_factor_multiplier!
— Methodset_scaling_factor_multiplier!(value::InfrastructureSystems.Deterministic, val) -> Any
+
Set Deterministic
scaling_factor_multiplier
.
sourceInfrastructureSystems.set_scaling_factor_multiplier!
— Methodset_scaling_factor_multiplier!(value::InfrastructureSystems.DeterministicMetadata, val) -> Any
+
Set DeterministicMetadata
scaling_factor_multiplier
.
sourceInfrastructureSystems.set_scaling_factor_multiplier!
— Methodset_scaling_factor_multiplier!(value::InfrastructureSystems.Probabilistic, val) -> Any
+
Set Probabilistic
scaling_factor_multiplier
.
sourceInfrastructureSystems.set_scaling_factor_multiplier!
— Methodset_scaling_factor_multiplier!(value::InfrastructureSystems.ProbabilisticMetadata, val) -> Any
+
Set ProbabilisticMetadata
scaling_factor_multiplier
.
sourceInfrastructureSystems.set_scaling_factor_multiplier!
— Methodset_scaling_factor_multiplier!(value::InfrastructureSystems.Scenarios, val) -> Any
+
Set Scenarios
scaling_factor_multiplier
.
sourceInfrastructureSystems.set_scaling_factor_multiplier!
— Methodset_scaling_factor_multiplier!(value::InfrastructureSystems.ScenariosMetadata, val) -> Any
+
Set ScenariosMetadata
scaling_factor_multiplier
.
sourceInfrastructureSystems.set_scaling_factor_multiplier!
— Methodset_scaling_factor_multiplier!(value::InfrastructureSystems.SingleTimeSeries, val) -> Any
+
Set SingleTimeSeries
scaling_factor_multiplier
.
sourceInfrastructureSystems.set_scaling_factor_multiplier!
— Methodset_scaling_factor_multiplier!(value::InfrastructureSystems.SingleTimeSeriesMetadata, val) -> Any
+
Set SingleTimeSeriesMetadata
scaling_factor_multiplier
.
sourceInfrastructureSystems.set_scenario_count!
— Methodset_scenario_count!(value::InfrastructureSystems.Scenarios, val) -> Any
+
Set Scenarios
scenario_count
.
sourceInfrastructureSystems.set_scenario_count!
— Methodset_scenario_count!(value::InfrastructureSystems.ScenariosMetadata, val) -> Any
+
Set ScenariosMetadata
scenario_count
.
sourceInfrastructureSystems.set_single_time_series!
— Methodset_single_time_series!(value::InfrastructureSystems.DeterministicSingleTimeSeries, val) -> Any
+
Set DeterministicSingleTimeSeries
single_time_series
.
sourceInfrastructureSystems.set_time_series_type!
— Methodset_time_series_type!(value::InfrastructureSystems.DeterministicMetadata, val) -> Any
+
Set DeterministicMetadata
time_series_type
.
sourceInfrastructureSystems.set_time_series_uuid!
— Methodset_time_series_uuid!(value::InfrastructureSystems.DeterministicMetadata, val) -> Any
+
Set DeterministicMetadata
time_series_uuid
.
sourceInfrastructureSystems.set_time_series_uuid!
— Methodset_time_series_uuid!(value::InfrastructureSystems.ProbabilisticMetadata, val) -> Any
+
Set ProbabilisticMetadata
time_series_uuid
.
sourceInfrastructureSystems.set_time_series_uuid!
— Methodset_time_series_uuid!(value::InfrastructureSystems.ScenariosMetadata, val) -> Any
+
Set ScenariosMetadata
time_series_uuid
.
sourceInfrastructureSystems.set_time_series_uuid!
— Methodset_time_series_uuid!(value::InfrastructureSystems.SingleTimeSeriesMetadata, val) -> Any
+
Set SingleTimeSeriesMetadata
time_series_uuid
.
sourceInfrastructureSystems.show_recorder_events
— Methodshow_recorder_events(::Type{T<:InfrastructureSystems.AbstractRecorderEvent}, filename::AbstractString)
show_recorder_events(::Type{T<:InfrastructureSystems.AbstractRecorderEvent}, filename::AbstractString, filter_func::Union{Nothing, Function}; kwargs...)
Show the events of type T in filename in a table. Refer to PrettyTables.jl documentation for accepted kwargs.
Arguments
T
: event typefilename::AbstractString
: filename containing recorder eventsfilter_func::Union{Nothing, Function} = nothing
: Optional function that accepts an event of type T and returns a Bool. Apply this function to each event and only return events where the result is true.exclude_columns = Set{String}()
: Column names to exclude from the tablekwargs
: Passed to PrettyTables
Examples
show_recorder_events(TestEvent, test_recorder.log)
-show_recorder_events(TestEvent, test_recorder.log, x -> x.val2 > 2)
sourceInfrastructureSystems.strip_module_name
— Methodstrip_module_name(name::String) -> String
-
Strips the module name off of a type.
sourceInfrastructureSystems.supertypes
— Methodsupertypes(::Type{T}) -> Vector{Any}
+show_recorder_events(TestEvent, test_recorder.log, x -> x.val2 > 2)
sourceInfrastructureSystems.strip_module_name
— Methodstrip_module_name(name::String) -> String
+
Strips the module name off of a type.
sourceInfrastructureSystems.supertypes
— Methodsupertypes(::Type{T}) -> Vector{Any}
supertypes(::Type{T}, types) -> Any
-
Returns an array of all super types of T.
sourceInfrastructureSystems.tail
— Methodtail(time_series::InfrastructureSystems.SingleTimeSeries) -> Any
-
Return a time_series with only the ending num values.
sourceInfrastructureSystems.test_generated_structs
— Methodtest_generated_structs(descriptor_file, existing_dir) -> Bool
-
Return true if the structs defined in existingdir match structs freshly-generated from descriptorfile.
sourceInfrastructureSystems.to
— Methodto(time_series::InfrastructureSystems.SingleTimeSeries, timestamp) -> InfrastructureSystems.SingleTimeSeries
-
Return a time_series truncated after timestamp.
sourceInfrastructureSystems.to_json
— MethodSerializes a InfrastructureSystemsType to a JSON string.
sourceInfrastructureSystems.to_json
— Methodto_json(obj::InfrastructureSystems.InfrastructureSystemsType; pretty, indent) -> Any
-
Serializes a InfrastructureSystemsType to a JSON file.
sourceInfrastructureSystems.transform_single_time_series!
— Methodtransform_single_time_series!(data::InfrastructureSystems.SystemData, _::Type{T<:InfrastructureSystems.DeterministicSingleTimeSeries}, horizon::Int64, interval::Dates.Period)
-
Transform all instances of SingleTimeSeries to DeterministicSingleTimeSeries.
Any existing DeterministicSingleTimeSeries forecasts will be deleted even if the inputs are invalid.
sourceInfrastructureSystems.transform_single_time_series_internal!
— Methodtransform_single_time_series_internal!(component::InfrastructureSystems.InfrastructureSystemsComponent, _::Type{T<:InfrastructureSystems.DeterministicSingleTimeSeries}, params::InfrastructureSystems.TimeSeriesParameters) -> Bool
-
Transform all instances of SingleTimeSeries to DeterministicSingleTimeSeries. Do nothing if the component does not contain any instances.
All required checks must have been completed by the caller.
Return true if a transformation occurs.
sourceInfrastructureSystems.type_to_symbol
— Methodtype_to_symbol(data_type::DataType) -> Symbol
-
Converts a DataType to a Symbol, stripping off the module name(s).
sourceInfrastructureSystems.unregister_recorder!
— Methodunregister_recorder!(name::Symbol; close_io) -> Any
-
Unregister the recorder with this name and stop recording events.
sourceInfrastructureSystems.validate_exported_names
— Methodvalidate_exported_names(mod::Module) -> Bool
-
Return true if all publicly exported names in mod are defined.
sourceInfrastructureSystems.validate_struct
— Methodvalidate_struct(ist::InfrastructureSystems.InfrastructureSystemsType) -> Bool
-
Validates a struct using only information within the struct.
sourceInfrastructureSystems.when
— Methodwhen(time_series::InfrastructureSystems.SingleTimeSeries, period::Function, t::Integer) -> Any
-
Refer to TimeSeries.when(). Underlying data is copied.
sourceInfrastructureSystems.@assert_op
— MacroThrow an AssertionError
if conditions like op(exp1, exp2)
are false
, where op
is a conditional infix operator.
Examples
julia> a = 3; b = 4;
+
Returns an array of all super types of T.
sourceInfrastructureSystems.tail
— Methodtail(time_series::InfrastructureSystems.SingleTimeSeries) -> Any
+
Return a time_series with only the ending num values.
sourceInfrastructureSystems.test_generated_structs
— Methodtest_generated_structs(descriptor_file, existing_dir) -> Bool
+
Return true if the structs defined in existingdir match structs freshly-generated from descriptorfile.
sourceInfrastructureSystems.to
— Methodto(time_series::InfrastructureSystems.SingleTimeSeries, timestamp) -> InfrastructureSystems.SingleTimeSeries
+
Return a time_series truncated after timestamp.
sourceInfrastructureSystems.to_json
— MethodSerializes a InfrastructureSystemsType to a JSON string.
sourceInfrastructureSystems.to_json
— Methodto_json(obj::InfrastructureSystems.InfrastructureSystemsType; pretty, indent) -> Any
+
Serializes a InfrastructureSystemsType to a JSON file.
sourceInfrastructureSystems.transform_single_time_series!
— Methodtransform_single_time_series!(data::InfrastructureSystems.SystemData, _::Type{T<:InfrastructureSystems.DeterministicSingleTimeSeries}, horizon::Int64, interval::Dates.Period)
+
Transform all instances of SingleTimeSeries to DeterministicSingleTimeSeries.
Any existing DeterministicSingleTimeSeries forecasts will be deleted even if the inputs are invalid.
sourceInfrastructureSystems.transform_single_time_series_internal!
— Methodtransform_single_time_series_internal!(component::InfrastructureSystems.InfrastructureSystemsComponent, _::Type{T<:InfrastructureSystems.DeterministicSingleTimeSeries}, params::InfrastructureSystems.TimeSeriesParameters) -> Bool
+
Transform all instances of SingleTimeSeries to DeterministicSingleTimeSeries. Do nothing if the component does not contain any instances.
All required checks must have been completed by the caller.
Return true if a transformation occurs.
sourceInfrastructureSystems.type_to_symbol
— Methodtype_to_symbol(data_type::DataType) -> Symbol
+
Converts a DataType to a Symbol, stripping off the module name(s).
sourceInfrastructureSystems.unregister_recorder!
— Methodunregister_recorder!(name::Symbol; close_io) -> Any
+
Unregister the recorder with this name and stop recording events.
sourceInfrastructureSystems.validate_exported_names
— Methodvalidate_exported_names(mod::Module) -> Bool
+
Return true if all publicly exported names in mod are defined.
sourceInfrastructureSystems.validate_struct
— Methodvalidate_struct(ist::InfrastructureSystems.InfrastructureSystemsType) -> Bool
+
Validates a struct using only information within the struct.
sourceInfrastructureSystems.when
— Methodwhen(time_series::InfrastructureSystems.SingleTimeSeries, period::Function, t::Integer) -> Any
+
Refer to TimeSeries.when(). Underlying data is copied.
sourceInfrastructureSystems.@assert_op
— MacroThrow an AssertionError
if conditions like op(exp1, exp2)
are false
, where op
is a conditional infix operator.
Examples
julia> a = 3; b = 4;
julia> @assert_op a == b
ERROR: AssertionError: 3 == 4
julia> @assert_op a + 3 > b + 4
-ERROR: AssertionError: 6 > 8
sourceInfrastructureSystems.@record
— MacroRecord an event if the recorder with name is enabled.
Arguments
name::Symbol
: name of recorderevent::AbstractRecorderEvent
: event to record
Examples
@record simulation TestEvent("start", 1, 2.0)
sourceInfrastructureSystems.@scoped_enum
— MacroMacro to wrap Enum in a module to keep the top level scope clean.
Examples
julia> @scoped_enum Fruit APPLE = 1 ORANGE = 2
+ERROR: AssertionError: 6 > 8
sourceInfrastructureSystems.@record
— MacroRecord an event if the recorder with name is enabled.
Arguments
name::Symbol
: name of recorderevent::AbstractRecorderEvent
: event to record
Examples
@record simulation TestEvent("start", 1, 2.0)
sourceInfrastructureSystems.@scoped_enum
— MacroMacro to wrap Enum in a module to keep the top level scope clean.
Examples
julia> @scoped_enum Fruit APPLE = 1 ORANGE = 2
julia> value = Fruit.APPLE
Fruit.APPLE = 1
@@ -413,4 +413,4 @@
julia> @scoped_enum(Fruit,
APPLE = 1, # comment
ORANGE = 2, # comment
-)
sourceSettings
This document was generated with Documenter.jl on Tuesday 12 December 2023. Using Julia version 1.6.7.
+)