Adding class meta-data attributes.
[PyCIM.git] / schemata / CIM14 / IEC61968 / Metering / DynamicDemand.py
blob8a42c32741759e11ee105ab6b03a32c432c1c474
1 # Copyright (C) 2010 Richard Lincoln
3 # This library is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU Lesser General Public
5 # License as published by the Free Software Foundation; either
6 # version 2.1 of the License, or (at your option) any later version.
8 # This library is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 # Lesser General Public License for more details.
13 # You should have received a copy of the GNU Lesser General Public
14 # License along with this library; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA, USA
17 from CIM14.Element import Element
19 class DynamicDemand(Element):
20 """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, 30, 15, 10, or 5 minutes 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.'
21 """
23 def __init__(self, kind="logarithmic", interval=0.0, subInterval=0.0, *args, **kw_args):
24 """Initialises a new 'DynamicDemand' instance.
26 @param kind: Kind of demand. Values are: "logarithmic", "fixedBlock", "rollingBlock"
27 @param interval: Demand interval.
28 @param subInterval: (if 'kind'=rollingBlock) Subinterval, must be multiple of 'interval' that contains it.
29 """
30 #: Kind of demand. Values are: "logarithmic", "fixedBlock", "rollingBlock"
31 self.kind = kind
33 #: Demand interval.
34 self.interval = interval
36 #: (if 'kind'=rollingBlock) Subinterval, must be multiple of 'interval' that contains it.
37 self.subInterval = subInterval
39 super(DynamicDemand, self).__init__(*args, **kw_args)
41 _attrs = ["kind", "interval", "subInterval"]
42 _attr_types = {"kind": str, "interval": float, "subInterval": float}
43 _defaults = {"kind": "logarithmic", "interval": 0.0, "subInterval": 0.0}
44 _enums = {"kind": "DemandKind"}
45 _refs = []
46 _many_refs = []