Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simultaneous discharge events are possible -> disappearing water #49

Closed
val-ismaili opened this issue Feb 11, 2025 · 0 comments · Fixed by #46
Closed

Simultaneous discharge events are possible -> disappearing water #49

val-ismaili opened this issue Feb 11, 2025 · 0 comments · Fixed by #46
Assignees
Labels
bug Something isn't working

Comments

@val-ismaili
Copy link
Collaborator

We've found a bug with the current implementation of discharge events for some appliances. Some appliances are used in close succession such as the use of a KitchenTap during morning and evening use by multiple users. In a situation where the sampled discharge_flow_rate is slower than the consumption flow rate, the discharge time will extend past the consumption event time - this is correct. The problem arises if the next consumption event begins before the discharge event for the previous consumption event has finished. Currently the discharge event will overwrite the data from the previous discharge event -> therefore resulting in water volume vanishing from the system.

The proposed solution is to add a check for each discharge event to check that if there is a non-zero discharge_flow_rate at the expected discharge start time, to delay this discharge start time to the next timestamp with a zero discharge_flow_rate. This would allow the full remaining water from the previous consumption event to be fully discharged before discharging the volume added by the latest consumption.

@val-ismaili val-ismaili added the bug Something isn't working label Feb 11, 2025
@val-ismaili val-ismaili linked a pull request Feb 11, 2025 that will close this issue
@sophieoneill sophieoneill reopened this Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants