FZJ-IEK3-VSA/tsam

Picking more than 24 hours (4 type weeks)

ckaldemeyer opened this issue · 3 comments

I am doing some tests and everything seems to work well with less than 24 hours.

But if I change the call from let's say:

aggregation = tsam.TimeSeriesAggregation(normalized, noTypicalPeriods=7,
	                                 hoursPerPeriod=24,
	                                 clusterMethod='hierarchical')

to (trying to pick 4 type weeks per year):

aggregation = tsam.TimeSeriesAggregation(normalized, noTypicalPeriods=4,
	                                 hoursPerPeriod=24*7,
	                                 clusterMethod='hierarchical')

I get an error:

Traceback (most recent call last):
  File "cluster.py", line 34, in <module>
    typPeriods = aggregation.createTypicalPeriods()
  File "/home/cord/Programmierung/tsam/tsam/timeseriesaggregation.py", line 793, in createTypicalPeriods
    self.clusterPeriodNoOccur[self.clusterOrder[-1]] -= (1 - float(len(self.timeSeries) % self.timeStepsPerPeriod)/self.timeStepsPerPeriod)
AttributeError: 'TimeSeriesAggregation' object has no attribute 'clusterPeriodNoOccur'

I have observed that it pops up when I change the value of hoursPerPeriod to more than 24 hours.

Can anyone help?

Best
Cord

If you want, I can also prepare a gist with the script/data to reproduce the error..

Hey Cord,

it should work now.

Thanks for your feedback!

Best
Leander

Hey Cord,

it should work now.

Thanks for your feedback!

Best
Leander

Thanks for fixing!