Skip to content
Snippets Groups Projects
Commit ff8ea0be authored by Groot, Jeroen's avatar Groot, Jeroen
Browse files

Small edits

parent 1c853a74
Branches
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment