Closed Skywuuuu closed 1 year ago
Hi @Skywuuuu thanks for finding the bug and proposing the solution. I just pushed a commit that fixes it. You will need to update your CityLearn version to the most recent release to have the fix as well as other updates:
pip install CityLearn==2.0b3
Hi, I think there is a bug in
citylearn.reward_function.MARL
.Issue Description
Please provide a brief description of the issue. When I use MARL reward function in file
citylearn.reward_function
as my reward function, bug appears at line 64 of this file.Expected Behavior
It should give the maximum number between 0 and _district_electricityconsumption.
Actual Behavior
TypeError: 'numpy.float64' object cannot be interpreted as an integer
Steps to Reproduce
Just replace the reward function to MARL, and then the bug appears.
Environment
Possible Solution
Simply add parentheses inside the
np.nanmax
.