Imitating modelling of a cattle-breeding complex on basis Cedar Bog
Setting a task of modelling. There is a cattle herd structured on the
basic of age. The herd consists of Heifers, Calves, Milk cows, Cows,
Bulls. Each Animal has its Age. The daily increase depends in weight of
an animal which defines the weight of it depends on the age. So, for
example, at achievement of the certain age (?500 days) calves become
bulls and pass from Calves in Bulls, but not all of them. Only the
quantity which is enough for reproduction of the herd. The others remain
calves until they fatten the necessary weight (?1000 kg). As soon as it
occurs, they are slaughtered. The similar situation is with heifers.
Only at achievement of the certain age (?450 days) they are divided into
two categories: milk cows and cows. Cows are bred for meat production,
MilkCows – for reproduction of herd and production of milk. According to
financial opportunities a farmer defines an initial livestock of the
cattle, and then makes a plan of reception of a livestock of the cattle
in the future. It is required to model the change of an annual turnover
of the herd and its reproduction.
Component of a high level: Farm (Farm) which describes the structure of
the model.
HIGH LEVEL COMPONENT FARM_High
SUBCOMPONENTS
Meteo,
Forage,
Effluent,
Herd
COMPONENT CONNECTIONS
Meteo.sun –> Forage.sun;
Meteo.sun –> Effluent.sun;
Meteo.sun –> Herd.sun;
Herd.Dung –> Effluent.Dung;
Effluent.A –> Herd.A;
Herd.Numb_young –> Forage.Numb_young;
Herd.Numb_old –> Forage.Numb_old;
END OF FARM_High
Basic components:
1. Meteo which allows to watch the solar activity during a year (it is
based on the data of the model Cedar Bog)
DYNAMIC BEHAVIOUR
suns:= 95.9[kJ/m^2] * (1+0.635 * SIN (2[1/d] * Pi *T/365));
WHENEVER T >= TNext DO
sun^:= suns – Oblako;
TNext^:= TNext + 1[d];
END
END OF Meteo
2. Forage. Norms and diets of feeding are defined in it.
DYNAMIC BEHAVIOUR
sun_bio:= sun * Bio_Fac;
WHENEVER T >= TNext DO
TNext^:= TNext +1[d];
Seno^:= 9 * Numb_young + 14 * Numb_old;
Silos^:= 8 * Numb_young + 12 * Numb_old;
Kombicorm^:= 5 * Numb_young + 7 * Numb_old;
Koncentrat^:= 2 * Numb_young + 3 * Numb_old;
Fosfat^:= 0.04 * Numb_young + 0.06 * Numb_old;
Sol^:= 0.03 * Numb_young + 0.05 * Numb_old;
END
DIFFERENTIAL EQUATIONS
p’:= sun_bio – 4.03[1/a] * p;
BioMassa’:= 0.48[1/a] * p – 17.87[1/a] * BioMassa;
END
END OF Forage
3. Herd, describing variable statuses and dynamics of behaviour of the
herd as a whole. The important component which defines the structure of
the herd, its internal interaction. It allows to watch a livestock of
the herd, its reproduction.
# Changing of weight and age of heifers
WHENEVER (Stage = 1) AND (Index NUMBER(Heifers)) DO
Stage^:=2;
Index^:=1;
END
# Fecundation of heifers
WHENEVER (Stage = 3) AND (Index (450 + Norm_raspr(10,3)) DO
IF Rand NUMBER(Heifers)) DO
Stage^:=4;
Index^:=1;
END
# Calves became Bulls, or they are slaughtered
WHENEVER (Stage = 4) AND (Index (500 + Norm_raspr(10,2)))
AND (NUMBER(Bulls) (500 + Norm_raspr(10,2)))
AND (Calves:Animal[Index].Weight > 1000) DO
VesTyw^:= VesTyw + Calves:Animal[Index].Weight/2;
Calves^: REMOVE Animal[Index];
UBOI^:= UBOI + 1;
END
END
WHENEVER (Stage = 4) AND (Index > NUMBER(Calves)) DO
Stage^:=5;
Index^:=1;
END
# Bulls are slaughtered
WHENEVER (Stage = 5) AND (Index 3000 DO
VesTyw^:= VesTyw + Bulls:Animal[Index].Weight/2;
Bulls^: REMOVE Animal[Index];
UBOI^:= UBOI + 1;
END
END
WHENEVER (Stage = 5) AND (Index > NUMBER(Bulls)) DO
Stage^:=6;
Index^:=1;
END
# Birth of young animal
WHENEVER (Stage = 7) AND (Index (275 + Norm_raspr(5,1))
AND (MilkCows:Animal[Index].Status = TRUE) DO
MilkCows:Animal[Index].Status^:= FALSE;
MilkCows:Animal[Index].Kol_voOtelov^:=
MilkCows:Animal[Index].Kol_voOtelov + 1;
IF Rand = 1)
AND ((MilkCows:Animal[Index].Stelnost 280)) DO
NADOI^:= NADOI + 20;
END
# MilkCows are slaughtered
IF MilkCows:Animal[Index].Kol_voOtelov > 5 DO
VesTyw^:= VesTyw + MilkCows:Animal[Index].Weight/2;
MilkCows^: REMOVE Animal[Index];
UBOI^:= UBOI + 1;
END
END
WHENEVER (Stage = 7) AND (Index > NUMBER(MilkCows)) DO
Stage^:=8;
Index^:=1;
END
# Fecundation of MilkCows
WHENEVER (Stage = 8) AND (Index (340)) DO
IF Rand = TNext DO
TNext^:= TNext + 1[d];
IF ((sun > 100[kJ/m^2]) AND (sun = 10000) DO
A^:= 0;
FLAG^:= FALSE;
END
END
WHENEVER (T >= TNext) AND (FLAG = FALSE) DO
IF (sun > 50[kJ/m^2]) AND (sun
Нашли опечатку? Выделите и нажмите CTRL+Enter