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
.IEC61970
.LoadModel
.SeasonDayTypeSchedule
import SeasonDayTypeSchedule
19 class ConformLoadSchedule(SeasonDayTypeSchedule
):
20 """A curve of load versus time (X-axis) showing the active power values (Y1-axis) and reactive power (Y2-axis) for each unit of the period covered. This curve represents a typical pattern of load over the time period for a given day type and season.
23 def __init__(self
, ConformLoadGroup
=None, *args
, **kw_args
):
24 """Initialises a new 'ConformLoadSchedule' instance.
26 @param ConformLoadGroup: The ConformLoadGroup where the ConformLoadSchedule belongs.
28 self
._ConformLoadGroup
= None
29 self
.ConformLoadGroup
= ConformLoadGroup
31 super(ConformLoadSchedule
, self
).__init
__(*args
, **kw_args
)
37 _refs
= ["ConformLoadGroup"]
40 def getConformLoadGroup(self
):
41 """The ConformLoadGroup where the ConformLoadSchedule belongs.
43 return self
._ConformLoadGroup
45 def setConformLoadGroup(self
, value
):
46 if self
._ConformLoadGroup
is not None:
47 filtered
= [x
for x
in self
.ConformLoadGroup
.ConformLoadSchedules
if x
!= self
]
48 self
._ConformLoadGroup
._ConformLoadSchedules
= filtered
50 self
._ConformLoadGroup
= value
51 if self
._ConformLoadGroup
is not None:
52 if self
not in self
._ConformLoadGroup
._ConformLoadSchedules
:
53 self
._ConformLoadGroup
._ConformLoadSchedules
.append(self
)
55 ConformLoadGroup
= property(getConformLoadGroup
, setConformLoadGroup
)