Update README.rst
[PyCIM.git] / CIM15 / IEC61968 / Metering / DynamicDemand.py
blobac4042697077709030debe816f6c80a79115cb03
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.
22 class DynamicDemand(object):
23 """Dynamic demand description. The formula by which demand is measured is an important underlying definition to the measurement. Generally speaking, all of the meters in a given utility will be configured to measure demand the same way. Nevertheless, it must be defined. An 'interval' of 60 min, 30 min, 15 min, 10 min or 5 min must be defined to describe the interval of time over which usage is measured. When demand is defined to be DemandKind.rollingBlock, both an 'interval' and a 'subinterval' must be defined, where the 'subinterval' must be a multiple of the 'interval' which contains it. A common setting is '15-minute rolling block with 5-minute subintervals.'Dynamic demand description. The formula by which demand is measured is an important underlying definition to the measurement. Generally speaking, all of the meters in a given utility will be configured to measure demand the same way. Nevertheless, it must be defined. An 'interval' of 60 min, 30 min, 15 min, 10 min or 5 min must be defined to describe the interval of time over which usage is measured. When demand is defined to be DemandKind.rollingBlock, both an 'interval' and a 'subinterval' must be defined, where the 'subinterval' must be a multiple of the 'interval' which contains it. A common setting is '15-minute rolling block with 5-minute subintervals.'
24 """
26 def __init__(self, subInterval=0.0, interval=0.0, kind="fixedBlock"):
27 """Initialises a new 'DynamicDemand' instance.
29 @param subInterval: (if 'kind'=rollingBlock) Subinterval, must be multiple of 'interval' that contains it.
30 @param interval: Demand interval.
31 @param kind: Kind of demand. Values are: "fixedBlock", "rollingBlock", "logarithmic"
32 """
33 #: (if 'kind'=rollingBlock) Subinterval, must be multiple of 'interval' that contains it.
34 self.subInterval = subInterval
36 #: Demand interval.
37 self.interval = interval
39 #: Kind of demand. Values are: "fixedBlock", "rollingBlock", "logarithmic"
40 self.kind = kind
43 _attrs = ["subInterval", "interval", "kind"]
44 _attr_types = {"subInterval": float, "interval": float, "kind": str}
45 _defaults = {"subInterval": 0.0, "interval": 0.0, "kind": "fixedBlock"}
46 _enums = {"kind": "DemandKind"}
47 _refs = []
48 _many_refs = []