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.
Behaviors to expect (and thus test for) from
ap_prediction
:No production or consumption
If inputs
P
=k
= 0.0 , then outputsmt
andnt
should be constant and equal tom0
andn0
respectively.Currently
NaN
values are returned due to theP/k
division:No methane and no production
A variant of the previous one. If inputs
P
=m0
=n0
= 0.0 , then outputsmt
andnt
should be constant zero. This works:No discrimination
If inputs
frac_P
=frac_k
= 1.0 , then outputAP_pred
should be constant.Right now this doesn't happen:
@kendalynnm Does this make sense to you? Other tests/thoughts?