13
DOI: 10.4018/IJAEIS.2018070105 International Journal of Agricultural and Environmental Information Systems Volume 9 • Issue 3 • July-September 2018 Copyright©2018,IGIGlobal.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIGIGlobalisprohibited. 74 Implementation of CTR Dairy Model Using the Visual Basic for Application Language of Microsoft Excel A. Ahmadi, University of California Davis, Davis, USA P. H. Robinson, University of California Davis, Davis, USA F. Elizondo, Universidad de la República, Montevideo, Uruguay P. Chilibroste, Universidad de la República, Montevideo, Uruguay ABSTRACT ThegoalofthearticleistoimplementtheCTRDairymodelusingtheVisualBasicforApplication (VBA)languageofMicrosoftExcel.CTRDairyisadynamicsimulationmodelforgrazinglactating dairycowsthatpredictsmilkproductionandprofitoverfeedingbasedonruminaldigestionand absorptionofnutrientsunderdiscontinuousfeedingschedules.TheCTRDairymodelwasoriginally developedasaresearchtoolusingaproprietarycomputersimulationsoftwarecalledSMARTthat requiredtheSMARTclienttoruntheprogram.AsSMARTsoftwareisnowdiscontinued,andits clientisnolongeravailable,rewritingthemodelintheVBAlanguageusingMicrosoftExcelfor inputsandoutputsmakestheprogramavailabletoabroadrangeofusersincludingdairyfarmers, extensionadvisors,dairynutritionconsultantsandresearchers.Dairyfarmerscanusethenewversion oftheCTRDairyprogramtomanipulatetheherbageallowanceandtheaccesstimetothegrazing paddock,aswellasthetimingofsupplementalfeeding,toimprovetheutilizationofthepastureand toincreasetheproductionofthemilk. KEywoRDS Dairy Cattle, Discontinuous Feeding Systems, Feeding Schedule Evaluation, Grazing System, Modeling, Ration Evaluation INTRoDUCTIoN CTR Dairy is a dynamic simulation model for grazing lactating dairy cows that predicts milk production and profit over feeding based on ruminal digestion and absorption of nutrients under discontinuousfeedingschedules.ThefollowingbiologicalbackgroundisbasedonChilibroste(2008). Whilemostrumensimulationmodelsassumerelatively‘steadystate’conditions,thepracticalneedfor modelsthatcanrepresentdiscontinuousfeedingregimes,causedbynotfeedingcattletotallymixed rations(TMR)thatcauserumenpoolsizestovarywithtimeoftheday,washighlighted(Dijkstra etal.,2005).Comparedwithcontinuousfeedinput,discontinuousfeedingmayresultindistinctly differentprofilesofnon-glucogenictoglucogenicvolatilefattyacids(VFA)andrumenpHvalues

Implementation of CTR Dairy Model Using the Visual Basic

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Implementation of CTR Dairy Model Using the Visual Basic

DOI: 10.4018/IJAEIS.2018070105

International Journal of Agricultural and Environmental Information SystemsVolume 9 • Issue 3 • July-September 2018

Copyright©2018,IGIGlobal.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIGIGlobalisprohibited.

74

Implementation of CTR Dairy Model Using the Visual Basic for Application Language of Microsoft ExcelA. Ahmadi, University of California Davis, Davis, USA

P. H. Robinson, University of California Davis, Davis, USA

F. Elizondo, Universidad de la República, Montevideo, Uruguay

P. Chilibroste, Universidad de la República, Montevideo, Uruguay

ABSTRACT

ThegoalofthearticleistoimplementtheCTRDairymodelusingtheVisualBasicforApplication(VBA)languageofMicrosoftExcel.CTRDairyisadynamicsimulationmodelforgrazinglactatingdairycowsthatpredictsmilkproductionandprofitoverfeedingbasedonruminaldigestionandabsorptionofnutrientsunderdiscontinuousfeedingschedules.TheCTRDairymodelwasoriginallydevelopedasaresearchtoolusingaproprietarycomputersimulationsoftwarecalledSMARTthatrequiredtheSMARTclienttoruntheprogram.AsSMARTsoftwareisnowdiscontinued,anditsclientisnolongeravailable,rewritingthemodelintheVBAlanguageusingMicrosoftExcelforinputsandoutputsmakestheprogramavailabletoabroadrangeofusersincludingdairyfarmers,extensionadvisors,dairynutritionconsultantsandresearchers.DairyfarmerscanusethenewversionoftheCTRDairyprogramtomanipulatetheherbageallowanceandtheaccesstimetothegrazingpaddock,aswellasthetimingofsupplementalfeeding,toimprovetheutilizationofthepastureandtoincreasetheproductionofthemilk.

KEywoRDSDairy Cattle, Discontinuous Feeding Systems, Feeding Schedule Evaluation, Grazing System, Modeling, Ration Evaluation

INTRoDUCTIoN

CTR Dairy is a dynamic simulation model for grazing lactating dairy cows that predicts milkproductionandprofitover feedingbasedonruminaldigestionandabsorptionofnutrientsunderdiscontinuousfeedingschedules.ThefollowingbiologicalbackgroundisbasedonChilibroste(2008).Whilemostrumensimulationmodelsassumerelatively‘steadystate’conditions,thepracticalneedformodelsthatcanrepresentdiscontinuousfeedingregimes,causedbynotfeedingcattletotallymixedrations(TMR)thatcauserumenpoolsizestovarywithtimeoftheday,washighlighted(Dijkstraetal.,2005).Comparedwithcontinuousfeedinput,discontinuousfeedingmayresultindistinctlydifferentprofilesofnon-glucogenictoglucogenicvolatilefattyacids(VFA)andrumenpHvalues

Page 2: Implementation of CTR Dairy Model Using the Visual Basic

International Journal of Agricultural and Environmental Information SystemsVolume 9 • Issue 3 • July-September 2018

75

thatcouldtemporarilynegativelyaffectfiberdegradation.Moreover,deviationsfromwidelyusedMonod-equations,thatrepresentmicrobialsubstrateutilizationandgrowthinmostmetabolicmodels,maybetransientconditionsoftherumenecosystem(Dijkstraetal.,2002).

Inmoderndairymanagementsystems,ithasbecomecommontooffercowsfeedonanadlibitumbasis.Confinedcowsareoftenkeptinloosehousingsystemsand,topreventfeedselection,areofferedaTMR.Thus,feedintakebecomesrelativelyindependentofindividuallyexpressedintakebehaviorasthemanagementobjectiveistomakeintakebehaviorafunctionofthediet,ratherthanoftheanimal.Thiscontraststoforagingcattle,whereanimalselectionisintegraltobehaviour.Providingnutritionallybalanceddietsforforagingcattleisgenerallyachievedbysupplementingpasturewithfeedsupplementsatvarioustimesoftheday.Cattleforagingbehavior,andtheirstrategiestoobtaina balanced nutrient profile in pastoral ecosystems, are determined by their short and long-termphysiologicalstate,pastureavailability,aswellasthefeedinglevelandtypeofsupplements(Chilibrosteetal.,2005).Feedintakebehaviorofcattleischaracterizedbyalteration,duringtheday,ofeating,rumination,restandsocialactivities(Gibbetal.,1997).Factorsthatcontroleatingandgrazingtimearelesswellunderstoodthanfactorsthatcontrolintakerate,suchasbitemass,timeperbiteandtheratiobetweenprehensionandmanipulationofjawmovements(Chilibroste,1999;Lacaetal.,1994).Whereasshort-termchangesinmetabolizableenergysupplyandgutfillareprobablyinvolvedincontrollingmealsizeandfrequency,itislongtermsignals,suchaschangesinbodyenergystoresthatinfluencedrymatter(DM)intake.TheroleoflearningonDMintakecontrolwashighlightedbyProvenza(1995),althoughtotalDMintakeanddietselectionatgrazingaremediatedbydifferentforagingstrategiesthatresultfromintegrationbycattleofshortandlong-terminformation(Forbes,1995),suggestingaverycomplexprocess.

Torepresentandpredicttheuniqueprocessesofingestionanddigestionunderdiscontinuousfeedingsituations,suchasgrazing,itisessentialthatarumenmodelsimulatetheresultingdiurnalfermentationprocesses.Recently,resultsofaseriesofgrazingexperimentsthatvariedtheallowedgrazingtime,aswellasthecombinationsofrumenfillandfastinglengthbeforegrazing,wereusedtoevaluateamechanistic,dynamicmodel(Chilibrosteetal.,2001)thataimedtopredictdigestionandabsorptionofnutrients,andwasbasedonapreviouslydevelopedmodel(Dijkstraetal.,1996),inwhichcattlewerefedsugarcanebaseddiets.Theincreaseinpredictionerrorwithincreasedlengthbetweentwoconsecutivemeals(Chilibrosteetal.,2001),highlightedtheneedfordiurnaldefinitionofmodelparameters,suchasfractionalpassageanddegradationrates,andthedynamicsandkineticsofsolublefeedfractionsintherumen.

TheCTRDairymodelwasoriginallydevelopedasaresearchtoolusingaproprietarycomputersimulationsoftwarecalledSMARTthatrequiredtheSMARTclienttoruntheprogram.AsSMARTsoftwareisnowdiscontinued,anditsclientisnolongeravailable,rewritingthemodelintheVisualBasic for Application (VBA) language using Microsoft Excel for inputs and outputs makes theprogramavailabletoabroadrangeofusersincludingdairyfarmers,extensionadvisors,dairynutritionconsultantsandresearchers.

Asitsnamesuggests,theVBAlanguageiscloselyrelatedtoVisualBasicandusestheVisualBasicRuntimeLibrary.However,VBAcodecanonlyrunwithinahostapplicationsuchasExcel,ratherthanasastand-aloneprogram.CodewritteninVBAiscompiledtoMicrosoftP-Code(packedcode),whichthehostapplication(Excel)storesasaseparatestreaminitsfiles(e.g.,.xlsx,.xlsm).Theintermediatecodeisthenexecutedbyavirtualmachine(hostedbythehostapplication).CTRDairysavesdataintextfilesencodedusingtheExtensibleMarkupLanguage(XML).Thesedatafilesarebothhuman-readableandmachine-readableandalsotheCTRDairyprogramtointeractwithotherprogramswritteninotherprograminglanguages.

AsCTRDairydoesnotformulatearation,theusermustfirstusearationformulationprogramsuchasPCDairy(Ahmadietal,2013)toformulatealeastcostration,andthenusetheuniquefeatureofCTRDairytofindthebestfeedingscheduletooptimizemilkproductionandtomaximizeprofitoverfeeding.

Page 3: Implementation of CTR Dairy Model Using the Visual Basic

International Journal of Agricultural and Environmental Information SystemsVolume 9 • Issue 3 • July-September 2018

76

OurgoalistoimplementtheCTRDairymodelusingtheVBAlanguageofMicrosoftExcelasadecision-makingtool.CTRDairyasimulationmodelthataimstofunctionundernon-steadystateconditionsinordertoallowpredictionofnutrientavailabilityindairycowsmanagedunderdiscontinuousfeedingsystems.Theultimateaimofthismodelistoprovidescientistsandadvisersasoundtooltoevaluateactualfeedingstrategies,aswellasfacilitateresearchonnewones.

CTR DAIRy MoDEL DESCRIPTIoN

ThefollowingmodeldescriptionisbasedonChilibroste(2008).Theoriginalmodelisanadvancedversionofthemechanisticanddynamicnon-steadystaterumenmodelofChilibrosteetal.(2001).Newelementsinthemodelincludeinclusionofchewingactivities,adiscretelagtimetorepresentthedelaybeforerumenfermentationorpassagecanoccur,aswellasdiurnalvariationinrumenDMcontent(DMC),rumenpHandinfractionaldegradationratesofneutraldetergentfibre(NDF)andrumenVFAabsorption.Thecurrentmodelwasbuilttooperatewithuptothreediscretefeeds,wherepastureisdefinedasafeed,whichcanbeofferedinindependentpatternstogroupsofcows.Theexpandedversionofthemodelhas42statevariables,30ofwhichdealwithinsolublefeedfractions,8withsolublefeedfractionsand4aretherumenpoolsofammonia,VFA,longchainfattyacidsandmicrobialmass.

Althoughtheunderlyingmotivationtobuildthemodelcamefromdairysystemsinwhichcowsare grazed, and supplementedwith forages(s) and/or concentrates (e.g.,Chilibroste et al., 2003;Mattiaudaetal.,2003),itcanalsofunctionunderawiderangeofotherfeedingconditionsinwhichcattlehaveunlimitedaccesstofeed.Forexample,feedingstrategiesthatusegrazedforage,silageorhay,supplementsandconcentratesfedatdifferenttimesoftheday,aswellasTMR,canbeevaluated.InthecaseofTMRfeeding,themodelprovidesuptothreefeedcomponentsoftheTMRasthedifferentfeeds.Modeloutputsarethepredictedrumenmetaboliteconcentrations(includingpH),rumenpoolsizesofseveraldefinedfractions(includingwater),andabsorptionofclassesofnutrients(i.e.,glycogenic,aminogenic,lipogenic)attherumenandintestinallevel.

Software DescriptionTheCTRDairyprogramiswritteninVBAlanguagethatusesMicrosoftExcel’sworksheetsforinputandoutput.Figure1showsthemainmenuoftheprogram,whichallowstheusertoenterinputinformation,runthesimulation,andviewtheoutputs.TodescribetheprogramweuseanexampleofHolsteindairycowsgrazingonalegumepasturetwiceadayandbeingfedamixeddietandasupplementtwiceaday.

Input ModuleTheuserstartsbyenteringanimalinformationsuchasbodyweight,milkfat,proteinandlactoseproportions,milkprice,numberofcowsinmilkanddailybodychange.Theusercanthenspecifythesamefeedsusedintherationformulation,becausebothCTRDairyandPCDairyshareacommonfeedlibrarywhichcontains102feedswiththesamenameandnumber.Finally,theuserspecifiesamountsoffeedsprovidedatanyhourofthedayupto24timesdaily.

Animal InformationTheuserusesthe‘AnimalInformation’tab(Figure2)toenteranimalbodyweight,milkfat,proteinandmilkproportions,milkprice,numberofcowsinmilk,bodyweightchangeandrumenliquidpassagerate.Inourexample,thebodyweightis645kgandthemilkfat,protein,andlactoseare3.9,3.4and5.0%,respectively.Themilkpriceis0.30USdollarsperliterandthereare1000cowsinmilkthatdonotgainorloseanybodyweight.Therumenliquidpassagerateisusuallyabout0.121/h.

Page 4: Implementation of CTR Dairy Model Using the Visual Basic

International Journal of Agricultural and Environmental Information SystemsVolume 9 • Issue 3 • July-September 2018

77

Figure 1. Main Menu Screen

Figure 2. Animal Information Screen

Page 5: Implementation of CTR Dairy Model Using the Visual Basic

International Journal of Agricultural and Environmental Information SystemsVolume 9 • Issue 3 • July-September 2018

78

Feed ListsFeedsinCTRaredividedintothreefeedlists:Feedlist1containspasturefeeds,Feedlist2containsmixedfeeds,andFeedlist3containssupplementfeeds.However,anycombinationoffeedstuffscanbeusedtocreateanyfeedlist.Theusercanalsochangethenamesofthefeedlists.

Foreachfeedlisttheuseraddstheirneededfeeds(upto20totalfeeds)fromtheStandardorAlternatefeedlibraries.Theusercanmodifyanynutritivevaluesintheirselectedfeeds,buttheusermustenterthepriceforeachfeedanditsamountinthisfeedlist,withallfeedsaddingto100%(inE27).Calculatedaveragevaluesforthefeedlistsarelistedinthegreycellsbelowthelistoffeedsinthefeedlist(Figure3).

Feeding ScheduleTheuserspecifiestheamountandtimeoffeedingforthreefeedlistsinthedailyfeedingscheduletab(Figure4).Feedsprovidedatanyhourofthedayisassumedtobeeatenover60minutes.Useofallthreefeedlistsisnotrequired,butthosethatareselectedcanbefedupto24timesperday.Feedlistnamescomefromthe‘Feedlist’tabsandtheusercanchangenamesinthosetabsifdesired.Inourexample,thefirstgrazingsessiononthelegumepasturestartsat8:00amandendsatnoon.Thesecondgrazingsessionstartsat5:00pmandendsat7:00pm.Thetotalpastureintakeis8.05kgperdayperhead.Thefirstsupplementationintheamountof4.72kgisgivenat6:00amandthesamesupplementationforthesameamountisgivenforthesecondtimeat8:00pmforatotalof9.44kgperdayperhead.Thefirstcornsilagedietintheamountof3.86kgisgivenat3:00pmandthesamedietintheamountof2.57kgisgivenforthesecondtimeat9:00pmforatotalof6.44kgperdayperhead.Thedailyintakeis23.92kgperhead.

Figure 3. Feed List Screen

Page 6: Implementation of CTR Dairy Model Using the Visual Basic

International Journal of Agricultural and Environmental Information SystemsVolume 9 • Issue 3 • July-September 2018

79

Theusercanchangethefeedingscheduleandre-runthesimulationmodeltodetermineeffectsofchangesinthefeedingscheduleonmilkproduction,profitprojectionandotherkeyoutputs.Thisisakey,andunique,featureoftheCTRDairyprogram.

Execution ModuleTheruminaldigestionandabsorptionofnutrientsunderdiscontinuousfeedingschedulesarecalculatedbasedontheoriginal2008versionofCTRDairy(Chilibrosteetal.,2008),butwiththeadditionoftheabilitytopredictmilkproductionandprofitoverfeeding.Theprogramrunsasimulationfor7daysand,ineachday,itsimulatesrumendynamicsminutebyminuteatotalof1,440times,or10,080timesinthe7days.

output ModuleTheoutputtab(Figure5)showsmilkproduction,profitprojectionandotherkeyparameters.Foroursampleherd,theprogrampredicts29.83litersofmilkperdaypercow.Althoughthemilkproductioncanbeashighas37.03litersbasedontheamountofavailableenergy,butthelimitingfactorinmilkproductionistheamountofavailableprotein.Themilkrevenueis8.95USDperdayperhead,thefeedcostis$7.02USDperdayperheadandtheprofitoverfeedingis$1.93perdayperhead.

Theprogramalsoplotsthekeyrumenparameterssuchasvolume,pH,solublecrudeproteinpool,solublecarbohydratepool,liquidpool,microbialpool,volatilefattyacid,andammoniaoverhoursofday(Figures6and7).

Data FilesCTRDairyusestheExtensibleMarkupLanguage(XML)toencodeandsavedatafiles.Figure8showsasectionoftheXMLfilethatstorestheanimalinformationdata.Thename,valueandunit

Figure 4. Feeding Schedule Screen

Page 7: Implementation of CTR Dairy Model Using the Visual Basic

International Journal of Agricultural and Environmental Information SystemsVolume 9 • Issue 3 • July-September 2018

80

Figure 5. Output Screen of CTR Dairy Program in a Tabular Format

Figure 6. Diurnal plots of Key Rumen Parameters (Rumen Volume, Soluble CP Pool, Soluble Carbohydrate Pool, and Liquid Pool) over the Day

Page 8: Implementation of CTR Dairy Model Using the Visual Basic

International Journal of Agricultural and Environmental Information SystemsVolume 9 • Issue 3 • July-September 2018

81

Figure 7. Diurnal plots of Key Rumen Parameters (pH, VFA, Ammonia, and Microbial pool) over the Day

Figure 8. CTR Dairy data file encoded using XLM format

Page 9: Implementation of CTR Dairy Model Using the Visual Basic

International Journal of Agricultural and Environmental Information SystemsVolume 9 • Issue 3 • July-September 2018

82

ofeachparameterarestoredinapairofpointedbracket.Forexample,line4showsthevalueof645kgforthebodyweight.Thisencodingisbothhumanandmachine-readabletherebyallowingCTRDairytointeractwithotherprogramswritteninotherprograminglanguages.

BIoLoGICAL INTERPRETATIoN oF oUTPUTS

The rumen is essentially a fermentationchamberwhereplant fiber isbrokendown into smallerdigestiblecomponentsbybacteriaandothermicrobes.Torepresentandpredicttheuniqueprocessesofingestionanddigestionunderdiscontinuousfeedingsituations,suchasgrazing,itisessentialthatarumenmodelsimulatetheresultingdiurnalfermentationprocesses.Figures6and7showtheplotsofthekeyrumenparameterssuchasvolume,pH,solublecrudeproteinpool,solublecarbohydratepool,liquidpool,microbialpool,volatilefattyacid,andammoniaareplottedoverhoursofday.

ThefirstplotinFigure6showsthediurnalplotofrumenvolumeovertheday.Thecapacityofanadultdairycow’srumenisabout184liters.Inourexampleherd,therumenvolumerangesfrom78to100liters.Theplotshowsaraiseat6:00amwhenthefirstsupplementaldietisgivenandanothersmallerraiseat8:00amwhenthefirstgrazingsessionisstarted.Thethirdraiseintheplotappearsat3:00pmwhenthecornsilagedietisgiven.Thefourth,fifth,andsixthraisesappearat5:00pm,8:00pm,and9:00pmcorrespondingtothetimingoftheafternoongrazingsession,theafternoonsupplementaldiet,andtheeveningcornsilagediet,respectively.

ThesecondplotinFigure6showsthediurnalplotofsolublecrudeproteinpoolovertheday.Inourexampleherd,thesolubleCPpoolrangesfrom1to90grams.At6:00am,justbeforethefirstsupplementaldietisgiven,thecurveisatitslowestlevelduetonightfasting.Thecurveraisesrapidlyoncethesupplementaldietisgiven.Itraisesagainat8:00amwhenthemorninggrazingsessionstarts.Itraisesforthethirdtimeat3:00pmwhenthecornsilagedietisgiven,andforthefourthtimeat5:00pmwhentheafternoongrazingsessionisstarted,andforthefifthtimeat8:00pmwhentheafternoonsupplementaldietisgiven.ThesolubleCPpoolkeepsraisingwhentheeveningcornsilagedietisgivenat9:00pm.Itreachesitspeakat11pmandthenstartsdroppinguntilitreachesitslowestlevelat6:00am,justbeforethefirstsupplementaldietisgiven.

ThethirdplotinFigure6showsthediurnalplotofsolublecarbohydratepoolovertheday.Inourexampleherd,itrangesfrom1to90grams.Carbohydrateisthemajorcomponentofruminantdietsanditdifferswidelyintherateandextentoffermentabilityintherumen.Inforage-baseddietsthecellwallpolysaccharides(structuralcarbohydrates)aretheprimarysourceofenergywhereasincerealbaseddietsthestoragepolysaccharides(starchandfructosans)providemostoftheenergyrequirements.Microbesconvertboththecellwallandstoragepolysaccharidestofiveandsixcarbonsugars.Thesesugarsare rapidly fermented intoSCFAandcanprovideup to70%of theenergyrequirementsofthecow(Fellner,205).

ThefourthplotinFigure6showsthediurnalplotofliquidpoolovertheday.Inourexampleherd,itrangesfrom200to400gramsandfollowsthesamepatternoffluctuationsasofthesolubleCPpool.

ThefirstplotinFigure7showsthediurnalplotofrumenpHovertheday.Inourexampleherd,thepHrangesfrom6.0to6.8.AhighpH(>7)isseenonpoorqualityforagedietssupplementedwithurea.Inhigh-producingdairycows,acidosis(rumenpH<6.0)isacommonproblem.Thisoccurswhenthecoweatstoomuchrapidlydigestiblestarchorsugarthatcreatesacidandoverwhelmstherumen’sbufferingsystem.Mostofthebufferintherumencomesintheformofsalivathatisgeneratedwhenthecowchewshercud.Inadequateintakeoflongfiberthatpromotesrumination(cud-chewing)canalsoresultinacidosisbecauseitprovideslesssalivarybuffertocounteracttheacidproducedbygrainfermentation.Therumenmicrobes,especially thosethatprimarilydigestfiber,areacidintolerant.Theydonotgrowwellinacidandtheydon’tdigestfeed,especiallyforages,wellunderacidconditions(deOndarza,2000).Inourexampleherd,therumenpHisatitspeakat6:00amduetothenightfasting.Itdropsrapidlywhenthefirstsupplementaldietisgivenat6:00am.By8:00amtherumenpHapproachestheacidosislevelofabout6.0,butitraisesagainwhenthefirstgrazing

Page 10: Implementation of CTR Dairy Model Using the Visual Basic

International Journal of Agricultural and Environmental Information SystemsVolume 9 • Issue 3 • July-September 2018

83

sessionstartsat8:00am.Eachtimeasupplementdietoracornsilagediesisgiven,therumenpHdrops,andeachtimeagrazingsessionstarts,therumenpHraises.Dairyfarmerscanusethisplottoavoidtheacidosisproblemintheirherds.

ThesecondplotinFigure7showsthediurnalplotoftherumenVFA(VolatileFattyAcid)poolovertheday.Therumenprovidesasitewheretherumenmicroorganismscandigestcarbohydrates,proteins,andfiber.Throughthisdigestionprocess,energyorvolatilefattyacids(VFA’s)andmicrobialproteinareproduced(PennStateUniversity,2017).VFAareactuallywasteproductsfromtherumenmicrobesbutthecowabsorbsthemfromherrumenandusesthemasmajorsourceofenergy.Inoursampleherd,theVFArangesfrom80to130mM/L.At6:00am,justbeforethefirstsupplementaldietisgiven,thecurveisatitslowestlevelduetonightfasting.Thecurveraisesrapidlyoncethesupplementaldietisgivenat6:00am.Itraisesslightlyat8:00amwhenthemorninggrazingsessionstarts.Thenitdropsslowlyandreachesitssecondminimumat3:00pm,justbeforethecornsilagedietisgiven.Thecurvekeepsraisingduringtheafternoongrazingsessionat5:00pm,theafternoonsupplementaldietat8:00pm,andtheeveningcornsilagedietat9:00pm.Itreachesitspeakat11pmandthenstartsdroppinguntilitreachesitslowestlevelat6:00am,justbeforethefirstsupplementaldietisgiven.

ThethirdplotinFigure7showsthediurnalplotoftherumenammoniaovertheday.Ammoniaisthemostimportantsourceofnitrogenforproteinsynthesisintherumen.Ammoniaconcentrationintherumencanfluctuatebetween<17mg/L(lowproteinroughage)andashighas680mg/Lfollowingfeedingofrapidlydegradedprotein(Fellner,2005).Manymicrobesthatuseammoniacanalsouseaminoacidsorpeptides.Theuseofammoniaisreducedinthepresenceofaminoacidsandpeptidesexplainingthevariabilityinammoniaconcentrationsintherumen.Inourexampleherd,therumenammoniarangesfrom50to350mg/LandfollowsthesamepatternoffluctuationsasofthesolubleCPpool.

ThefourthplotinFigure7showsthediurnalplotofthemicrobialpoolovertheday.Ruminants,suchascattle,relyuponarichanddiversecommunityofsymbioticruminalmicrobestodigesttheirfeed.Thesesymbiontsarecapableoffermentinghost-indigestiblefeedintonutrientsourcesusablebythehost,suchasvolatilefattyacids.Thehostrequiresruminalfermentationproductsforbodymaintenanceandgrowthandmilkproduction(Kelseaetal,2015).Inourexampleherd,themicrobialpoolrangesfrom1800to2400gandfollowsthesamepatternoffluctuationsasofthesolubleCPpool.

DISCUSSIoN AND CoNCLUSIoN

AnimportantfeatureofthenewversionofCTRDairyprogramcomparedtootherdairycattlefeedingprogramsisitsuniqueabilitytopredictmilkproductionandprofitoverfeedcostbasedonthetimingofgrazingsessionsandsupplementfeeding.TodemonstratetheeconomicimpactofusingtheCTRDairyasadecisionsupporttool,thesimulationprogramisrunbytwoscenariosasdescribedbelow.

Inthefirstscenario,aherdof1000cowsinmilkisgrazedonceadayfor threehoursfrom7:00amto10:00amonalegumepasture.Thedrymatterintakefromgrazingis6.60kg/cow/day.Asupplementalfeed,intheformofacornconcentration,isgiventwiceadayat5:00amand3:00pmattherateof3.05kg/cow/feeding.Anothersupplementalfeed,intheformofacornsilage,isgivenonceadayat4:00pmattherateof4.30kg/cow/feeding.Thecowbodyweightis550kgandthebodyweightlossis0.3kg/day.Milkhas3.7%fat,3.0%protein,and4.9%lactose.Milkpriceis$0.30/litter.Thelegumepasturecosts$35.0/metrictonAsFed,thecornconcentrationcosts$120/metrictonAsFed,andthecornsilagecosts$80/metrictonAsFed.

Runningthesimulationwiththefirstscenariowiththefeedintakeof17.0kg/cow/dayandthefeedcostof$4.08/cow/day,predictsamilkproductionof23.65litter/cow/daywithamilkrevenueof$7.10/cow/day.Theprofitoverfeedingis$3.012/day/cowor$3,012/day/herdor$1,102,239/year/herd.

Inthesecondscenario,alltheinputinformation,includingcowbodyweight,cowbodyloss,milkcomposition,milkprice,feedintake,feedcost,andfeedingscheduleisthesameasinthefirst

Page 11: Implementation of CTR Dairy Model Using the Visual Basic

International Journal of Agricultural and Environmental Information SystemsVolume 9 • Issue 3 • July-September 2018

84

scenarioexceptthesupplementalfeedintheformofacornsilageisgivenat9:00aminsteadof4:00pmatthesamerateof4.30kg/head/feeding.

Runningthesimulationwiththesecondscenariowiththesamefeedintakeof17.0kg/cow/dayandthesamefeedcostof$4.08/cow/day,predictsadifferentmilkproductionof24.23litter/cow/daywithadifferentmilkrevenueof$7.27/cow/day.Theprofitoverfeedingis$3.186/day/cowor$3,186/day/herdor$1,166,245/year/herd.Asinglechangeinthefeedingschedule(givingthecornsilagesupplementalfeedat9:00aminsteadof4:00pm)increasestheprofitoverfeedingfrom$1,102,239/year/herdto$1,166,245/year/herd,adifferenceof$64,006/year/herd.

DairyfarmerscanusethenewversionoftheCTRDairyprogramtomanipulatetheherbageallowanceandtheaccesstimetothegrazingpaddock,aswellasthetimingofsupplementalfeeding,toimprovetheutilizationofthepastureandtoincreasetheproductionofthemilk.Dairynutritionconsultantscanusetheplotsofthekeyrumenparametersasdiagnostictoolsfortheingestionanddigestionprocessesingrazingdairycows.

Intermsofsoftwareengineering,usingMicrosoftExcelwithitsembeddedVBAlanguageforimplementingtheCTRDairymodelhasseveraladvantages:(1)TheExcelsoftwareiswidelyavailableandintendedusersaremostlyfamiliarwithitsoperation;(2)Excelworksheetscanbeusedforinputscreensandoutputtablesandplotswithminimalcoding;(3)TheExcelworksheetscanalsobeusedtostoreandmanagefeedlibrariesneededforthesimulationprogram;(4)AdvanceduserscaneasilyaddnewworksheetsandplotstotheoutputmoduleusingthefamiliarExcelmenu;(5)TheVBAlanguage,embeddedinExcel,isafull-featuredprogramminglanguagethatcanbeusedtorapidlyimplementasimulationmodelandmakeitavailabletoabroadrangeofaudienceswithouttheneedforaproprietarysimulationsoftwarepackage.

ACKNowLEDGMENT

Weareplanningtoaddanexpertsystemmoduletotheprogramtointerpretoutputsandgiveadvicetofarmers.Wearealsoplanningtoexpandthefeedlibrarydatabasetoincludemorefeedsfromothercountries.CorrespondenceconcerningthisarticleshouldbeaddressedtoAbbasAhmadi,DepartmentofAnimalScience,UniversityofCaliforniaDavis,1ShieldsAve,Davis,California,USA.Email:abahmadi@ucdavis.edu.ThemanuscriptisanextendedversionoftheEFITA2017submissionandispreparedforpublicationinInternationalJournalofAgriculturalandEnvironmentalInformationSystems(IJAEIS).

Page 12: Implementation of CTR Dairy Model Using the Visual Basic

International Journal of Agricultural and Environmental Information SystemsVolume 9 • Issue 3 • July-September 2018

85

REFERENCES

Ahmadi, A., Robinson, P. H., & Chilibroste, P. (2013, June). Pcdairy Enterprise: A computer package forformulationandevaluationofrationsfordairycattle.Paper presented at themeeting of the World Congress of Computers in Agriculture and Natural Resources (EFITA-WCCA-CIGR),Turin,Italy.

Chilibroste,P.(1999).Grazingtime:themissinglink.Astudyoftheplant–animalinterfacebyintegrationofexperimentalandmodellingapproaches[PhDThesis].Wageningen,TheNetherlands.

Chilibroste,P.,Bachetta,C.,Etchegaray,S.,Ferreira,I.,Lockhart,C.,&Pose,L.(2003).Effectofcornsilageandgrazingstrategyonrumenpoolsizesofgrazingdairycows.InIX World Conference on Animal Production and XVIII Reuniao Lationamericana de Producao Animal,PortoAlegre,Brazil(p.31).

Chilibroste,P.,Dijkstra,J.,Robinson,P.H.,&Tamminga,S.(2008).Asimulationmodel“CTRDairy”topredictthesupplyofnutrientsindairycowsmanagedunderdiscontinuousfeedingpatterns.Animal Feed Science and Technology,143(1-4),148–173.doi:10.1016/j.anifeedsci.2007.05.009

Chilibroste,P.,Dijkstra,J.,&Tamminga,S.(2001).Designandevaluationofanon-steadystaterumenmodel.J. Agric. Sci.,49,297–312.

Chilibroste,P.,Gibb,M.J.,&Tamminga,S.(2005).Pasturecharacteristicsandanimalperformance.InJ.Dijkstra,J.M.Forbes,&J.France(Eds.),Quantitative Aspects of Ruminant Digestion and Metabolism(pp.681–706).Wellington,UK:CABIPublishing.doi:10.1079/9780851998145.0681

deOndarza,M.B.(2000).Thestomachofthedairycow.RetrievedJune20,2017fromhttp://www.milkproduction.com/Library/Scientific-articles/Animal-health/The-stomach-of-the-dairy-cow/

Dijkstra,J.,France,J.,Neal,H.D.S.C.,Assis,A.G.,Aroeira,L.J.M.,&Campos,O.F.(1996).Simulationofdigestionincattlefedsugarcane:Modeldevelopment.J. Agric. Sci.,127(02),231–246.doi:10.1017/S0021859600078011

Dijkstra,J.,Kebreab,E.,Bannink,A.,France,J.,&Lopez,S.(2005).Applicationofthegasproductiontechniqueinfeedevaluationsystemsforruminants.Animal Feed Science and Technology,123/124,561–578.doi:10.1016/j.anifeedsci.2005.04.048

Dijkstra,J.,Mills,J.A.N.,&France,J.(2002).Theroleofdynamicmodellinginunderstandingthemicrobialcontribution to rumen function. Nutrition Research Reviews, 15(01), 67–90. doi:10.1079/NRR200237PMID:19087399

Fellner,V.(2005).Rumenmicrobesandnutrientmanagement.NCSU.RetrievedJune20,2017fromhttps://projects.ncsu.edu/project/swine_extension/swinereports/2004-2005/dairycattle/nutrition/fellner1.htm

Forbes,J.M.(1995).Voluntary Food Intake and Diet Selection in Farm Animals.Wallingford,UK:WallingfordCABInt.

Gibb, M. J., Huckle, C. A., Nuthall, R., & Rook, A. J. (1997). Effect of sward surface height on intakeand grazing behaviour by lactating Holstein Friesian cows. Grass and Forage Science, 52(3), 309–321.doi:10.1111/j.1365-2494.1997.tb02361.x

Kelsea,A.J.,Caroline,A.M.,Christine,L.O.,Paul,J.W.,&Garret,S.(2015).Ruminalbacterialcommunitycompositionindairycowsisdynamicoverthecourseoftwolactationsandcorrelateswithfeedefficiency.Applied and Environmental Microbiology,81(14),4697–4710.doi:10.1128/AEM.00720-15PMID:25934629

Laca,E.A.,Ungar,E.D.,&Demment,M.W.(1994).Mechanismsofhandlingtimeandintakerateofalargemammaliangrazer.Applied Animal Behaviour Science,39(1),3–19.doi:10.1016/0168-1591(94)90011-6

Mattiauda,D.A.,Tamminga,S.,Elizondo,F.,&Chilibroste,P.(2003).Effectofthelengthandmomentofthegrazingsessiononmilkproductionandcompositionofgrazingdairycows.Tropical and Subtropical Agroecosystems,3,87–90.

PennStateUniversity. (2017).Fromfeed tomilk:Understanding rumen function.Retrieved June20,2017fromhttp://extension.psu.edu/animals/dairy/nutrition/nutrition-and-feeding/rumen-function/from-feed-to-milk-understanding-rumen-function/extension_publication_file

Provenza,F.D.(1995).Postingestivefeedbackasanelementarydeterminantoffoodpreferenceandintakeinruminants.Journal of Range Management,48(1),2–17.doi:10.2307/4002498

Page 13: Implementation of CTR Dairy Model Using the Visual Basic

International Journal of Agricultural and Environmental Information SystemsVolume 9 • Issue 3 • July-September 2018

86

Abbas Ahmadi is a computer scientist and software engineer for the last 30+ years at the Department of Animal Science, University of California Davis, USA. He is also an adjunct professor of computer science for the last 20+ years at the Cosumness River College, Sacramento, CA, USA. He has a BS degree in Biology (1968) from Faculty of Sciences (University of Tehran, Iran) and a MS degree in Public Health (1977) from College of Public Health (University of Tehran, Iran). He also has a MS degree in Computer Science (1986) from College of Electrical Engineering (University of California Davis, USA) and a PhD degree in Entomology (1986) from College of Agriculture (University of California Davis, USA). His research interest is focused on the application of computers in animal production systems.

Peter Robinson is a Cooperative Extension Specialist in Dairy Nutrition and Management at the Department of Animal Science, University of California Davis, USA. He has a BS degree from University of Manitoba (Winnipeg, Canada 1970-1974), a MS degree from University of Guelph (Guelph, Canada, 1974-1976), and a Ph.D. degree from Cornell University (Ithaca, NY, USA, 1979-1983). His research interests are focused on protein and amino acid nutrition of dairy cows, evaluation of methods to assess forage quality, management strategies to reduce the environmental impact of dairy cows, and animal metabolic models as tools to understand animal biology.

Pablo Chilibroste is a full professor of dairy nutrition at Department Animal Production and Pastures, Faculty of Agronomy, University of the Republic, Uruguay. He has a BS degree in Agricultural Engineering (1980 - 1985) from Faculty of Agronomy, University of the Republic, Uruguay, a MS degree in Animal Production (1992 - 1993) from Pontifical Catholic University of Chile, Chile, and a PhD degree in Animal Science (1995 – 1999) from Wageningen University & Research Center, The Netherlands. His research interests are focused on ruminant nutrition and simulation of animal production systems. Dr. Chilibroste is a world recognized expert on grazing systems of dairy cattle.

Francisco Elizondo is a Graduate Student (Master Program in Animal Sciences) at the Department of Animal Production and Pastures, Faculty of Agriculture, University of the Republic, Uruguay. He has a BS degree in Agricultural Engineering (1992 - 1999) from Faculty of Agronomy, University of the Republic, Uruguay.