Skip to content

Commit

Permalink
Bug110 (#111)
Browse files Browse the repository at this point in the history
* remove connector from supported edges
  • Loading branch information
noahrhodes authored Oct 26, 2022
1 parent cdc9be4 commit 0e35f04
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/core/types.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

const supported_component_types = ["bus","gen","branch","dcline","load", "connector"]
const supported_component_types = ["bus","gen","branch","dcline","load"]
const supported_node_types = ["bus","gen","load"]
const supported_edge_types = ["branch","dcline","connector"]
const supported_edge_types = ["branch","dcline"]


"""
Expand Down
15 changes: 10 additions & 5 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,11 @@ data = PowerModels.parse_file("$(joinpath(dirname(pathof(PowerModels)), ".."))/t
case["gen"]["15"] = deepcopy(case["gen"]["1"])
PMG = PowerModelsGraph(case)

case = PowerModels.parse_file("$(joinpath(dirname(pathof(PowerModels)), ".."))/test/data/matpower/case5.m")
powerplot(case)
case = layout_network(case)
powerplot(case, fixed=true)

end

@testset "Multinetwork plots" begin
Expand All @@ -151,7 +156,7 @@ data = PowerModels.parse_file("$(joinpath(dirname(pathof(PowerModels)), ".."))/t
case = PowerModels.parse_file("$(joinpath(dirname(pathof(PowerModels)), ".."))/test/data/matpower/case5.m")
p=powerplot(case, components=["bus","branch"])
@test length(keys(p.layer))==2

end

@testset "Experimental" begin
Expand Down Expand Up @@ -211,17 +216,17 @@ data = PowerModels.parse_file("$(joinpath(dirname(pathof(PowerModels)), ".."))/t


@testset "Verify new components are fully supported" begin

# set of nodes and edges is equivalent to all supported components
@test Set(union(supported_node_types,supported_edge_types))==Set(supported_component_types)

for comp_type in supported_component_types
Memento.info(PowerPlots._LOGGER, "checking support for: $comp_type")

# check that all components have a plot function
@test isdefined(PowerPlots, Symbol("plot_$comp_type"))

# check that all components have kwargs
# check that all components have kwargs
@test haskey(default_plot_attributes, Symbol("$(comp_type)_size"))
@test haskey(default_plot_attributes, Symbol("$(comp_type)_color"))
# skip connector
Expand Down

0 comments on commit 0e35f04

Please sign in to comment.