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

ap_prediction behavior #6

Open
bpbond opened this issue Dec 28, 2022 · 0 comments
Open

ap_prediction behavior #6

bpbond opened this issue Dec 28, 2022 · 0 comments
Assignees

Comments

@bpbond
Copy link
Member

bpbond commented Dec 28, 2022

Behaviors to expect (and thus test for) from ap_prediction:

No production or consumption

If inputs P = k = 0.0 , then outputs mt and nt should be constant and equal to m0 and n0 respectively.

Currently NaN values are returned due to the P/k division:

> ap_prediction(time = 0:5, m0 = 10, n0 = 1, P = 0.0, k = 0.0)
   mt  nt AP_pred
1 NaN NaN     NaN
2 NaN NaN     NaN
3 NaN NaN     NaN
4 NaN NaN     NaN
5 NaN NaN     NaN
6 NaN NaN     NaN

No methane and no production

A variant of the previous one. If inputs P = m0 = n0 = 0.0 , then outputs mt and nt should be constant zero. This works:

> ap_prediction(time = 0:5, m0 = 0, n0 = 0, P = 0.0, k = 0.1)
  mt nt AP_pred
1  0  0     NaN
2  0  0     NaN
3  0  0     NaN
4  0  0     NaN
5  0  0     NaN
6  0  0     NaN

No discrimination

If inputs frac_P = frac_k = 1.0 , then output AP_pred should be constant.

Right now this doesn't happen:

> ap_prediction(time = 0:5, m0 = 10, n0 = 1, P = 0.5, k = 0.3, frac_P = 1, frac_k = 1)
         mt       nt  AP_pred
1 10.000000 1.000000 10.00000
2  7.840152 1.172788 14.95874
3  6.240097 1.300792 20.84571
4  5.054747 1.395620 27.61009
5  4.176618 1.465871 35.09707
6  3.526085 1.517913 43.04812

@kendalynnm Does this make sense to you? Other tests/thoughts?

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

No branches or pull requests

2 participants