diff --git a/gc21_AnimalGain.R b/gc21_AnimalGain.R index 7d5803e875ce7d90744f4d4af030f5f3b39c0167..03e8035cdd041f789a3f50708955f83cfbd478d2 100644 --- a/gc21_AnimalGain.R +++ b/gc21_AnimalGain.R @@ -15,10 +15,10 @@ sim_name=c("_M1_","_M2_") # parameters for calculating herbage DM production and ADG for heifers BW_start=260 # kg, body weight at the start BW_target=460 # kg, target body weight -herbage_loss=0.35 # fraction, losses due to trampling, dung and urine patches +herbage_loss=0.35 # fraction, losses due to trampling, dung and urine patches ME_maint=0.67 # MJ per kg MW, ME requirement for maintenance per kg of metabolic weight ME_growth=24.11 # MJ per kg growth, ME requirement for growth per kg of body weight gain -intake_cap=0.09 # 1/kg MW, intake capacity factor per kg metabolic weight +intake_cap=0.09 # 1/kg MW, intake capacity factor per kg metabolic weight stocking=3.125 # animals/ha, stocking rate if(sim_mode==1){ @@ -45,13 +45,13 @@ print_non_target_BW=FALSE # print results when target BW is not reached gp_index=c(2,4) ep_index=c(1,2) -for(s in c(1,2)) # scenarios +for(s in c(1,2)) # sward types { ep=epat[[ep_index[s]]] gp=gpat[[gp_index[s]]] sumRR=CalculateSumRR(gp) - # make a dataframe to store the results for this scenario + # make data frames to store the results for this scenario sim_res=data.frame(NApplied=double(),GrazingStart=double(),AvgGrowth=double(),FinalBodyWeight=double(), DMYield=double(),NYield=double(),DMAvailAnimal=double(), DMIntakeAnimal=double(),PeriodOnFarm=integer(),MEperKgGrowth=double()) @@ -81,7 +81,7 @@ for(s in c(1,2)) # scenarios ME=GrassMEContent(d,ep) MW=BW^0.75 # metabolic weight - intake=min(DM/stocking,intake_cap*MW) # intake max. 10% of MW + intake=min(DM/stocking,intake_cap*MW) # intake max. 9% of MW total_intake=total_intake+intake # sum of intake to calculate avg req_maint=ME_maint*MW # ME requirement for maintenance