Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Interface "Audit
satiety
"Purpose of change
We use
satiety
to represent the energy density of food and beverage, but there are some mistakes in the infrastructure.For berverage, the dry volume is 0, and
compute_calories_per_effective_volume
does not treat it correctly, resulting in overflow and always returning max satiety, even when the berverage, like lotus tea, barely has any calories.See the chart below for more details:
Describe the solution
Fix
masticated_volume
can return minus solid mass.Return both water and dry volume in
masticated_volume
.Fix overflow for berverage, add a factor for water and consider both water and dry volume in
compute_calories_per_effective_volume
, changedmax_cal_per_effective_vol
to 2000.Update test cases.
Before:
After:
For
GOURMAND
mutant with a bigger stomach:Describe alternatives you've considered
Testing
Passed "effective_food_volume_and_satiety" and "food_satiety_bar", worked good locally.
Additional context
quench
value of food and beverage needs an audit #78182