Open BenWinchester opened 2 years ago
@hamishbeath , let me know if you've got a spare moment what your thoughts on this rounding error might be, whether it's something you've hit before, and, if so, whether it is just a rounding error, or whether it's something more serious :smile:
My hunch is that this is due to a rounding error. If it sometimes produces 0.099 rather than 0.1 and there are no larger errors occurring I would probably recommend leaving it as it is, I will defer to @phil-sandwell on this though.
This is potentially due to having a one-year simulation which results in the diesel times being rounded to the nearest 1/365th, or, 0.00273973
Describe the bug
There is a potential rounding error in CLOVER which is leading to it producing incorrect results.
A case point for this can be found within the integration testing, specifically, a test involving diesel backup generation, pv panels, and storage. With the diesel backup threshold set to be 0.1, it is expected that the blackouts for the system over the course of the simulation should come out at 0.1. However, the value of 0.099 is reported. This may be an actual error within the calculations of CLOVER, or, more hopefully, it is a simple rounding error.
To Reproduce
Steps to reproduce the behavior:
Expected behaviour
A clear and concise description of what you expected to happen.
Screenshots
Code snippet
The specific lines, namely, that diesel is being modelled, and that blackouts are 0.099, have been highlighted.
Additional Information
Desktop
(please complete the following information)
git clone
5.0.3
and all code prior to release #102master
and all downstream branchesModifications
The code is being modified to introduce more integration tests. This has resulted in the issue being highlighted.
Additional context
No additional context is needed :smile: