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
.IEC61970
.StateVariables
.StateVariable
import StateVariable
23 class SvShortCircuit(StateVariable
):
24 """State variable for short circuit.
27 def __init__(self
, x0PerX
=0.0, sShortCircuit
=0.0, r0PerR
=0.0, xPerR
=0.0, TopologicalNode
=None, *args
, **kw_args
):
28 """Initialises a new 'SvShortCircuit' instance.
30 @param x0PerX: The ratio of zero sequence reactance per positive sequence reactance.
31 @param sShortCircuit: The short circuit apparent power drawn at this node when faulted.
32 @param r0PerR: The ratio of zero sequence resistance to positive sequence resistance.
33 @param xPerR: Ratio of positive sequence reactance per postive sequence resistance.
34 @param TopologicalNode: The topological node associated with the short circuit state.
36 #: The ratio of zero sequence reactance per positive sequence reactance.
39 #: The short circuit apparent power drawn at this node when faulted.
40 self
.sShortCircuit
= sShortCircuit
42 #: The ratio of zero sequence resistance to positive sequence resistance.
45 #: Ratio of positive sequence reactance per postive sequence resistance.
48 self
._TopologicalNode
= None
49 self
.TopologicalNode
= TopologicalNode
51 super(SvShortCircuit
, self
).__init
__(*args
, **kw_args
)
53 _attrs
= ["x0PerX", "sShortCircuit", "r0PerR", "xPerR"]
54 _attr_types
= {"x0PerX": float, "sShortCircuit": float, "r0PerR": float, "xPerR": float}
55 _defaults
= {"x0PerX": 0.0, "sShortCircuit": 0.0, "r0PerR": 0.0, "xPerR": 0.0}
57 _refs
= ["TopologicalNode"]
60 def getTopologicalNode(self
):
61 """The topological node associated with the short circuit state.
63 return self
._TopologicalNode
65 def setTopologicalNode(self
, value
):
66 if self
._TopologicalNode
is not None:
67 self
._TopologicalNode
._SvShortCircuit
= None
69 self
._TopologicalNode
= value
70 if self
._TopologicalNode
is not None:
71 self
._TopologicalNode
.SvShortCircuit
= None
72 self
._TopologicalNode
._SvShortCircuit
= self
74 TopologicalNode
= property(getTopologicalNode
, setTopologicalNode
)