Skip to content

Commit

Permalink
Merge pull request #2 from GabrielKS/gks/td/component_selector_port
Browse files Browse the repository at this point in the history
Move ComponentSelector from PowerAnalytics to InfrastructureSystems: PA portion
  • Loading branch information
GabrielKS authored Jun 11, 2024
2 parents d23f181 + c6d9d14 commit 88b2d6e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 458 deletions.
14 changes: 9 additions & 5 deletions src/PowerAnalytics.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ 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 select_components, get_name, get_subselectors
export Metric, TimedMetric, TimelessMetric, ComponentSelectorTimedMetric,
ComponentTimedMetric,
SystemTimedMetric, ResultsTimelessMetric, CustomTimedMetric
Expand Down Expand Up @@ -40,9 +39,15 @@ 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,
ComponentSelector, ComponentSelectorElement, ComponentSelectorSet,
select_components, get_name, get_subselectors,
get_component, get_components,
get_available,
NAME_DELIMETER

import InfrastructureSystems
import InfrastructureSystems: get_name
import PowerSimulations
import InteractiveUtils

Expand All @@ -54,7 +59,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")
Expand Down
243 changes: 0 additions & 243 deletions src/component_selector.jl

This file was deleted.

2 changes: 1 addition & 1 deletion test/test_builtin_component_selectors.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading

0 comments on commit 88b2d6e

Please sign in to comment.