Modelling reproduction in a herd of dairy cattle