where the expected_energy is set to 0.0 for when there isn't a power outage.
As a result, when there is NO power outage for a given time series (i.e. data['power_outage'].all() == True), all of data['expected_energy'] gets set to zero, which leads to a division by zero in:
Description
Simple fix in the unserved energy cost calculation.
Issue
The problem lies in the
normalized_unserved_energy
function, in the line:where the
expected_energy
is set to 0.0 for when there isn't a power outage.As a result, when there is NO power outage for a given time series (i.e.
data['power_outage'].all() == True
), all ofdata['expected_energy']
gets set to zero, which leads to a division by zero in:Changes
Simple fix by only setting the
unserved_energy
to zero, and leaving theexpected_energy
as is:Screenshots
n/a
Checklist
requirements.txt
file, if applicable.Additional notes
As discussed on Discord with @kingsleynweye :)