open-ideas / StROBe

Python module for stochastic residential occupancy behavior for both building and district energy simulations.
38 stars 15 forks source link

Wrong selection of occupancy clusters #32

Closed cprotopa closed 4 years ago

cprotopa commented 4 years ago

There is a bug in the selection of occupancy clusters (patterns). One cluster is wrongly omitted, and the rest sampled with wrong probabilities. This results in overall bad distribution of occupancy patterns, notably with more absent types. I think annual consumption will end up the same on average, but maybe the timing can differ a bit (I didn't perform a thorough investigation). Will propose a fix for this.

SilkeVerbruggen commented 4 years ago

I did not test the selection of clusters myself, but a student doing simulations found that the pattern representing absence during the evening/night was the most often chosen. So it's possible that something went wrong with the cluster selection.

cprotopa commented 4 years ago

@SilkeVerbruggen Indeed, it was because the code only chose clusters 1-6, but with the probabilities of clusters 2-7. Since the clusters with evening absence were next to "popular" other clusters, they ended up selected more often than they should. I suppose it's ok to merge this request then.

SilkeVerbruggen commented 4 years ago

Yes I think so