You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Run '...'
Click on '....'
Scroll down to '....'
See error
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.
@pytest.mark.integrest
def test_self_prioritise_diesel_pv_and_storage(self):
"""
Tests the case with diesel, PV and storage.
The test simulation uses:
- a PV system size of 20 kWP;
- a storage system size of 25 kWh.
"""
info_file_data = self._run_clover_simulation(
+ True,
False,
True,
True,
prioritise_self_generation=False,
pv_size=20,
storage_size=25,
)
self._check_output(
info_file_data,
average_daily_diesel=5.548,
average_daily_grid_energy=0.0,
average_daily_grid_times=0.0,
average_daily_renewables_energy=4.271,
average_daily_storage_energy=9.807,
+ blackouts=0.099,
cumulative_cost=33821.539,
cumulative_ghgs=91493.592,
cumulative_pv_generation=36685.0,
diesel_capacity=3.0,
diesel_times=0.356,
final_pv_size=19.0,
final_storage_size=20.227,
initial_pv_size=20.0,
initial_storage_size=25.0,
lcue=1.179,
renewables_fraction=0.717,
unmet_energy_fraction=0.011,
)
@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 😄
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.
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 v5.0.3 - 🚀 Allow non-integer step sizes #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 😄
The text was updated successfully, but these errors were encountered: