1 # Copyright (C) 2010-2011 Richard Lincoln
3 # Permission is hereby granted, free of charge, to any person obtaining a copy
4 # of this software and associated documentation files (the "Software"), to
5 # deal in the Software without restriction, including without limitation the
6 # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
7 # sell copies of the Software, and to permit persons to whom the Software is
8 # furnished to do so, subject to the following conditions:
10 # The above copyright notice and this permission notice shall be included in
11 # all copies or substantial portions of the Software.
13 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
18 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
21 from CIM14
.ENTSOE
.StateVariables
.Element
import Element
23 class TopologicalNode(Element
):
24 """For a detailed substation model a TopologicalNode is a set of connectivity nodes that, in the current network state, are connected together through any type of closed switches, including jumpers. Topological nodes changes as the current network state changes (i.e., switches, breakers, etc. change state). For a planning model switch statuses are not used to form TopologicalNodes. Instead they are manually created or deleted in a model builder tool. TopologialNodes maintained this way are also called 'busses'.
27 def __init__(self
, SvShortCircuit
=None, SvVoltage
=None, SvInjection
=None, *args
, **kw_args
):
28 """Initialises a new 'TopologicalNode' instance.
30 @param SvShortCircuit: The short circuit state associated with the topological node.
31 @param SvVoltage: The state voltage associated with the topological node.
32 @param SvInjection: The injection state associated with the topological node.
34 self
._SvShortCircuit
= None
35 self
.SvShortCircuit
= SvShortCircuit
37 self
._SvVoltage
= None
38 self
.SvVoltage
= SvVoltage
40 self
._SvInjection
= None
41 self
.SvInjection
= SvInjection
43 super(TopologicalNode
, self
).__init
__(*args
, **kw_args
)
49 _refs
= ["SvShortCircuit", "SvVoltage", "SvInjection"]
52 def getSvShortCircuit(self
):
53 """The short circuit state associated with the topological node.
55 return self
._SvShortCircuit
57 def setSvShortCircuit(self
, value
):
58 if self
._SvShortCircuit
is not None:
59 self
._SvShortCircuit
._TopologicalNode
= None
61 self
._SvShortCircuit
= value
62 if self
._SvShortCircuit
is not None:
63 self
._SvShortCircuit
.TopologicalNode
= None
64 self
._SvShortCircuit
._TopologicalNode
= self
66 SvShortCircuit
= property(getSvShortCircuit
, setSvShortCircuit
)
68 def getSvVoltage(self
):
69 """The state voltage associated with the topological node.
71 return self
._SvVoltage
73 def setSvVoltage(self
, value
):
74 if self
._SvVoltage
is not None:
75 self
._SvVoltage
._TopologicalNode
= None
77 self
._SvVoltage
= value
78 if self
._SvVoltage
is not None:
79 self
._SvVoltage
.TopologicalNode
= None
80 self
._SvVoltage
._TopologicalNode
= self
82 SvVoltage
= property(getSvVoltage
, setSvVoltage
)
84 def getSvInjection(self
):
85 """The injection state associated with the topological node.
87 return self
._SvInjection
89 def setSvInjection(self
, value
):
90 if self
._SvInjection
is not None:
91 self
._SvInjection
._TopologicalNode
= None
93 self
._SvInjection
= value
94 if self
._SvInjection
is not None:
95 self
._SvInjection
.TopologicalNode
= None
96 self
._SvInjection
._TopologicalNode
= self
98 SvInjection
= property(getSvInjection
, setSvInjection
)