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.
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.