Internal
PowerAnalytics.EntryType — Type
The various key entry types that can be used to make a PSI.OptimizationContainerKey
PowerAnalytics.SystemEntryType — Type
The various key entry types that can work with a System
PowerAnalytics.NoResultError — Type
PowerAnalytics.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 — Method
combine_categories(
data::Union{Dict{String, DataFrame}, Dict{Symbol, DataFrame}};
names,
aggregate
) -> Any
aggregates and combines data into single DataFrame
Example
PG.combine_categories(gen_uc.data)PowerAnalytics.get_generator_category — Method
get_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 — Function
get_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 — Method
lookup_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 — Method
make_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 — Method
make_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 — Function
Create 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 — Method
make_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 — Method
read_component_result(
res::InfrastructureSystems.Results,
entry::Type{<:Union{InfrastructureSystems.Optimization.AuxVariableType, InfrastructureSystems.Optimization.ExpressionType, InfrastructureSystems.Optimization.InitialConditionType, InfrastructureSystems.Optimization.ParameterType, InfrastructureSystems.Optimization.VariableType}},
comp::Component;
start_time,
len
) -> Any
Given an EntryType and a Component, fetch a single column of results
PowerAnalytics.read_system_result — Method
read_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 — Method
Create a boolean Metric for whether the given time period has system balance slack up of magnitude greater than the threshold argument