Closed mabijkerk closed 1 year ago
This issue has had no activity for 60 days and will be closed in 7 days. Removing the "Stale" label or posting a comment will prevent it from being closed automatically. You can also add the "Pinned" label to ensure it isn't marked as stale in the future.
For the hydrogen improvements project we want to calculate the hourly co2 intensity of electricity production by dividing the hourly co2 emissions curve of electricity production by the hourly total electricity production curve. This requires the addition of a DIVIDE_CURVES functionality to https://github.com/quintel/etengine/blob/master/app/models/gql/runtime/functions/curves.rb
One challenging aspect is how to handle division by 0. For this particular case the likelihood of there being an hour with 0 electricity production is very small. In the case that it does happen the co2 intensity should also be 0. I can however imagine that is not generally the case for all uses of this new functionality.
Perhaps an argument should be added to the function that specifies how you want division by 0 to be handled? That way modellers can determine it on a case-by-case basis?