Description Usage Format Details See Also
movement_table
is a data.table to manage cow movement among areas.
Users must specify one movement_table
consisted of following items before starting a simulation.
1 2 3 |
An object of class data.table
(inherits from data.frame
) with 1 rows and 4 columns.
An object of class character
of length 4.
current_area
(integer): The current area a cow is kept specified by area_id
in area_table.
condition
(character): Condition that cows in the area move to the next area(s). Describe conditions by character which can be evaluated as logical (see Example). You can use following terms to specify condition
:
age
: Age in month. Use like age == 20
.
parity
: Parity. Use like parity > 1
.
months_from_delivery
, months_from_pregnancy
, months_from_dry
: The number of months from delivery, pregnancy or dry. Use like months_from_delivery == 0
(this means the month a cow delivered).
delivery
, pregnancy
, dry
: A shorthand form of months_from_delivery == 0
and so on.
dim
: Days in milking. Use like dim > 100
.
month
: Month in a year (1 = Jan, 2 = Feb, ...). Use like month == 3
.
stay
: The number of months for which a cow stayed in a area. Use like stay == 3
.
next_area
(list consisted of integer): The next area a cow will move to specified by area_id
in area_table. You can specify multiple areas like c(1:2, 4)
.
priority
(list consisted of integer and/or numeric): The priority for next_area
. Specify integer or numeric vector (for numeric vector, they must be summed to 1,) whose length is equal to next_area
. If priority
is set by integer, cows move to the area with highest priority
(= nearest to 1) which is not full. If multiple areas have the same priority
, cows are romdomly allocated to the areas. If priority
is set by numeric which is summed to 1, priority
is regarded as probability in accordance to which cows move to next_area
.
If a cow meets multiple conditions, the condition in the fastest row will be used.
cow_table tie_stall_table area_table rp_table
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.