From c9398d1995d88a8906845d2cfc6a53fb13f6f3de Mon Sep 17 00:00:00 2001 From: GabrielKS <23368820+GabrielKS@users.noreply.github.com> Date: Mon, 18 Mar 2024 17:48:30 -0600 Subject: [PATCH 1/5] Remove ComponentSelector files for move to IS and PSY --- src/PowerAnalytics.jl | 3 +- src/component_selector.jl | 243 -------------------------------- test/test_component_selector.jl | 209 --------------------------- 3 files changed, 2 insertions(+), 453 deletions(-) delete mode 100644 src/component_selector.jl delete mode 100644 test/test_component_selector.jl diff --git a/src/PowerAnalytics.jl b/src/PowerAnalytics.jl index 350d22b..4a3e006 100644 --- a/src/PowerAnalytics.jl +++ b/src/PowerAnalytics.jl @@ -46,6 +46,8 @@ import InfrastructureSystems: get_name import PowerSimulations import InteractiveUtils +# TODO add ComponentSelector imports + const PSY = PowerSystems const IS = InfrastructureSystems const PSI = PowerSimulations @@ -54,7 +56,6 @@ include("definitions.jl") include("get_data.jl") include("fuel_results.jl") -include("component_selector.jl") include("metrics.jl") include("input.jl") include("builtin_component_selectors.jl") diff --git a/src/component_selector.jl b/src/component_selector.jl deleted file mode 100644 index ddb6388..0000000 --- a/src/component_selector.jl +++ /dev/null @@ -1,243 +0,0 @@ -# TODO add a kwarg and testing for filtering on is_available - -"The basic type for all ComponentSelectors." -abstract type ComponentSelector end - -"ComponentSelectors that are not composed of other ComponentSelectors." -abstract type ComponentSelectorElement <: ComponentSelector end - -"ComponentSelectors that are composed of other ComponentSelectors." -abstract type ComponentSelectorSet <: ComponentSelector end - -# TODO perhaps put this elsewhere; it is also referenced in metrics.jl -"Delimeter to use when constructing fully-qualified names." -const NAME_DELIMETER::String = "__" - -"Canonical way to turn a Component subtype into a unique string." -subtype_to_string(subtype::Type{<:Component}) = IS.strip_module_name(subtype) - -"Canonical way to turn a Component specification/instance into a unique-per-System string." -component_to_qualified_string( - component_subtype::Type{<:Component}, - component_name::AbstractString, -) = subtype_to_string(component_subtype) * NAME_DELIMETER * component_name -component_to_qualified_string(component::Component) = - component_to_qualified_string(typeof(component), PSY.get_name(component)) - -# Generic implementations/generic docstrings for simple functions with many methods -""" -Get the default name for the ComponentSelector, constructed automatically from what the -ComponentSelector contains. Particularly with complex ComponentSelectors, this may not -always be very concise or informative, so in these cases constructing the ComponentSelector -with a custom name is recommended. -""" -function default_name end - -""" -Get the name of the ComponentSelector. This is either the default name or a custom name passed in at -creation time. -""" -# Override this if you define a ComponentSelector subtype with no name field -get_name(e::ComponentSelector) = (e.name !== nothing) ? e.name : default_name(e) - -""" -Get the components of the System that make up the ComponentSelector. -""" -function get_components end - -# SingleComponentSelector -"ComponentSelector that wraps a single Component." -struct SingleComponentSelector <: ComponentSelectorElement - component_subtype::Type{<:Component} - component_name::AbstractString - name::Union{String, Nothing} -end - -# Construction -""" -Make a ComponentSelector pointing to a Component with the given subtype and name. Optionally -provide a name for the ComponentSelector. -""" -select_components( - component_subtype::Type{<:Component}, - component_name::AbstractString, - name::Union{String, Nothing} = nothing, -) = SingleComponentSelector(component_subtype, component_name, name) -""" -Construct a ComponentSelector from a Component reference, pointing to Components in any -System with the given Component's subtype and name. -""" -select_components(component_ref::Component, name::Union{String, Nothing} = nothing) = - select_components(typeof(component_ref), get_name(component_ref), name) - -# Naming -default_name(e::SingleComponentSelector) = - component_to_qualified_string(e.component_subtype, e.component_name) - -# Contents -function get_components(e::SingleComponentSelector, sys::PSY.System)::Vector{Component} - com = get_component(e.component_subtype, sys, e.component_name) - return (com === nothing || !get_available(com)) ? [] : [com] -end - -# ListComponentSelector -"ComponentSelectorSet represented by a list of other ComponentSelectors." -struct ListComponentSelector <: ComponentSelectorSet - # Using tuples internally for immutability => `==` is automatically well-behaved - content::Tuple{Vararg{ComponentSelector}} - name::Union{String, Nothing} -end - -# Construction -""" -Make a ComponentSelector pointing to a list of subselectors. Optionally provide a name for -the ComponentSelector. -""" -# name needs to be a kwarg to disambiguate from content -select_components(content::ComponentSelector...; name::Union{String, Nothing} = nothing) = - ListComponentSelector(content, name) - -# Naming -default_name(e::ListComponentSelector) = "[$(join(get_name.(e.content), ", "))]" - -# Contents -function get_subselectors(e::ListComponentSelector, sys::PSY.System) - return e.content -end - -function get_components(e::ListComponentSelector, sys::PSY.System) - sub_components = Iterators.map(x -> get_components(x, sys), e.content) - return Iterators.filter( - get_available, - Iterators.flatten(sub_components), - ) -end - -# SubtypeComponentSelector -"ComponentSelectorSet represented by a subtype of Component." -struct SubtypeComponentSelector <: ComponentSelectorSet - component_subtype::Type{<:Component} - name::Union{String, Nothing} -end - -# Construction -""" -Make a ComponentSelector from a subtype of Component. Optionally provide a name for the -ComponentSelectorSet. -""" -# name needs to be a kwarg to disambiguate from SingleComponentSelector's select_components -select_components( - component_subtype::Type{<:Component}; - name::Union{String, Nothing} = nothing, -) = - SubtypeComponentSelector(component_subtype, name) - -# Naming -default_name(e::SubtypeComponentSelector) = subtype_to_string(e.component_subtype) - -# Contents -function get_subselectors(e::SubtypeComponentSelector, sys::PSY.System) - # Lazily construct SingleComponentSelectors from the Components - return Iterators.map(select_components, get_components(e, sys)) -end - -function get_components(e::SubtypeComponentSelector, sys::PSY.System) - return Iterators.filter(get_available, get_components(e.component_subtype, sys)) -end - -# TopologyComponentSelector -"ComponentSelectorSet represented by an AggregationTopology and a subtype of Component." -struct TopologyComponentSelector <: ComponentSelectorSet - topology_subtype::Type{<:PSY.AggregationTopology} - topology_name::AbstractString - component_subtype::Type{<:Component} - name::Union{String, Nothing} -end - -# Construction -""" -Make a ComponentSelector from an AggregationTopology and a subtype of Component. Optionally -provide a name for the ComponentSelector. -""" -select_components( - topology_subtype::Type{<:PSY.AggregationTopology}, - topology_name::AbstractString, - component_subtype::Type{<:Component}, - name::Union{String, Nothing} = nothing, -) = TopologyComponentSelector( - topology_subtype, - topology_name, - component_subtype, - name, -) - -# Naming -default_name(e::TopologyComponentSelector) = - component_to_qualified_string(e.topology_subtype, e.topology_name) * NAME_DELIMETER * - subtype_to_string(e.component_subtype) - -# Contents -function get_subselectors(e::TopologyComponentSelector, sys::PSY.System) - return Iterators.map(select_components, get_components(e, sys)) -end - -function get_components(e::TopologyComponentSelector, sys::PSY.System) - agg_topology = get_component(e.topology_subtype, sys, e.topology_name) - return Iterators.filter( - get_available, - PSY.get_components_in_aggregation_topology( - e.component_subtype, - sys, - agg_topology, - ), - ) -end - -# FilterComponentSelector -"ComponentSelectorSet represented by a filter function and a subtype of Component." -struct FilterComponentSelector <: ComponentSelectorSet - filter_fn::Function - component_subtype::Type{<:Component} - name::Union{String, Nothing} -end - -# Construction -""" -Make a ComponentSelector from a filter function and a subtype of Component. Optionally -provide a name for the ComponentSelector. The filter function must accept instances of -component_subtype as a sole argument and return a Bool. -""" -function select_components( - filter_fn::Function, - component_subtype::Type{<:Component}, - name::Union{String, Nothing} = nothing, -) - # Try to catch inappropriate filter functions - hasmethod(filter_fn, Tuple{component_subtype}) || throw( - ArgumentError( - "filter function $filter_fn does not have a method that accepts $(subtype_to_string(component_subtype)).", - ), - ) - # TODO it would be nice to have more rigorous checks on filter_fn here: check that the - # return type is a Bool and check whether a filter_fn without parameter type annotations - # can in fact be called on the given subtype (e.g., filter_fn = (x -> x+1 == 0) should - # fail). Core.compiler.return_type does not seem to be stable enough to rely on. The - # IsDef.jl library looks interesting. - return FilterComponentSelector(filter_fn, component_subtype, name) -end - -# Naming -default_name(e::FilterComponentSelector) = - string(e.filter_fn) * NAME_DELIMETER * subtype_to_string(e.component_subtype) - -# Contents -function get_subselectors(e::FilterComponentSelector, sys::PSY.System) - return Iterators.map(select_components, get_components(e, sys)) -end - -function get_components(e::FilterComponentSelector, sys::PSY.System) - return Iterators.filter( - get_available, - get_components(e.filter_fn, e.component_subtype, sys), - ) -end diff --git a/test/test_component_selector.jl b/test/test_component_selector.jl deleted file mode 100644 index 68ac80f..0000000 --- a/test/test_component_selector.jl +++ /dev/null @@ -1,209 +0,0 @@ -test_sys = PSB.build_system(PSB.PSITestSystems, "c_sys5_all_components") -test_sys2 = PSB.build_system(PSB.PSISystems, "5_bus_hydro_uc_sys") - -struct NonexistentComponent <: StaticInjection end # <: Component - -sort_name(x) = sort(collect(x); by = get_name) - -@testset "Test helper functions" begin - @test subtype_to_string(ThermalStandard) == "ThermalStandard" - @test component_to_qualified_string(ThermalStandard, "Solitude") == - "ThermalStandard__Solitude" - @test component_to_qualified_string( - PSY.get_component(ThermalStandard, test_sys, "Solitude"), - ) == "ThermalStandard__Solitude" -end - -@testset "Test SingleComponentSelector" begin - test_gen_ent = PA.SingleComponentSelector(ThermalStandard, "Solitude", nothing) - named_test_gen_ent = PA.SingleComponentSelector(ThermalStandard, "Solitude", "SolGen") - - # Equality - @test PA.SingleComponentSelector(ThermalStandard, "Solitude", nothing) == test_gen_ent - @test PA.SingleComponentSelector(ThermalStandard, "Solitude", "SolGen") == - named_test_gen_ent - - # Construction - @test select_components(ThermalStandard, "Solitude") == test_gen_ent - @test select_components(ThermalStandard, "Solitude", "SolGen") == named_test_gen_ent - @test select_components(get_component(ThermalStandard, test_sys, "Solitude")) == - test_gen_ent - - # Naming - @test get_name(test_gen_ent) == "ThermalStandard__Solitude" - @test get_name(named_test_gen_ent) == "SolGen" - @test default_name(test_gen_ent) == "ThermalStandard__Solitude" - - # Contents - @test collect(get_components(select_components(NonexistentComponent, ""), test_sys)) == - Vector{Component}() - the_components = collect(get_components(test_gen_ent, test_sys)) - @test length(the_components) == 1 - @test typeof(first(the_components)) == ThermalStandard - @test get_name(first(the_components)) == "Solitude" -end - -@testset "Test ListComponentSelector" begin - comp_ent_1 = select_components(ThermalStandard, "Solitude") - comp_ent_2 = select_components(RenewableDispatch, "WindBusA") - test_list_ent = PA.ListComponentSelector((comp_ent_1, comp_ent_2), nothing) - named_test_list_ent = PA.ListComponentSelector((comp_ent_1, comp_ent_2), "TwoComps") - - # Equality - @test PA.ListComponentSelector((comp_ent_1, comp_ent_2), nothing) == test_list_ent - @test PA.ListComponentSelector((comp_ent_1, comp_ent_2), "TwoComps") == - named_test_list_ent - - # Construction - @test select_components(comp_ent_1, comp_ent_2) == test_list_ent - @test select_components(comp_ent_1, comp_ent_2; name = "TwoComps") == - named_test_list_ent - - # Naming - @test get_name(test_list_ent) == - "[ThermalStandard__Solitude, RenewableDispatch__WindBusA]" - @test get_name(named_test_list_ent) == "TwoComps" - - # Contents - @test collect(get_components(select_components(), test_sys)) == Vector{Component}() - the_components = collect(get_components(test_list_ent, test_sys)) - @test length(the_components) == 2 - @test get_component(ThermalStandard, test_sys, "Solitude") in the_components - @test get_component(RenewableDispatch, test_sys, "WindBusA") in the_components - - @test collect(get_subselectors(select_components(), test_sys)) == - Vector{ComponentSelector}() - the_subselectors = collect(get_subselectors(test_list_ent, test_sys)) - @test length(the_subselectors) == 2 - @test comp_ent_1 in the_subselectors - @test comp_ent_2 in the_subselectors -end - -@testset "Test SubtypeComponentSelector" begin - test_sub_ent = PA.SubtypeComponentSelector(ThermalStandard, nothing) - named_test_sub_ent = PA.SubtypeComponentSelector(ThermalStandard, "Thermals") - - # Equality - @test PA.SubtypeComponentSelector(ThermalStandard, nothing) == test_sub_ent - @test PA.SubtypeComponentSelector(ThermalStandard, "Thermals") == named_test_sub_ent - - # Construction - @test select_components(ThermalStandard) == test_sub_ent - @test select_components(ThermalStandard; name = "Thermals") == named_test_sub_ent - - # Naming - @test get_name(test_sub_ent) == "ThermalStandard" - @test get_name(named_test_sub_ent) == "Thermals" - @test default_name(test_sub_ent) == "ThermalStandard" - - # Contents - answer = sort_name(get_components(ThermalStandard, test_sys)) - - @test collect(get_components(select_components(NonexistentComponent), test_sys)) == - Vector{Component}() - the_components = sort_name(get_components(test_sub_ent, test_sys)) - @test all(the_components .== answer) - - @test collect(get_subselectors(select_components(NonexistentComponent), test_sys)) == - Vector{ComponentSelectorElement}() - the_subselectors = sort_name(get_subselectors(test_sub_ent, test_sys)) - @test all(the_subselectors .== select_components.(answer)) -end - -@testset "Test TopologyComponentSelector" begin - topo1 = get_component(Area, test_sys2, "1") - topo2 = get_component(LoadZone, test_sys2, "2") - test_topo_ent1 = PA.TopologyComponentSelector(Area, "1", ThermalStandard, nothing) - test_topo_ent2 = PA.TopologyComponentSelector(LoadZone, "2", StaticInjection, "Zone_2") - @assert (test_topo_ent1 !== nothing) && (test_topo_ent2 !== nothing) "Relies on an out-of-date `5_bus_hydro_uc_sys` definition" - - # Equality - @test PA.TopologyComponentSelector(Area, "1", ThermalStandard, nothing) == - test_topo_ent1 - @test PA.TopologyComponentSelector(LoadZone, "2", StaticInjection, "Zone_2") == - test_topo_ent2 - - # Construction - @test select_components(Area, "1", ThermalStandard) == test_topo_ent1 - @test select_components(LoadZone, "2", StaticInjection, "Zone_2") == test_topo_ent2 - - # Naming - @test get_name(test_topo_ent1) == "Area__1__ThermalStandard" - @test get_name(test_topo_ent2) == "Zone_2" - - # Contents - empty_topo_ent = select_components(Area, "1", NonexistentComponent) - @test collect(get_components(empty_topo_ent, test_sys2)) == Vector{Component}() - @test collect(get_subselectors(empty_topo_ent, test_sys2)) == - Vector{ComponentSelectorElement}() - - answers = - sort_name.(( - PSY.get_components_in_aggregation_topology( - ThermalStandard, - test_sys2, - get_component(Area, test_sys2, "1"), - ), - PSY.get_components_in_aggregation_topology( - StaticInjection, - test_sys2, - get_component(LoadZone, test_sys2, "2"), - ))) - for (ent, ans) in zip((test_topo_ent1, test_topo_ent2), answers) - @assert length(ans) > 0 "Relies on an out-of-date `5_bus_hydro_uc_sys` definition" - - the_components = sort_name(get_components(ent, test_sys2)) - @test all(the_components .== ans) - - the_subselectors = sort_name(get_subselectors(ent, test_sys2)) - @test all(the_subselectors .== sort_name(select_components.(ans))) - end -end - -@testset "Test FilterComponentSelector" begin - starts_with_s(x) = lowercase(first(get_name(x))) == 's' - test_filter_ent = PA.FilterComponentSelector(starts_with_s, ThermalStandard, nothing) - named_test_filter_ent = - PA.FilterComponentSelector(starts_with_s, ThermalStandard, "ThermStartsWithS") - - # Equality - @test PA.FilterComponentSelector(starts_with_s, ThermalStandard, nothing) == - test_filter_ent - @test PA.FilterComponentSelector(starts_with_s, ThermalStandard, "ThermStartsWithS") == - named_test_filter_ent - - # Construction - @test select_components(starts_with_s, ThermalStandard) == test_filter_ent - @test select_components(starts_with_s, ThermalStandard, "ThermStartsWithS") == - named_test_filter_ent - bad_input_fn(x::Integer) = true # Should always fail to construct - specific_input_fn(x::RenewableDispatch) = true # Should require compatible subtype - @test_throws ArgumentError select_components(bad_input_fn, ThermalStandard) - @test_throws ArgumentError select_components(specific_input_fn, Component) - @test_throws ArgumentError select_components(specific_input_fn, ThermalStandard) - @test select_components(specific_input_fn, RenewableDispatch) isa Any # test absence of error - - # Naming - @test get_name(test_filter_ent) == "starts_with_s__ThermalStandard" - @test get_name(named_test_filter_ent) == "ThermStartsWithS" - - # Contents - answer = filter(starts_with_s, collect(get_components(ThermalStandard, test_sys))) - - @test collect( - get_components(select_components(x -> true, NonexistentComponent), test_sys), - ) == - Vector{Component}() - @test collect(get_components(select_components(x -> false, Component), test_sys)) == - Vector{Component}() - @test all(collect(get_components(test_filter_ent, test_sys)) .== answer) - - @test collect( - get_subselectors(select_components(x -> true, NonexistentComponent), test_sys), - ) == Vector{ComponentSelectorElement}() - @test collect(get_subselectors(select_components(x -> false, Component), test_sys)) == - Vector{ComponentSelectorElement}() - @test all( - collect(get_subselectors(test_filter_ent, test_sys)) .== select_components.(answer), - ) -end From 5aed37709f28992d0f6c8673b29e6f50ac7f8ee1 Mon Sep 17 00:00:00 2001 From: Tengis Dashmunkh Date: Sun, 24 Mar 2024 16:33:34 -0600 Subject: [PATCH 2/5] make PA tests pass --- src/PowerAnalytics.jl | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/src/PowerAnalytics.jl b/src/PowerAnalytics.jl index 4a3e006..5bfaaff 100644 --- a/src/PowerAnalytics.jl +++ b/src/PowerAnalytics.jl @@ -8,7 +8,6 @@ export categorize_data export no_datetime export ComponentSelector, ComponentSelectorElement, ComponentSelectorSet -export NAME_DELIMETER, subtype_to_string, component_to_qualified_string export select_components, default_name, get_name, get_subselectors export Metric, TimedMetric, TimelessMetric, ComponentSelectorTimedMetric, ComponentTimedMetric, @@ -40,7 +39,26 @@ import DataFrames: DataFrame, metadata, metadata!, colmetadata, colmetadata! import YAML import DataStructures: OrderedDict, SortedDict import PowerSystems -import PowerSystems: Component, get_component, get_components, get_available +import PowerSystems: + Component, + get_component, + get_components, + get_available, + ComponentSelector, + ComponentSelectorElement, + ComponentSelectorSet, + SingleComponentSelector, + ListComponentSelector, + SubtypeComponentSelector, + FilterComponentSelector, + TopologyComponentSelector, + subtype_to_string, + component_to_qualified_string, + select_components, + get_components, + get_subselectors, + NAME_DELIMETER + import InfrastructureSystems import InfrastructureSystems: get_name import PowerSimulations @@ -48,6 +66,7 @@ import InteractiveUtils # TODO add ComponentSelector imports + const PSY = PowerSystems const IS = InfrastructureSystems const PSI = PowerSimulations From f52c8bdcee563116cd86ebc3fac7654448b11c99 Mon Sep 17 00:00:00 2001 From: Tengis Dashmunkh Date: Mon, 25 Mar 2024 11:06:12 -0600 Subject: [PATCH 3/5] run formatter --- src/PowerAnalytics.jl | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/PowerAnalytics.jl b/src/PowerAnalytics.jl index 5bfaaff..da33cf5 100644 --- a/src/PowerAnalytics.jl +++ b/src/PowerAnalytics.jl @@ -39,12 +39,12 @@ import DataFrames: DataFrame, metadata, metadata!, colmetadata, colmetadata! import YAML import DataStructures: OrderedDict, SortedDict import PowerSystems -import PowerSystems: - Component, - get_component, - get_components, +import PowerSystems: + Component, + get_component, + get_components, get_available, - ComponentSelector, + ComponentSelector, ComponentSelectorElement, ComponentSelectorSet, SingleComponentSelector, @@ -66,7 +66,6 @@ import InteractiveUtils # TODO add ComponentSelector imports - const PSY = PowerSystems const IS = InfrastructureSystems const PSI = PowerSimulations From 1fc16741484cb841c9ff6be63db0c820e57ac8a2 Mon Sep 17 00:00:00 2001 From: GabrielKS <23368820+GabrielKS@users.noreply.github.com> Date: Tue, 11 Jun 2024 13:27:58 -0600 Subject: [PATCH 4/5] Update storage naming for `psy4` --- test/test_builtin_component_selectors.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_builtin_component_selectors.jl b/test/test_builtin_component_selectors.jl index d018efc..5a9e0f0 100644 --- a/test/test_builtin_component_selectors.jl +++ b/test/test_builtin_component_selectors.jl @@ -6,7 +6,7 @@ name_and_type = component -> (typeof(component), get_name(component)) @test Set(name_and_type.(get_components(load_component_selector, test_sys))) == Set([(PowerLoad, "Bus2"), (PowerLoad, "Bus4"), (StandardLoad, "Bus3")]) @test Set(name_and_type.(get_components(storage_component_selector, test_sys2))) == - Set([(GenericBattery, "Bat")]) + Set([(EnergyReservoirStorage, "Bat")]) end @testset "Test generator_selectors_by_fuel" begin From c6d9d14e144131c68341de78e4321e148174825f Mon Sep 17 00:00:00 2001 From: GabrielKS <23368820+GabrielKS@users.noreply.github.com> Date: Tue, 11 Jun 2024 13:44:31 -0600 Subject: [PATCH 5/5] Reevaluate `ComponentSelector`-related imports and exports --- src/PowerAnalytics.jl | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/src/PowerAnalytics.jl b/src/PowerAnalytics.jl index da33cf5..884a2f9 100644 --- a/src/PowerAnalytics.jl +++ b/src/PowerAnalytics.jl @@ -8,7 +8,7 @@ export categorize_data export no_datetime export ComponentSelector, ComponentSelectorElement, ComponentSelectorSet -export select_components, default_name, get_name, get_subselectors +export select_components, get_name, get_subselectors export Metric, TimedMetric, TimelessMetric, ComponentSelectorTimedMetric, ComponentTimedMetric, SystemTimedMetric, ResultsTimelessMetric, CustomTimedMetric @@ -41,31 +41,16 @@ import DataStructures: OrderedDict, SortedDict import PowerSystems import PowerSystems: Component, - get_component, - get_components, + ComponentSelector, ComponentSelectorElement, ComponentSelectorSet, + select_components, get_name, get_subselectors, + get_component, get_components, get_available, - ComponentSelector, - ComponentSelectorElement, - ComponentSelectorSet, - SingleComponentSelector, - ListComponentSelector, - SubtypeComponentSelector, - FilterComponentSelector, - TopologyComponentSelector, - subtype_to_string, - component_to_qualified_string, - select_components, - get_components, - get_subselectors, NAME_DELIMETER import InfrastructureSystems -import InfrastructureSystems: get_name import PowerSimulations import InteractiveUtils -# TODO add ComponentSelector imports - const PSY = PowerSystems const IS = InfrastructureSystems const PSI = PowerSimulations