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
.ENTSOE
.Equipment
.Core
.IdentifiedObject
import IdentifiedObject
23 class Curve(IdentifiedObject
):
24 """A multi-purpose curve or functional relationship between an independent variable (X-axis) and dependent (Y-axis) variables.
27 def __init__(self
, y1Unit
="A", curveStyle
="straightLineYValues", xUnit
="A", CurveDatas
=None, *args
, **kw_args
):
28 """Initialises a new 'Curve' instance.
30 @param y1Unit: The Y1-axis units of measure. Values are: "A", "rad", "none", "g", "W/Hz", "V", "m2", "VA", "VArh", "N", "Pa", "VAh", "F", "H", "Hz-1", "W/s", "J", "m", "S", "min", "deg", "J/s", "s", "Wh", "m3", "oC", "V/VAr", "s-1", "h", "W", "ohm", "Hz", "VAr", "kg/J"
31 @param curveStyle: The style or shape of the curve. Values are: "straightLineYValues", "rampYValue", "constantYValue", "formula"
32 @param xUnit: The X-axis units of measure. Values are: "A", "rad", "none", "g", "W/Hz", "V", "m2", "VA", "VArh", "N", "Pa", "VAh", "F", "H", "Hz-1", "W/s", "J", "m", "S", "min", "deg", "J/s", "s", "Wh", "m3", "oC", "V/VAr", "s-1", "h", "W", "ohm", "Hz", "VAr", "kg/J"
33 @param CurveDatas: The point data values that define a curve
35 #: The Y1-axis units of measure. Values are: "A", "rad", "none", "g", "W/Hz", "V", "m2", "VA", "VArh", "N", "Pa", "VAh", "F", "H", "Hz-1", "W/s", "J", "m", "S", "min", "deg", "J/s", "s", "Wh", "m3", "oC", "V/VAr", "s-1", "h", "W", "ohm", "Hz", "VAr", "kg/J"
38 #: The style or shape of the curve. Values are: "straightLineYValues", "rampYValue", "constantYValue", "formula"
39 self
.curveStyle
= curveStyle
41 #: The X-axis units of measure. Values are: "A", "rad", "none", "g", "W/Hz", "V", "m2", "VA", "VArh", "N", "Pa", "VAh", "F", "H", "Hz-1", "W/s", "J", "m", "S", "min", "deg", "J/s", "s", "Wh", "m3", "oC", "V/VAr", "s-1", "h", "W", "ohm", "Hz", "VAr", "kg/J"
45 self
.CurveDatas
= [] if CurveDatas
is None else CurveDatas
47 super(Curve
, self
).__init
__(*args
, **kw_args
)
49 _attrs
= ["y1Unit", "curveStyle", "xUnit"]
50 _attr_types
= {"y1Unit": str, "curveStyle": str, "xUnit": str}
51 _defaults
= {"y1Unit": "A", "curveStyle": "straightLineYValues", "xUnit": "A"}
52 _enums
= {"y1Unit": "UnitSymbol", "curveStyle": "CurveStyle", "xUnit": "UnitSymbol"}
53 _refs
= ["CurveDatas"]
54 _many_refs
= ["CurveDatas"]
56 def getCurveDatas(self
):
57 """The point data values that define a curve
59 return self
._CurveDatas
61 def setCurveDatas(self
, value
):
62 for x
in self
._CurveDatas
:
66 self
._CurveDatas
= value
68 CurveDatas
= property(getCurveDatas
, setCurveDatas
)
70 def addCurveDatas(self
, *CurveDatas
):
71 for obj
in CurveDatas
:
74 def removeCurveDatas(self
, *CurveDatas
):
75 for obj
in CurveDatas
: