Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
GrassCLIPS
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Groot, Jeroen
GrassCLIPS
Commits
ff8ea0be
Commit
ff8ea0be
authored
2 years ago
by
Groot, Jeroen
Browse files
Options
Downloads
Patches
Plain Diff
Small edits
parent
1c853a74
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gc21_AnimalGain.R
+5
-5
5 additions, 5 deletions
gc21_AnimalGain.R
with
5 additions
and
5 deletions
gc21_AnimalGain.R
+
5
−
5
View file @
ff8ea0be
...
...
@@ -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
))
# s
cenario
s
for
(
s
in
c
(
1
,
2
))
# s
ward type
s
{
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
frame
s
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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment