Fixing website and API documentation links
[PyCIM.git] / CIM14 / ENTSOE / Equipment / OperationalLimits / OperationalLimitType.py
blobf68f128afaed076e9b7fe68a2b84d69929ab41cc
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
19 # IN THE SOFTWARE.
21 from CIM14.ENTSOE.Equipment.Core.IdentifiedObject import IdentifiedObject
23 class OperationalLimitType(IdentifiedObject):
24 """A type of limit. The meaning of a specific limit is described in this class.
25 """
27 def __init__(self, direction="high", acceptableDuration=0.0, OperationalLimit=None, *args, **kw_args):
28 """Initialises a new 'OperationalLimitType' instance.
30 @param direction: The direction of the limit. Values are: "high", "absoluteValue", "low"
31 @param acceptableDuration: The nominal acceptable duration of the limit. Limits are commonly expressed in terms of the a time limit for which the limit is normally acceptable. The actual acceptable duration of a specific limit may depend on other local factors such as temperature or wind speed.
32 @param OperationalLimit: The operational limits associated with this type of limit.
33 """
34 #: The direction of the limit. Values are: "high", "absoluteValue", "low"
35 self.direction = direction
37 #: The nominal acceptable duration of the limit. Limits are commonly expressed in terms of the a time limit for which the limit is normally acceptable. The actual acceptable duration of a specific limit may depend on other local factors such as temperature or wind speed.
38 self.acceptableDuration = acceptableDuration
40 self._OperationalLimit = []
41 self.OperationalLimit = [] if OperationalLimit is None else OperationalLimit
43 super(OperationalLimitType, self).__init__(*args, **kw_args)
45 _attrs = ["direction", "acceptableDuration"]
46 _attr_types = {"direction": str, "acceptableDuration": float}
47 _defaults = {"direction": "high", "acceptableDuration": 0.0}
48 _enums = {"direction": "OperationalLimitDirectionKind"}
49 _refs = ["OperationalLimit"]
50 _many_refs = ["OperationalLimit"]
52 def getOperationalLimit(self):
53 """The operational limits associated with this type of limit.
54 """
55 return self._OperationalLimit
57 def setOperationalLimit(self, value):
58 for x in self._OperationalLimit:
59 x.OperationalLimitType = None
60 for y in value:
61 y._OperationalLimitType = self
62 self._OperationalLimit = value
64 OperationalLimit = property(getOperationalLimit, setOperationalLimit)
66 def addOperationalLimit(self, *OperationalLimit):
67 for obj in OperationalLimit:
68 obj.OperationalLimitType = self
70 def removeOperationalLimit(self, *OperationalLimit):
71 for obj in OperationalLimit:
72 obj.OperationalLimitType = None