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

Kitchen Tap discharge #46

Merged
merged 5 commits into from
Feb 14, 2025
Merged

Kitchen Tap discharge #46

merged 5 commits into from
Feb 14, 2025

Conversation

sophieoneill
Copy link
Collaborator

Added the discharge patterns for KitchenTap. It uses the discharge object added in PR #39 . Works exactly the same as the BathroomTap, using a simple discharge flow of consistent discharge flow rate.

Consumption
image

Discharge
image

@val-ismaili
Copy link
Collaborator

As discussed, this has highlighted the presence of a bug with implementation of discharge object. Issue described here #49

@val-ismaili val-ismaili linked an issue Feb 11, 2025 that may be closed by this pull request
@sophieoneill
Copy link
Collaborator Author

Added fix for simultaneous discharge events bug #49 . when calculating discharge the code checks if the starting discharge flow rate is not zero, if so it will update the start time to the next available zero flow time.

@sophieoneill
Copy link
Collaborator Author

Updated code that fixes the simultaneous discharge event bug, as well as:

  • added checks for when the KitchenTap subtype is consumption, the discharge is set to zero, as we assume the water is used for drinking
  • added a check for discharge flow equal to 0, and resampling until value is not zero, as there should always be a flow rate (unless consumption/drinking)

Images show high consumption, and a lower flow, as a majority of the events are consumption
Consumption:
image

Discharge:
image

@val-ismaili
Copy link
Collaborator

@sophieoneill what do you think about adding a flag to the consumption or discharge object. Basically some way that allows the user to know which event in the KitchenTap consumption object is consumption (drinking) vs anything else. so that when comparing the consumption and discharge flow profiles we know that they are correctly linked? I'm not sure the best way of adding this flag though, any ideas?

@sophieoneill
Copy link
Collaborator Author

@val-ismaili I think that's a good suggestion, to add a flag to the consumption or discharge object letting the user know if the event is consumption/drinking, but maybe more of a nice to have at this stage. I have logged it as an issue #55, for a future enhancement.

@sophieoneill sophieoneill merged commit f785313 into master Feb 14, 2025
1 check passed
@sophieoneill sophieoneill deleted the kitchentap_discharge branch February 14, 2025 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Simultaneous discharge events are possible -> disappearing water
2 participants