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
.IEC61968
.Metering
.DeviceFunction
import DeviceFunction
23 class ElectricMeteringFunction(DeviceFunction
):
24 """Functionality performed by an electric meter.
27 def __init__(self
, billingMultiplierApplied
=False, kWMultiplier
=0, demandMultiplier
=0.0, demandMultiplierApplied
=False, transformerRatiosApplied
=False, voltageRating
=0.0, billingMultiplier
=0.0, transformerVTRatio
=0.0, kWhMultiplier
=0, transformerCTRatio
=0.0, currentRating
=0.0, *args
, **kw_args
):
28 """Initialises a new 'ElectricMeteringFunction' instance.
30 @param billingMultiplierApplied: True if the billingMultiplier ratio has already been applied to the associated quantities.
31 @param kWMultiplier: Meter kW (pulse) multiplier, used as a multiplier for a meter register reading to determine the actual amount of usage for which to bill a customer.
32 @param demandMultiplier: An additional multiplier that may be used for normalization of the demand value to an hourly value. For example, if the demand interval were set to 15 min, the demand multiplier would be 4. If the meter design is such that the demand value reported and displayed is compensated for by the meter itself and no additional scaling is required outside of the meter, the value of the demand multiplier should be '1'.
33 @param demandMultiplierApplied: True if the demandMultiplier ratio has already been applied to the associated quantities.
34 @param transformerRatiosApplied: True if transformer ratios have been already applied to the associated quantities.
35 @param voltageRating: The service voltage at which the meter is designed to operate. Typical voltage ratings in North America are 120 V, 240 V, 277 V or 480 V.
36 @param billingMultiplier: Customer billing value = meter multiplier * transformer ratios * reading value. The multiplier identifies the scaling value to apply to the reported value after delivery of the tagged item.
37 @param transformerVTRatio: Voltage transformer ratio used to convert associated quantities to real measurements.
38 @param kWhMultiplier: Meter kWh multiplier, used as a multiplier for a meter register reading to determine the actual amount of usage for which to bill a customer.
39 @param transformerCTRatio: Current transformer ratio used to convert associated quantities to real measurements.
40 @param currentRating: The current class of the meter. Typical current classes in North America are 10 A, 20 A, 100 A, 200 A, or 320 A.
42 #: True if the billingMultiplier ratio has already been applied to the associated quantities.
43 self
.billingMultiplierApplied
= billingMultiplierApplied
45 #: Meter kW (pulse) multiplier, used as a multiplier for a meter register reading to determine the actual amount of usage for which to bill a customer.
46 self
.kWMultiplier
= kWMultiplier
48 #: An additional multiplier that may be used for normalization of the demand value to an hourly value. For example, if the demand interval were set to 15 min, the demand multiplier would be 4. If the meter design is such that the demand value reported and displayed is compensated for by the meter itself and no additional scaling is required outside of the meter, the value of the demand multiplier should be '1'.
49 self
.demandMultiplier
= demandMultiplier
51 #: True if the demandMultiplier ratio has already been applied to the associated quantities.
52 self
.demandMultiplierApplied
= demandMultiplierApplied
54 #: True if transformer ratios have been already applied to the associated quantities.
55 self
.transformerRatiosApplied
= transformerRatiosApplied
57 #: The service voltage at which the meter is designed to operate. Typical voltage ratings in North America are 120 V, 240 V, 277 V or 480 V.
58 self
.voltageRating
= voltageRating
60 #: Customer billing value = meter multiplier * transformer ratios * reading value. The multiplier identifies the scaling value to apply to the reported value after delivery of the tagged item.
61 self
.billingMultiplier
= billingMultiplier
63 #: Voltage transformer ratio used to convert associated quantities to real measurements.
64 self
.transformerVTRatio
= transformerVTRatio
66 #: Meter kWh multiplier, used as a multiplier for a meter register reading to determine the actual amount of usage for which to bill a customer.
67 self
.kWhMultiplier
= kWhMultiplier
69 #: Current transformer ratio used to convert associated quantities to real measurements.
70 self
.transformerCTRatio
= transformerCTRatio
72 #: The current class of the meter. Typical current classes in North America are 10 A, 20 A, 100 A, 200 A, or 320 A.
73 self
.currentRating
= currentRating
75 super(ElectricMeteringFunction
, self
).__init
__(*args
, **kw_args
)
77 _attrs
= ["billingMultiplierApplied", "kWMultiplier", "demandMultiplier", "demandMultiplierApplied", "transformerRatiosApplied", "voltageRating", "billingMultiplier", "transformerVTRatio", "kWhMultiplier", "transformerCTRatio", "currentRating"]
78 _attr_types
= {"billingMultiplierApplied": bool, "kWMultiplier": int, "demandMultiplier": float, "demandMultiplierApplied": bool, "transformerRatiosApplied": bool, "voltageRating": float, "billingMultiplier": float, "transformerVTRatio": float, "kWhMultiplier": int, "transformerCTRatio": float, "currentRating": float}
79 _defaults
= {"billingMultiplierApplied": False, "kWMultiplier": 0, "demandMultiplier": 0.0, "demandMultiplierApplied": False, "transformerRatiosApplied": False, "voltageRating": 0.0, "billingMultiplier": 0.0, "transformerVTRatio": 0.0, "kWhMultiplier": 0, "transformerCTRatio": 0.0, "currentRating": 0.0}