Internal
PowerAnalytics.EntryType
— TypeThe various key entry types that can be used to make a PSI.OptimizationContainerKey
PowerAnalytics.SystemEntryType
— TypeThe various key entry types that can work with a System
PowerAnalytics.NoResultError
— TypePowerAnalytics.NoResultError(msg::AbstractString)
Signifies that the metric does not have a result for the Component
/ComponentSelector
/etc. on which it is being called.
PowerAnalytics.combine_categories
— Methodcombine_categories(
data::Union{Dict{String, DataFrames.DataFrame}, Dict{Symbol, DataFrames.DataFrame}};
names,
aggregate
) -> Any
aggregates and combines data into single DataFrame
Example
PG.combine_categories(gen_uc.data)
PowerAnalytics.get_generator_category
— Methodget_generator_category(
gentype,
fuel,
primemover,
ext,
mappings::Dict{NamedTuple, String}
) -> Union{Nothing, String}
Return the generator category for this fuel and unit_type.
PowerAnalytics.get_generator_mapping
— Functionget_generator_mapping() -> Dict{NamedTuple, String}
get_generator_mapping(filename) -> Dict{NamedTuple, String}
Return a dict where keys are a tuple of input parameters (fuel, unit_type) and values are generator types.
PowerAnalytics.lookup_gentype
— Methodlookup_gentype(gentype::AbstractString) -> Any
Parse the gentype
to a type. This is done by first checking whether gentype is qualified (ModuleName.TypeName
). If so, the module is fetched from the Main
scope and the type name is fetched from the module. If not, we default to fetching from PowerSystems
for convenience.
PowerAnalytics.make_component_metric_from_entry
— Methodmake_component_metric_from_entry(
name::String,
key::Type{<:Union{InfrastructureSystems.Optimization.AuxVariableType, InfrastructureSystems.Optimization.ExpressionType, InfrastructureSystems.Optimization.InitialConditionType, InfrastructureSystems.Optimization.ParameterType, InfrastructureSystems.Optimization.VariableType}}
) -> ComponentTimedMetric
Convenience function to convert an EntryType
to a function and make a ComponentTimedMetric
from it
PowerAnalytics.make_entry_kwargs
— Methodmake_entry_kwargs(key_tuples::Vector{<:Tuple}) -> Vector
Sort a vector of key tuples into variables, parameters, etc. like PSI.load_results! wants
PowerAnalytics.make_key
— FunctionCreate a PSI.OptimizationContainerKey from the given key entry type and component.
Arguments
entry::Type{<:EntryType}
: the key entrycomponent
(::Type{<:Union{Component, PSY.System}}
or::Type{<:Component}
depending on the key type): the component type
PowerAnalytics.make_system_metric_from_entry
— Methodmake_system_metric_from_entry(
name::String,
key::Type{<:Union{InfrastructureSystems.Optimization.ExpressionType, InfrastructureSystems.Optimization.VariableType}}
) -> SystemTimedMetric
Convenience function to convert a SystemEntryType
to a function and make a SystemTimedMetric
from it
PowerAnalytics.read_component_result
— Methodread_component_result(
res::InfrastructureSystems.Results,
entry::Type{<:Union{InfrastructureSystems.Optimization.AuxVariableType, InfrastructureSystems.Optimization.ExpressionType, InfrastructureSystems.Optimization.InitialConditionType, InfrastructureSystems.Optimization.ParameterType, InfrastructureSystems.Optimization.VariableType}},
comp::PowerSystems.Component;
start_time,
len
) -> Any
Given an EntryType and a Component, fetch a single column of results
PowerAnalytics.read_system_result
— Methodread_system_result(
res::InfrastructureSystems.Results,
entry::Type{<:Union{InfrastructureSystems.Optimization.ExpressionType, InfrastructureSystems.Optimization.VariableType}};
start_time,
len
) -> Any
Given an EntryType that applies to the System, fetch a single column of results
PowerAnalytics.Metrics.make_calc_is_slack_up
— MethodCreate a boolean Metric
for whether the given time period has system balance slack up of magnitude greater than the threshold
argument