intelligent-environments-lab / CityLearn

Official reinforcement learning environment for demand response and load shaping
MIT License
462 stars 167 forks source link

a few optimizations in building and energy_model #23

Closed ludwigbald closed 1 year ago

ludwigbald commented 2 years ago

I have made a few changes that should noticeably speed up CityLearn. The fundamental problem is that at every step, every metric is recomputed even for thousands of past observations. I have not been able to fix that without changing behaviour, but the energy_balance functions are the main bottlenecks.

Another way we could speed things up (by ~half!) for this year's challenge would be to somehow drop the expensive simulation of empty heat storage systems, since we don't have them.

You might want to do more extensive tests with different agent setups before merging. I only tested against the rule based agent that I did not break functionality.

nagyzoltan commented 2 years ago

Thanks for this suggestion @ludwigbald ! We will take a look in our next code review.

ludwigbald commented 1 year ago

this has been fixed elsewhere, closing this PR