intelligent-environments-lab / CityLearn

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

Citylearn challenge 2023 power outage env #86

Closed kingsleynweye closed 10 months ago

kingsleynweye commented 10 months ago

Description

Fixed bug where citylearn.citylearn.CityLearnEnv.evaluate method throws an AttributeError when building is not of type citylearn.building.DynamicBuilding.

This issue is as a result of the default baseline_condition variable name, net_electricity_consumption_without_storage_and_partial_load, not existing in citylearn.buildingBuilding and schemas that use buildings of such type caused citylearn.citylearn.CityLearnEnv.evaluate to fail.

Since the notebooks in examples still use CityLearn==2.0.0, a temporary fix has been provided in the notebooks to ensure citylearn.citylearn.CityLearnEnv.evaluate works by specifying an alternative baseline_condition:

...
kpis = model.env.evaluate(baseline_condition=EvaluationCondition.WITHOUT_STORAGE_BUT_WITH_PARTIAL_LOAD_AND_PV)
...

CityLearn>=2.1b9 will have this bug fixed.

Issue

Changes

Screenshots

NIL

Checklist

Additional notes

NIL