Skip to content

Fixed dry matter intake for lac cows#2946

Draft
JoeWaddell wants to merge 4 commits intomainfrom
dmi_input
Draft

Fixed dry matter intake for lac cows#2946
JoeWaddell wants to merge 4 commits intomainfrom
dmi_input

Conversation

@JoeWaddell
Copy link
Copy Markdown
Collaborator

@JoeWaddell JoeWaddell commented Apr 9, 2026

Context

Issue(s) closed by this pull request: closes #

What

Adds new input to override the NASEM (not added for NRC logic) calculation of dry matter intake for lactating cows. Now will use the user provided value in the Feed input file. If user inputs 0, the NASEM equation will be used as normal.

Why

Useful to compare ration and eCH4 production across systems, fixing the DMI to a specific value.

How

Test plan

No tests updated yet.

Input Changes

added lac_cow_dry_matter_intake as an input in Feed file.

Output Changes

  • N/A

Filter

@JoeWaddell JoeWaddell changed the title Dmi input Fixed dry matter intake for lac cows Apr 9, 2026
@JoeWaddell JoeWaddell added enhancement New feature or request Animal Involves the Animal Module labels Apr 9, 2026
@JoeWaddell JoeWaddell self-assigned this Apr 9, 2026
+ 0.022 * body_weight
+ (-0.689 - 1.87 * parity_adjustment_factor) * body_condition_score_5
) * (1 - (0.212 + parity_adjustment_factor * 0.136) * exp(-0.053 * days_in_milk))
if RationManager.lac_cow_dry_matter_intake == 0:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @JoeWaddell ! Do you think null might be a better design choice here?

null means "no value provided, use the model." 0 means zero — which is physically impossible.

It also eliminates the float comparison issue. == 0 on a float is fragile. if RationManager.lac_cow_dry_matter_intake is None is exact and unambiguous.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Animal Involves the Animal Module enhancement New feature or request

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants