# Herd

### Contents

Overview
Herd parameters
Example of using Herd within a plan
Editor templates
Result of calculations

## Overview

Livestock production models are a special case, because of the need to take into account, for certain species at least, biological reproduction and growth cycles that span, in the case of most species, across several years. This is why herd development projections (based on demographic parameters and equations) are being used to analyze livestock production. The model used by Mads is deterministic, i.e. the projection is determined by the herd parameters supplied by the user.

The Herd entity is a complex set of data that encapsulates a livestock herd projection (demographic) model, including the specification of animal classes, initial breakdown of animal numbers per sex and age class, and for each class and each period rates of birth, mortality, animal sales, and animal purchase.

MADS borrows from the model called Dynmod, developed by Matthieu Lesnoff and documented in the Dynmod Manual . The key difference is that the herd model is represented in Dynmod as an animal population divided in six predefined age/sex categories, namely juvenile, sub-adult and adult age groups, each male or female, while the Herd model of MADS leaves it to the user to define age groups, together with their duration in months, their initial size, and if need be their maximum size.

Herd parameters are specified either per year or for the duration of the age group (when less than a year), as detailed below. Internally, They are transformed into equivalent monthly rates, as explained in the DynMod paper.

Back to top

## Herd parameters

Like other MADS entities, a Herd is defined by a unique ID, followed by a label and a unit name.

Exemple : herd CowHerd1 = “Small Dairy Herd” , unit = “Farm” ;

The required parameters are specified in fixed order, identified by keywords, in the form of a single value or a TS (time series).

The fist section is the definition of age groups. The next two sections define (i) the parameters specifying reproduction and milk production; and (ii) the intake of animals from outside the herd. Finally, the last two sections are for specifying (i) feed requirements in the form of commodities (consumed by default) as daily quantities per kg of live weight (LW), and (ii) other products and costs in the form of commodities produced or consumed in quantities proportional to the number of animals in a given age group.

The parameters in some sections can be given for some or all of the age groups. If values are not specified for a given age group then they are assumed to be equal to 0 (zero). The same age group must not be specified more than once in a given section, or the editor will show an error.

Full details for each section are given below, and a herd model example illustrates the use of the herd entity. The editor template and sub-templates available for specifying a Herd are shown further down.

The categories of parameters are :

- Age groups
- Parturition and milk
- Intakes
- Feed Requirements
- Other products and costs

### Age groups (Herd Classes)

Age groups are defined in two sections, for female and male groups respectively, ordered from younger to older, identified by the keywords ‘Female groups’ and ‘Male groups’. Each group in a given section is defined by an optional keyword (‘F:’ or ‘Female:’ for a female group and ‘M:’ or ‘Male:’ for a male group), followed by a unique ID (i.e. different from any other ID in the entire data set) and a label, then by three parameters: the duration in months of the age group, its initial size and its maximum size, and finally five TSs : live weight, carcass yield, offtake rate and price, and death rate.

The maximum size parameters, if different from 0, will set a constraint to be met – if need be – by additional culling.

Live weights are assumed to be at the beginning of age groups and will be transformed into monthly values by linear interpolation. Carcass yields, if not constant – say because of a selection program – would be treated the same way.

Death and offtake rates: The actual mortality for a given age group depends on the size of the group over the year, i.e. depends on the offtake rate. The death rates to be entered here are ‘intrinsic’ or ‘biological’ rates, i.e. the probability of mortality in the absence of culling, and Mads will transform those rates into actual monthly death probabilities. Death and offtake rates must be specified as the probability of death or offtake between the beginning and the end of a given age group if its duration is less than 12 months, or during a full year otherwise.

Example:
Herd Classes
Female groups
Female: JF ,label = ‘F Juvenile’ , duration = 12 , Size : initial = 4.5 , maximum = 0 ,
LiveWeight = [ 20 ], CarcassYield = [ 47 ],
Offtake : rate = [ 0 0 ], price = [ 40 ],
Death rate = [ 13 13 ];
Female: SF ,label = ‘F Subadult’ , duration = 36 , Size : initial = 10.0 , maximum = 0 ,
LiveWeight = [ 50 ], CarcassYield = [ 47 ],
Offtake : rate = [ 5 ], price = [ 90 ],
Death rate = [ 5 5 ];
Female: AF ,label = ‘F Adult’ , duration = 132 , Size : initial = 20.5 , maximum = 0 ,
LiveWeight = [ 250 ], CarcassYield = [ 47 ],
Offtake : rate = [ 5 ], price = [ 150 ],
Death rate = [ 3 3 ];//21 3 ] ;

Male groups
Male: JM ,label = ‘M Juvenile’ , duration = 12 , Size : initial = 4 , maximum = 0 ,
LiveWeight = [ 20 ], CarcassYield = [ 47 ],
Offtake : rate = [ 10 ], price = [ 40 ],
Death rate = [ 13 13 ];
Male: SM ,label = ‘M Subadult’ , duration = 36 , Size : initial = 7 , maximum = 0 ,
LiveWeight = [ 70 ], CarcassYield = [ 47 ],
Offtake : rate = [ 29 ], price = [ 110 ],
Death rate = [ 5 5 ];
Male: AM ,label = ‘M Adult’ , duration = 72 , Size : initial = 4 , maximum = 0 ,
LiveWeight = [ 300 ], CarcassYield = [ 47 ],
Offtake : rate = [ 21 ], price = [ 200 ],
Death rate = [ 3 3 ];

### Parturition and milk

First is the definition of ‘Milk’ : the reference to the commodity (defined in its own way) to be used as milk.

The only values that need to be specified are those for the female age groups (age classes) with non-zero birth rates. They are specified by the keyword ‘Class’ followed by the ID of the concerned class and the parameters below.

Definition of the parameters:
Birth rate per year: Average number of parturitions per year for a female being in the herd for a full year (Hazard rate).
Net Prolificacy Rate: Average number of live births per parturition.
Prob. of female at birth: Probabilitý of a live birth to be a female.
Dairy production is expressed as quantities per lactation.

Exemple :

Parturition and milk
Milk = CowMilk prod ;
Class AF : Birth rate per year = [ 50 ],
Net Prolificacy Rate = [ 100 ] , Prob. of female at birth = [ 50 ] ,
Quantity per lactation = [ 136 ] ;

### Intakes

Intakes are assumed to occur at the mid-point of the age group period.

Exemple :

Intakes
Class AF : Numbers = [ 0 1 0 ], price = [ 180 ] ;

### Feed Requirements

This category, which is optional, is used to define commodity items, consumed by default, that will be calculated on the basis of the number of animals per category, their live weight and a daily quantity. This will normally be used to specify, for each age group, daily Feed Requirements per Kg LW.

Exemple :

Feed Requirements
Feed Item DM cons ; // DM, i.e. dry matter, defined as a commodity
Daily Quantity per unit LW
JF = [ 0.025 ] ;
SF = [ 0.025 ] ;
AF = [ 0.025 ] ;
JM = [ 0.025 ] ;
SM = [ 0.025 ] ;
AM = [ 0.025 ] ;

### Other products and costs

This last category, which is also optional, is used to define costs or production of commodity items that will be calculated on the basis of the number of animals per category. This could be used, for example, to handle feed costs, vaccinations, or the production of whool or manure.

Exemple :

Other products and costs
Proportional Item Hides prod ;
Quantity per head per year
AF = [ 5 ] ;
AM = [2 ] ;
Proportional Item Manure prod ;
Quantity per head per year
JF = [ 0.5 ] ;
SF = [ 0.8 ] ;
AF = [ 1.5 ] ;
JM = [ 0.5 ] ;
SM = [ 0.8 ] ;
AM = [ 1.5 ] ;

Back to top

## Example of using Herd within a plan

Example :

CowHerd1 [1 0] ;

There is no calculation type attribute, as the level always correspond to phasing over an incremental set of values.

Back to top

## Editor templates

In the following templates, question marks indicate optional parameters, either the ‘?’ or the entire line should be erased or commented out.
‘[ 0 0 ]’ is a marker to indicate time series of values to be filled in.

### Main template

herd ID = ‘label’ , unit = ‘unit’ ;
Herd Classes
Female groups
// use template "-Female Class Spec"
Male groups
// use template "-Male Class Spec"
Parturition and milk
Milk = Riz cons ;
// specify here parturition data for female classes
// use template “-Parturition Item”
Intakes
// specify here intake numbers and prices
// use template “-Intake Item”
Feed Requirements
// specify here commodity feed items proportional to LW per herd classes
// use template "-Feed Item"
Other products and costs
// specify here commodity items proportional to herd classes size
// use template "-Herd Proportional Item"
end ;

### “-Female Class Spec” template

Female: ID ,label = ‘label’ , duration = duration , Size : initial = initSize , maximum = maxSize ,
LiveWeight at entry = [ 0 0 ], CarcassYield = [ 0 0 ],
Offtake : rate = [ 0 0 ], price = [ 0 0 ],
Death rate = [ 0 0 ] ;

### “-Male Class Spec” template

Male: ID ,label = ‘label’ , duration = duration , Size : initial = initSize , maximum = maxSize ,
LiveWeight at entry = [ 0 0 ], CarcassYield = [ 0 0 ],
Offtake : rate = [ 0 0 ], price = [ 0 0 ],
Death rate = [ 0 0 ] ;

### “-Intake Item” template

Class JF : Numbers = [ 0 1 0 ], price = [ 180 ] ;

### “-Feed Item” template

Template for commodity feed items proportional to LW per herd classes:

Feed Item CowMilk cons? ;
Daily Quantity per unit LW
// use template "-Herd Class Data"

### “-Herd Proportional Item” template

Template for commodity items proportional to herd classes:

Proportional Item CowMilk cons ;
Quantity per year
// use template “-Herd Class Data”

### “-Herd Class Data” template

JF [ 0 0 ] ;

Only IDs of female or male age groups can be selected.

Back to top

## Result of calculations

When a Plan that includes a herd is calculated, results are available for use in a Script or Table definition, under the ID of the Herd qualified by a result-type attribute. Example: DairyHerd2~nbrTotal is the identifier of a TS variable with the total number of animals year after year in herd DairyHerd2.

Results are of three different types:

- Detailed results by age/sex class
- Aggregated results by animal group
- Feed, milk and other products and costs: the results are commodities and thus follow the Commodity rules .

### Detailed results by class

Detailed results by class are identified by two attributes:

- a result-type attribute with four possible values: avgSize, deathRate, offtakeRate, intakeRate
- the HerdClass ID name

Example : DairyHerd2~avgSize~AF is the identifier of a TS variable with the average number of animals year after year in the AF age class.

### Aggregated results

Aggregated result types and their corresponding attributes include:

1. Population size results = Average living stock number: nbrTotal, nbrTotM, nbrTotF.

2. Production results: the name of the attribute is made of three components:

- a prefix to indicate the unit : Nbr = in numbers, LW = liveweight equivalent, Mt = meat equivalent, Fin = in value
- a central part to indicate the category : TP = Total Production, SV = stock variation, OF = Offtake, IN = Intake
- a suffix to specify the animal group : M = Male, F = Female, Tot = Total

This results in 4 × 4 × 3 = 48 values :

- Production in numbers : NbrTPM, NbrTPF, NbrTPTot, NbrSVM, NbrSVF, NbrSVTot, NbrOFM, NbrOFF, NbrOFTot, NbrINM, NbrINF, NbrINTot
- Production in liveweight : LWTPM, LWTPF, LWTPTot, LWSVM, LWSVF, LWSVTot, LWOFM, LWOFF, LWOFTot, LWINM, LWINF, LWINTot
- Production in meat : MtTPM, MtTPF, MtTPTot, MtSVM, MtSVF, MtSVTot, MtOFM, MtOFF, MtOFTot, MtINM, MtINF, MtINTot
- Production in value : FinTPM, FinTPF, FinTPTot, FinSVM, FinSVF, FinSVTot, FinOFM, FinOFF, FinOFTot, FinINM, FinINF, FinINTot

Example : DairyHerd2~LWOFF is the identifier of a TS variable with the liveweight of the offtake of female animals year after year.

Back to top