Hostname: page-component-586b7cd67f-dlnhk Total loading time: 0 Render date: 2024-11-28T01:06:16.941Z Has data issue: false hasContentIssue false

Molly reborn in C++ and R

Published online by Cambridge University Press:  26 February 2020

S. J. R. Woodward*
Affiliation:
DairyNZ Ltd, Private Bag 3221, Hamilton3240, New Zealand
P. C. Beukes*
Affiliation:
DairyNZ Ltd, Private Bag 3221, Hamilton3240, New Zealand
M. D. Hanigan
Affiliation:
Department of Dairy Science, Virginia Tech, Blacksburg, VA24060, USA
Get access

Abstract

The dairy cow model ‘Molly’ is a mixed discrete event-continuous system model that simulates feeding, metabolism and lactation of dairy cows. Decades of model development have resulted in a valuable tool in dairy science. Due to the deprecation of the ACSL (Advanced Continuous Simulation Language) programming language, Molly has been translated into C++. This paper describes the translation process and discusses the advantages of the new implementation, one of which is the ability to run Molly within RStudio, a popular integrated development environment (IDE) for data science.

Type
Research Article
Copyright
© The Animal Consortium 2020

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

References

AEgis Simulation 1999. Advanced Continuous Simulation Language (ACSL) reference manual. AEgis Simulation Inc., Huntsville, AL, USA.Google Scholar
Baldwin, RL 1995. Modeling ruminant digestion and metabolism. Chapman & Hall, London, UK.Google Scholar
Baldwin, RL, France, J, Beever, DE, Gill, M and Thornley, JH 1987a. Metabolism of the lactating cow. III. Properties of mechanistic models suitable for evaluation of energetic relationships and factors involved in the partition of nutrients. Journal of Dairy Research 54, 133145.CrossRefGoogle ScholarPubMed
Baldwin, RL, France, J and Gill, M 1987b. Metabolism of the lactating cow. I. Animal elements of a mechanistic model. Journal of Dairy Research 54, 77105.CrossRefGoogle ScholarPubMed
Baldwin, RL, Thornley, JH and Beever, DE 1987c. Metabolism of the lactating cow. II. Digestive elements of a mechanistic model. Journal of Dairy Research 54, 107131.CrossRefGoogle ScholarPubMed
Beukes, PC, Thorrold, BS, Wastney, ME, Palliser, CC, Macdonald, KA, Bright, KP, Lancaster, JAS, Palmer, CAJ and Auldist, MJ 2005. Modelling the bi-peak lactation curves of summer calvers in New Zealand dairy farm systems. Australian Journal of Experimental Agriculture 45, 643650.CrossRefGoogle Scholar
Beukes, PC, Palliser, CC, Macdonald, KA, Lancaster, JAS, Levy, G, Thorrold, BS and Wastney, ME 2008. Evaluation of a whole-farm model for pasture-based dairy systems. Journal of Dairy Science 91, 23532360.CrossRefGoogle ScholarPubMed
Duffy, DJ 2018. Introduction to the boost C++ libraries: Volume III – algorithms, concurrency, generic programming and higher-order functions, numerics. Datasim Education BV, Koedijk, The Netherlands.Google Scholar
Eddelbuettel, D and Balamuta, JJ 2017. Extending R with C++: A brief introduction to Rcpp. PeerJ Preprints 5, e3188v1. Retrieved on 6 June 2019 from https://doi.org/10.7287/peerj.preprints.3188v1.CrossRefGoogle Scholar
Ghimire, S, Gregorini, P and Hanigan, MD 2014. Evaluation of predictions of volatile fatty acid production rates by the Molly cow model. Journal of Dairy Science 97, 354362.CrossRefGoogle ScholarPubMed
Ghimire, S, Kohn, RA, Gregorini, P, White, RR and Hanigan, MD 2017. Representing interconversions among volatile fatty acids in the Molly cow model. Journal of Dairy Science 100, 36583671. https://doi.org/10.3168/jds.2016-11858CrossRefGoogle ScholarPubMed
Gregorini, P, Beukes, PC, Hanigan, MD, Waghorn, G, Muetzel, S and McNamara, JP 2013. Comparison of updates to the Molly cow model to predict methane production from dairy cows fed pasture. Journal of Dairy Science 96, 50465052.CrossRefGoogle ScholarPubMed
Gregorini, P, Beukes, P, Waghorn, G, Pacheco, D and Hanigan, M 2015. Development of an improved representation of rumen digesta outflow in a mechanistic and dynamic model of a dairy cow, Molly. Ecological Modelling 313, 293306.CrossRefGoogle Scholar
Gregorini, P, Beukes, P, Dalley, D and Romera, AJ 2016. Screening for diets that reduce urinary nitrogen excretion and methane emissions while maintaining or increasing production by dairy cows. Science of the Total Environment 551-552, 3241.CrossRefGoogle ScholarPubMed
Gregorini, P, Provenza, FD, Villalba, JJ, Beukes, P and Forbes, MJ 2017. Diurnal patterns of urination and drinking by grazing ruminants: A development in a mechanistic model of a grazing ruminant, MINDY. The Journal of Agricultural Science (Cambridge) 156, 7181. https://doi.org/10.1017/S0021859617000806CrossRefGoogle Scholar
Gregorini, P, Provenza, FD, Villalba, JJ, Beukes, P and Forbes, MJ 2018. Dynamics of forage ingestion, oral processing and digesta outflow from the rumen: A development in a mechanistic model of a grazing ruminant, MINDY. The Journal of Agricultural Science (Cambridge) 156, 980995. https://doi.org/10.1017/S0021859618000886CrossRefGoogle Scholar
Hanigan, MD, Palliser, CC and Rius, AG 2008. Modelling lactation potential in an animal model. In: Mathematical modelling in animal nutrition (ed. France, J and Kebreab, E), pp. 485507. CAB International, Wallingford, UK.CrossRefGoogle Scholar
Hanigan, MD, Palliser, CC and Gregorini, P 2009. Altering the representation of hormones and adding consideration of gestational metabolism in a metabolic cow model reduced prediction errors. Journal of Dairy Science 92, 50435056.CrossRefGoogle Scholar
Hanigan, MD, Appuhamy, JADRN and Gregorini, P 2013. Revised digestive parameter estimates for the Molly cow model. Journal of Dairy Science 96, 38673885. http://dx.doi.org/10.3168/jds.2012-6183CrossRefGoogle ScholarPubMed
McNamara, JP and Baldwin, RL 2000. Estimation of parameters describing lipid metabolism in lactation: challenge of existing knowledge described in a model of metabolism. Journal of Dairy Science 83, 128143.CrossRefGoogle Scholar
Morin, A, Urban, J and Sliz, P 2012. A quick guide to software licensing for the scientist-programmer. PLOS Computational Biology 8, e1002598. https://doi.org/10.1371/journal.pcbi.1002598CrossRefGoogle ScholarPubMed
Palliser, CC, Bright, KP, Macdonald, KA, Penno, JW and Wastney, ME 2001. Adapting the MOLLY cow model to fit production data from New Zealand animals. Proceedings of the New Zealand Society of Animal Production 61, 234236.Google Scholar
Press, WH, Flannery, BP, Teukolsky, SA and Vetterling, WT 1989. Numerical Recipes in Pascal: The Art of Scientific Computing. Cambridge University Press, Cambridge, UK.Google Scholar
R Core Team 2019. R: a language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria. Retrieved on 30 April 2019 http://www.R-project.org.Google Scholar
Rius, AG, Levy, G, Turner, S-A, Phyn, CVC, Hanigan, MD and Beukes, PC 2019. A redefinition of the modeled responses of mammary glands to once-daily milking. Journal of Dairy Science 102, 65956602. https://doi.org/10.3168/jds.2019-16303CrossRefGoogle ScholarPubMed
RStudio Team 2018. RStudio: Integrated Development for R. RStudio Inc., Boston, MA, USA. http://www.rstudio.com/Google Scholar
Semantica 2018. Recommended IDE for data scientists and machine learning engineers: An overview of the development environments for data scientists and machine learning engineers programming in R, Python, Scala, and Julia. Retrieved on 6 June 2019 https://semanti.ca/blog/?recommended-ide-for-data-scientists-and-machine-learning-engineersGoogle Scholar
Stroustrup, B 2013. A Tour of C++. Addison-Wesley Professional, Boston, MA, USA.Google Scholar