root / UCalcSimulT.pas @ 3
Historique | Voir | Annoter | Télécharger (37,434 ko)
1 | 3 | avalancogn | unit UCalcSimulT ;
|
---|---|---|---|
2 | |||
3 | interface
|
||
4 | |||
5 | uses
|
||
6 | UVariables ; |
||
7 | |||
8 | procedure CalcSimulT (Simulation : integer ;
|
||
9 | Variable : integer ; Variation : double ; |
||
10 | CycleInitVar, CycleFinVar, StadeVar : integer ; |
||
11 | PResSimulT : PTabResSimulT) ; |
||
12 | // Simulation = N? de la simulation
|
||
13 | // Variable = N? de la variable ? moduler
|
||
14 | // Variation = Coefficient de variation
|
||
15 | // CycleInitVar = Port?e de d?but de variation
|
||
16 | // CycleFinVar = Port?e de fin de variation
|
||
17 | // StadeVar = Stade sur lequel s'applique la variation
|
||
18 | // PResSimulT = Tableau de r?sultats
|
||
19 | |||
20 | implementation
|
||
21 | |||
22 | uses
|
||
23 | Math, UFindRec, UCalcul ; |
||
24 | |||
25 | procedure CalcSimulT (Simulation : integer ;
|
||
26 | Variable : integer ; Variation : double ; |
||
27 | CycleInitVar, CycleFinVar, StadeVar : integer ; |
||
28 | PResSimulT : PTabResSimulT) ; |
||
29 | var
|
||
30 | i, j : integer ; |
||
31 | ok : boolean ; |
||
32 | Stade, StadeInit, StadeFin, TypeStade, Cycle : integer ; |
||
33 | Jour, Duree, Age, Ecart : integer ; |
||
34 | RuleSeqAli : array[1..MAX_RULE] of RecRuleSeqAliT ; |
||
35 | RuleRation : array[1..MAX_RULE] of RecRuleRationT ; |
||
36 | RuleLoge : array[1..MAX_RULE] of RecRuleLogeT ; |
||
37 | Unite : integer ; |
||
38 | NumRuleLoge, NumRuleSeqAli, NumRuleRation : integer ; |
||
39 | RuleSeqAliInit, RuleRationInit, RuleLogeInit : integer ; |
||
40 | RecCC1, RecCC2 : CompositionChimique ; |
||
41 | TabAAtotal1, TabAAtotal2, TabCUDAA1, TabCUDAA2 : array[0..12] of double ; |
||
42 | PctAli1, PctAli2, Quantite, Ingere, IngereSec, IngSec1, IngSec2 : double ; |
||
43 | TabAAdig : array[0..12] of double ; |
||
44 | NRAA : array[0..14] of double ; |
||
45 | EqLysd : double ; |
||
46 | Temperature, Activite : integer ; |
||
47 | PVTot, PVVTot, PVNet, PVVNet, P2, P2Var : double ; |
||
48 | p, l, PDNet, PDTot, LD, R1, R2, RA : double ; |
||
49 | NesTotaux, Sevres, PdsNais, PdsSev, PdsPt, GMQPt, GainLact, GainProfil, GainSimul : double ; |
||
50 | CorrPP, CorrCU, CorrJ, CorrNR, TeneurLysPot : double ; // Facteur de correction (poids port?e, contenus ut?rins, jour, r?tention azot?e)
|
||
51 | CoeffEntGest, CoeffNR, CoeffEntLact, RatioLP : double ; |
||
52 | EMIng, EMEnt, EMEntInit, EMThe, EMAct, EMProd, EMProt, EMLip, EMRes : double ; |
||
53 | ENProd, ENProdCum, ENProdTot, ENProt, ENLip, ENRes, ENResCum : double ; |
||
54 | NRPotAA, NRPot, NR, NRProd, NRProdCum, NRProdTot, NRRes : double ; |
||
55 | PProd, PProdCum, PProdTot : double ; |
||
56 | NExcF, NExcU : double ; // Azote excr?t? f?c?s, urine
|
||
57 | Chaleur : double ; |
||
58 | MATIng, MATdIng : double ; |
||
59 | begin
|
||
60 | // Initialisation du tableau de r?sultat
|
||
61 | for i := 1 to NB_COL_TRUIE do |
||
62 | for j := 1 to MAX_LIG_TRUIE do |
||
63 | PResSimulT.TabResult[i, j] := 0 ;
|
||
64 | // Initialisation de la simulation
|
||
65 | PResSimulT.NbJSim := 0 ;
|
||
66 | if Simulation = -1 |
||
67 | then // Profil |
||
68 | begin
|
||
69 | // D?but et fin de simulation
|
||
70 | StadeInit := 0 ;
|
||
71 | StadeFin := 23 ;
|
||
72 | // Age initial
|
||
73 | Age := PProfilT.Truies[1].AgeSail ;
|
||
74 | end
|
||
75 | else // Simulation |
||
76 | begin
|
||
77 | // Initialisation des param?tres de simulation
|
||
78 | PSimulT := ListSimulT[FindIdxSimulT (FindNomSimulT (Simulation))] ; |
||
79 | // Initialisation du profil animal
|
||
80 | PProfilT := ListProfilT[FindIdxProfilT (FindNomProfilT (PSimulT.Profil))] ; |
||
81 | // D?but et fin de simulation
|
||
82 | StadeInit := PSimulT.StadeInit ; |
||
83 | StadeFin := PSimulT.StadeFin ; |
||
84 | // Age initial
|
||
85 | if StadeInit mod 3 = 0 |
||
86 | then // Gestation : age saillie |
||
87 | Age := PProfilT.Truies[StadeInit div 3 + 1].AgeSail |
||
88 | else // Lactation : age mise-bas |
||
89 | Age := PProfilT.Truies[StadeInit div 3 + 1].AgeSail + DureeGest ; |
||
90 | // Sensibilit? (Age initial)
|
||
91 | if (Variable = 0) |
||
92 | then
|
||
93 | Age := Round (Age * Variation) ; |
||
94 | end ;
|
||
95 | // Coefficients de calibrage
|
||
96 | CoeffEntGest := PProfilT.CoefEntretienGest ; |
||
97 | CoeffEntLact := PProfilT.CoefEntretienLact ; |
||
98 | RatioLP := PProfilT.RatioLipProt ; |
||
99 | // Boucle stades
|
||
100 | for Stade := StadeInit to StadeFin - 1 do |
||
101 | begin
|
||
102 | Cycle := Stade div 3 + 1 ; |
||
103 | TypeStade := Stade mod 3 ; |
||
104 | if (Stade = StadeInit) or ((Simulation <> -1) and ((PSimulT.OptInit = 0) or ((PSimulT.OptInit = 1) and (TypeStade = 0)))) |
||
105 | then // Initialisation PV et P2 |
||
106 | begin
|
||
107 | // Initialisation du poids vif
|
||
108 | case TypeStade of |
||
109 | 0 : // Gestation |
||
110 | PVTot := PProfilT.Truies[Cycle].PdsSail ; |
||
111 | 1 : // Lactation |
||
112 | PVTot := PProfilT.Truies[Cycle].PdsApMB ; |
||
113 | end ;
|
||
114 | // Sensibilit? (Poids vif initial)
|
||
115 | if (Variable = 1) and (Stade = StadeInit) |
||
116 | then
|
||
117 | PVTot := PVTot * Variation ; |
||
118 | // Initialisation de l'?paisseur de lard
|
||
119 | case TypeStade of |
||
120 | 0 : // Gestation |
||
121 | P2 := PProfilT.Truies[Cycle].P2Sail ; |
||
122 | 1 : // Lactation |
||
123 | P2 := PProfilT.Truies[Cycle].P2MB ; |
||
124 | end ;
|
||
125 | // Sensibilit? (Epaisseur de lard initiale)
|
||
126 | if (Variable = 2) and (Stade = StadeInit) |
||
127 | then
|
||
128 | P2 := P2 * Variation ; |
||
129 | PVVTot := PVTot * PV2PVV ; |
||
130 | p := 2.28 + (0.178 * PVVTot) - (0.333 * P2) ; |
||
131 | l := -26.4 + (0.221 * PVVTot) + (1.331 * P2) ; |
||
132 | ENResCum := -1024 + (13.66 * PVVTot) + (45.94 * P2) ; |
||
133 | end ;
|
||
134 | // Initialisation de la s?quence alimentaire
|
||
135 | if (Simulation = -1) or (PSimulT.SeqAli[Cycle] = -1) |
||
136 | then // Profil |
||
137 | PSeqAliT := ListSeqAliT[FindIdxSeqAliT (FindNomSeqAliT (PProfilT.SeqAli))] |
||
138 | else // Simulation |
||
139 | PSeqAliT := ListSeqAliT[FindIdxSeqAliT (FindNomSeqAliT (PSimulT.SeqAli[Cycle]))] ; |
||
140 | case TypeStade of |
||
141 | 0 : // Gestation |
||
142 | for i := 1 to PSeqAliT.NbRuleGest do |
||
143 | RuleSeqAli[i] := PSeqAliT.RuleGest[i] ; |
||
144 | 1 : // Lactation |
||
145 | for i := 1 to PSeqAliT.NbRuleLact do |
||
146 | RuleSeqAli[i] := PSeqAliT.RuleLact[i] ; |
||
147 | else // ISSF |
||
148 | for i := 1 to PSeqAliT.NbRuleISSF do |
||
149 | RuleSeqAli[i] := PSeqAliT.RuleISSF[i] ; |
||
150 | end ;
|
||
151 | NumRuleSeqAli := 1 ;
|
||
152 | RuleSeqAliInit := 1 ;
|
||
153 | // Initialisation du plan de rationnement
|
||
154 | if (Simulation = -1) or (PSimulT.Ration[Cycle] = -1) |
||
155 | then // Profil |
||
156 | begin
|
||
157 | with RuleRation[1] do |
||
158 | begin
|
||
159 | ModeFin := -1 ;
|
||
160 | if TypeStade = 1 |
||
161 | then // Lactation |
||
162 | begin
|
||
163 | Equation := 3 ; // Curvilin?aire |
||
164 | a := PProfilT.Lact[Cycle] / 2 ; // Initial |
||
165 | c := PProfilT.Lact[Cycle] ; // Moyenne
|
||
166 | d := PProfilT.DureeLact ; // Dur?e
|
||
167 | end
|
||
168 | else // Gestation (ou ISSF) |
||
169 | begin
|
||
170 | Equation := 0 ; // Constant |
||
171 | a := PProfilT.Gest[Cycle] ; |
||
172 | end ;
|
||
173 | end ;
|
||
174 | Unite := PProfilT.Unite ; |
||
175 | end
|
||
176 | else // Simulation |
||
177 | begin
|
||
178 | PRationT := ListRationT[FindIdxRationT (FindNomRationT (PSimulT.Ration[Cycle]))] ; |
||
179 | case TypeStade of |
||
180 | 0 : // Gestation |
||
181 | for i := 1 to PRationT.NbRuleGest do |
||
182 | RuleRation[i] := PRationT.RuleGest[i] ; |
||
183 | 1 : // Lactation |
||
184 | for i := 1 to PRationT.NbRuleLact do |
||
185 | RuleRation[i] := PRationT.RuleLact[i] ; |
||
186 | else // ISSF |
||
187 | for i := 1 to PRationT.NbRuleISSF do |
||
188 | RuleRation[i] := PRationT.RuleISSF[i] ; |
||
189 | end ;
|
||
190 | case TypeStade of |
||
191 | 0 : // Gestation |
||
192 | Unite := PRationT.UniteGest ; |
||
193 | 1 : // Lactation |
||
194 | Unite := PRationT.UniteLact ; |
||
195 | else // ISSF |
||
196 | Unite := PRationT.UniteISSF ; |
||
197 | end ;
|
||
198 | end ;
|
||
199 | NumRuleRation := 1 ;
|
||
200 | RuleRationInit := 1 ;
|
||
201 | // Initialisation du logement
|
||
202 | if Simulation = -1 |
||
203 | then // Profil |
||
204 | PLogeT := ListLogeT[FindIdxLogeT (FindNomLogeT (PProfilT.Loge))] |
||
205 | else // Simulation |
||
206 | PLogeT := ListLogeT[FindIdxLogeT (FindNomLogeT (PSimulT.Logement))] ; |
||
207 | case TypeStade of |
||
208 | 0 : // Gestation |
||
209 | for i := 1 to PLogeT.NbRuleGest do |
||
210 | RuleLoge[i] := PLogeT.RuleGest[i] ; |
||
211 | 1 : // Lactation |
||
212 | for i := 1 to PLogeT.NbRuleLact do |
||
213 | RuleLoge[i] := PLogeT.RuleLact[i] ; |
||
214 | else // ISSF |
||
215 | for i := 1 to PLogeT.NbRuleISSF do |
||
216 | RuleLoge[i] := PLogeT.RuleISSF[i] ; |
||
217 | end ;
|
||
218 | NumRuleLoge := 1 ;
|
||
219 | RuleLogeInit := 1 ;
|
||
220 | // Dur?e du stade
|
||
221 | case TypeStade of |
||
222 | 0 : // Gestation |
||
223 | Duree := DureeGest ; |
||
224 | 1 : // Lactation |
||
225 | if Simulation = -1 |
||
226 | then // Profil |
||
227 | Duree := PProfilT.DureeLact |
||
228 | else // Simulation |
||
229 | Duree := PSimulT.DureeLact ; |
||
230 | else // ISSF |
||
231 | Duree := PProfilT.Truies[Cycle + 1].AgeSail - PProfilT.Truies[Cycle].AgeSail - DureeGest - PProfilT.DureeLact ;
|
||
232 | end ;
|
||
233 | // Coefficients de calibrage
|
||
234 | CoeffNR := Max (PProfilT.CoefNR[Cycle], 0) ;
|
||
235 | // Initialisation du stade
|
||
236 | PVNet := PVTot ; |
||
237 | case TypeStade of |
||
238 | 0 : // Gestation |
||
239 | begin
|
||
240 | NesTotaux := PProfilT.Porcelets[Cycle].NesTotaux ; |
||
241 | PdsNais := PProfilT.Porcelets[Cycle].PdsNais ; |
||
242 | PdsPt := NesTotaux * PdsNais ; |
||
243 | CorrPP := PdsPt * 1000 / Exp (9.095 - 17.69 * Exp (-0.0305 * DureeGest) + 0.0878 * NesTotaux) ; |
||
244 | CorrCU := (0.3 + (1.329 * PdsPt)) * 1000 / Exp (8.621 - 21.02 * Exp (-0.05302 * DureeGest) + 0.1114 * NesTotaux) ; |
||
245 | ENProdTot := Exp (11.72 - 8.62 * Exp (-0.01382 * 0) + 0.0932 * NesTotaux) / 1000 ; |
||
246 | ENProdTot := ENProdTot * CorrPP ; // Correction
|
||
247 | ENProdCum := ENProdTot ; |
||
248 | PProdTot := Exp (8.621 - 21.02 * Exp (-0.05302 * 0) + 0.1114 * NesTotaux) ; |
||
249 | PProdTot := PProdTot * CorrCu ; // Correction
|
||
250 | PProdCum := PProdTot ; |
||
251 | NRProdCum := 0 ;
|
||
252 | NRProdTot := Exp (8.09 - 8.71 * Exp (-0.01494 * 0) + 0.0872 * NesTotaux) / 6.25 ; |
||
253 | NRProdTot := NRProdTot * CorrPP ; // Correction
|
||
254 | NRProdCum := NRProdTot ; |
||
255 | EMEntInit := Power (PVVTot, 0.75) * EEGest * CoeffEntGest ;
|
||
256 | end ;
|
||
257 | 1 : // Lactation |
||
258 | begin
|
||
259 | NesTotaux := PProfilT.Porcelets[Cycle].NesTotaux ; |
||
260 | PdsNais := PProfilT.Porcelets[Cycle].PdsNais ; |
||
261 | Sevres := PProfilT.Porcelets[Cycle].Sevres ; |
||
262 | PdsSev := PProfilT.Porcelets[Cycle].PdsSev ; |
||
263 | if Simulation <> -1 |
||
264 | then // Ajustement du poids de sevrage ? la dur?e de lactation |
||
265 | begin
|
||
266 | GainProfil := (273 * PProfilT.DureeLact + (289 / 0.38) * Exp (-0.38 * PProfilT.DureeLact) - 289 / 0.38) / 1000 ; |
||
267 | GainSimul := (273 * PSimulT.DureeLact + (289 / 0.38) * Exp (-0.38 * PSimulT.DureeLact) - 289 / 0.38) / 1000 ; |
||
268 | PdsSev := PdsNais + GainSimul * (PdsSev - PdsNais) / GainProfil ; |
||
269 | end ;
|
||
270 | ENProdCum := 0 ;
|
||
271 | NRProdCum := 0 ;
|
||
272 | PProdCum := 0 ;
|
||
273 | // Gain de poids de la port?e
|
||
274 | GMQPt := (PdsSev - PdsNais) * Sevres / Duree ; |
||
275 | end ;
|
||
276 | else // ISSF |
||
277 | begin
|
||
278 | NesTotaux := 0 ;
|
||
279 | PdsNais := 0 ;
|
||
280 | EMEntInit := Power (PVVTot, 0.75) * EEGest * CoeffEntGest ;
|
||
281 | end ;
|
||
282 | end ;
|
||
283 | // Eviter le d?bordement du tableau de r?sultats
|
||
284 | if PResSimulT.NbJSim + Duree > MAX_LIG_TRUIE
|
||
285 | then
|
||
286 | Duree := MAX_LIG_TRUIE - PResSimulT.NbJSim ; |
||
287 | // Boucle jours
|
||
288 | for Jour := 1 to Duree do |
||
289 | begin
|
||
290 | Inc (PResSimulT.NbJSim) ; |
||
291 | PResSimulT.TabResult[78, PResSimulT.NbJSim] := Jour ;
|
||
292 | PResSimulT.TabResult[1, PResSimulT.NbJSim] := Age ;
|
||
293 | PResSimulT.TabResult[2, PResSimulT.NbJSim] := Cycle ;
|
||
294 | PResSimulT.TabResult[3, PResSimulT.NbJSim] := TypeStade ;
|
||
295 | PResSimulT.TabResult[58, PResSimulT.NbJSim] := PVTot ;
|
||
296 | PResSimulT.TabResult[60, PResSimulT.NbJSim] := PVNet ;
|
||
297 | PResSimulT.TabResult[67, PResSimulT.NbJSim] := P2 ;
|
||
298 | PResSimulT.TabResult[62, PResSimulT.NbJSim] := p ;
|
||
299 | PResSimulT.TabResult[65, PResSimulT.NbJSim] := l ;
|
||
300 | PVVNet := PVNet * PV2PVV ; |
||
301 | /////////////////////////
|
||
302 | // Apports journaliers //
|
||
303 | /////////////////////////
|
||
304 | // Aliment(s) distribu?(s)
|
||
305 | repeat
|
||
306 | ok := TRUE ; |
||
307 | with RuleSeqAli[NumRuleSeqAli] do |
||
308 | if ModeFin = 0 |
||
309 | then // Dur?e |
||
310 | if Jour - RuleSeqAliInit >= ValFin then ok := FALSE ; |
||
311 | if not (ok) |
||
312 | then // Changement de r?gle |
||
313 | begin
|
||
314 | Inc (NumRuleSeqAli) ; |
||
315 | RuleSeqAliInit := Jour ; |
||
316 | end ;
|
||
317 | until ok ;
|
||
318 | PResSimulT.TabResult[4, PResSimulT.NbJSim] := NumRuleSeqAli ;
|
||
319 | with RuleSeqAli[NumRuleSeqAli] do |
||
320 | begin
|
||
321 | PResSimulT.TabResult[7, PResSimulT.NbJSim] := NumAli1 ;
|
||
322 | PResSimulT.TabResult[8, PResSimulT.NbJSim] := NumAli2 ;
|
||
323 | // Composition aliment 1
|
||
324 | if NumAli1 = -1 |
||
325 | then
|
||
326 | begin
|
||
327 | RecCC1 := CCVide ; |
||
328 | for i := 0 to 12 do |
||
329 | TabAAtotal1[i] := 0 ;
|
||
330 | for i := 0 to 12 do |
||
331 | TabCUDAA1[i] := 0 ;
|
||
332 | end
|
||
333 | else
|
||
334 | begin
|
||
335 | PAliment := ListAliment[FindIdxAliment (FindNomAliment (NumAli1))] ; |
||
336 | RecCC1 := PAliment.CC ; |
||
337 | for i := 0 to 12 do |
||
338 | TabAAtotal1[i] := PAliment.AAtotal[i] ; |
||
339 | for i := 0 to 12 do |
||
340 | TabCUDAA1[i] := PAliment.CUDAA[i] ; |
||
341 | end ;
|
||
342 | // Composition aliment 2
|
||
343 | if NumAli2 = -1 |
||
344 | then
|
||
345 | begin
|
||
346 | RecCC2 := CCVide ; |
||
347 | for i := 0 to 12 do |
||
348 | TabAAtotal2[i] := 0 ;
|
||
349 | for i := 0 to 12 do |
||
350 | TabCUDAA2[i] := 0 ;
|
||
351 | end
|
||
352 | else
|
||
353 | begin
|
||
354 | PAliment := ListAliment[FindIdxAliment (FindNomAliment (NumAli2))] ; |
||
355 | RecCC2 := PAliment.CC ; |
||
356 | for i := 0 to 12 do |
||
357 | TabAAtotal2[i] := PAliment.AAtotal[i] ; |
||
358 | for i := 0 to 12 do |
||
359 | TabCUDAA2[i] := PAliment.CUDAA[i] ; |
||
360 | end ;
|
||
361 | // Calcul des % aliments
|
||
362 | if PctAli1Init = PctAli1Fin
|
||
363 | then
|
||
364 | PctAli1 := PctAli1Init |
||
365 | else // Transition |
||
366 | begin
|
||
367 | Ecart := PctAli1Fin - PctAli1Init ; |
||
368 | if ModeFin = 0 |
||
369 | then // Dur?e |
||
370 | PctAli1 := PctAli1Init + (Jour - RuleSeqAliInit) * Ecart / (ValFin - 1)
|
||
371 | else // Fin |
||
372 | PctAli1 := PctAli1Init + (Jour - RuleSeqAliInit) * Ecart / (Duree - RuleSeqAliInit) ; |
||
373 | end ;
|
||
374 | end ;
|
||
375 | PResSimulT.TabResult[9, PResSimulT.NbJSim] := PctAli1 ;
|
||
376 | PctAli2 := 100 - PctAli1 ;
|
||
377 | PResSimulT.TabResult[10, PResSimulT.NbJSim] := PctAli2 ;
|
||
378 | // Quantit?(s) distribu?e(s)
|
||
379 | repeat
|
||
380 | ok := TRUE ; |
||
381 | with RuleRation[NumRuleRation] do |
||
382 | if ModeFin = 0 |
||
383 | then // Dur?e |
||
384 | if Jour - RuleRationInit >= ValFin then ok := FALSE ; |
||
385 | if not (ok) |
||
386 | then // Changement de r?gle |
||
387 | begin
|
||
388 | Inc (NumRuleRation) ; |
||
389 | RuleRationInit := Jour ; |
||
390 | end ;
|
||
391 | until ok ;
|
||
392 | PResSimulT.TabResult[5, PResSimulT.NbJSim] := NumRuleRation ;
|
||
393 | with RuleRation[NumRuleRation] do |
||
394 | begin
|
||
395 | // Calcul des quantit?s
|
||
396 | case Equation of |
||
397 | 0 : // Constant |
||
398 | Quantite := a ; |
||
399 | 1 : // Lin?aire |
||
400 | Quantite := a + b * (Jour - RuleRationInit) ; |
||
401 | 2 : // Lin?aire-plateau |
||
402 | Quantite := LPvaleur (a, b, c, Jour - RuleRationInit + 1, d) ;
|
||
403 | 3 : // Curvilin?aire |
||
404 | Quantite := CLvaleur (a, c, Jour - RuleRationInit + 1, d) ;
|
||
405 | else
|
||
406 | Quantite := 0 ;
|
||
407 | end ;
|
||
408 | // Convertion de ED, EM, EN en quantit? si besoin
|
||
409 | case Unite of |
||
410 | 1 : // ED (MJ/j) |
||
411 | Ingere := Quantite |
||
412 | / (PctAli1 / 100 * RecCC1.ED_T * RecCC1.MS / 1000 |
||
413 | + PctAli2 / 100 * RecCC2.ED_T * RecCC2.MS / 1000) ; |
||
414 | 2 : // EM (MJ/j) |
||
415 | Ingere := Quantite |
||
416 | / (PctAli1 / 100 * RecCC1.EM_T * RecCC1.MS / 1000 |
||
417 | + PctAli2 / 100 * RecCC2.EM_T * RecCC2.MS / 1000) ; |
||
418 | 3 : // EN (MJ/j) |
||
419 | Ingere := Quantite |
||
420 | / (PctAli1 / 100 * RecCC1.EN_T * RecCC1.MS / 1000 |
||
421 | + PctAli2 / 100 * RecCC2.EN_T * RecCC2.MS / 1000) ; |
||
422 | 4 : // MS (kg/j) |
||
423 | Ingere := Quantite |
||
424 | / (PctAli1 / 100 * RecCC1.MS / 1000 |
||
425 | + PctAli2 / 100 * RecCC2.MS / 1000) ; |
||
426 | else // Quantit? (kg/j) |
||
427 | Ingere := Quantite ; |
||
428 | end ;
|
||
429 | end ;
|
||
430 | // Sensibilit? (Quantit? d'aliment)
|
||
431 | if (Variable = 5) |
||
432 | and ((Cycle >= CycleInitVar) and (Cycle <= CycleFinVar)) |
||
433 | and ((StadeVar = 2) or (TypeStade = StadeVar)) |
||
434 | then
|
||
435 | Ingere := Ingere * Variation ; |
||
436 | PResSimulT.TabResult[11, PResSimulT.NbJSim] := Ingere ;
|
||
437 | // Calcul des apports journaliers
|
||
438 | IngSec1 := Ingere * PctAli1 / 100 * RecCC1.MS / 1000 ; |
||
439 | IngSec2 := Ingere * PctAli2 / 100 * RecCC2.MS / 1000 ; |
||
440 | IngereSec := IngSec1 + IngSec2 ; |
||
441 | PResSimulT.TabResult[12, PResSimulT.NbJSim] := IngereSec ;
|
||
442 | // Energie brute ing?r?e
|
||
443 | PResSimulT.TabResult[13, PResSimulT.NbJSim] := IngSec1 * RecCC1.EB
|
||
444 | + IngSec2 * RecCC2.EB ; |
||
445 | // Energie digestible ing?r?e
|
||
446 | PResSimulT.TabResult[71, PResSimulT.NbJSim] := IngSec1 * RecCC1.ED_T
|
||
447 | + IngSec2 * RecCC2.ED_T ; |
||
448 | // Energie m?tabolisable ing?r?e
|
||
449 | EMIng := IngSec1 * RecCC1.EM_T + IngSec2 * RecCC2.EM_T ; |
||
450 | PResSimulT.TabResult[72, PResSimulT.NbJSim] := EMIng ;
|
||
451 | // Energie nette ing?r?e
|
||
452 | PResSimulT.TabResult[73, PResSimulT.NbJSim] := IngSec1 * RecCC1.EN_T
|
||
453 | + IngSec2 * RecCC2.EN_T ; |
||
454 | // Sensibilit? (Acides amin?s)
|
||
455 | if (Variable > 5) |
||
456 | and ((Cycle >= CycleInitVar) and (Cycle <= CycleFinVar)) |
||
457 | and ((StadeVar = 2) or (TypeStade = StadeVar)) |
||
458 | then
|
||
459 | begin
|
||
460 | TabAAtotal1[Variable - 5] := TabAAtotal1[Variable - 5] * Variation ; |
||
461 | TabAAtotal2[Variable - 5] := TabAAtotal2[Variable - 5] * Variation ; |
||
462 | if (Variable = 8) or (Variable = 12) |
||
463 | then // met+cys ou phe+tyr |
||
464 | begin
|
||
465 | TabAAtotal1[Variable - 6] := TabAAtotal1[Variable - 6] * Variation ; |
||
466 | TabAAtotal2[Variable - 6] := TabAAtotal2[Variable - 6] * Variation ; |
||
467 | end ;
|
||
468 | end ;
|
||
469 | // Acides amin?s totaux ing?r?s
|
||
470 | for i:= 0 to 12 do |
||
471 | PResSimulT.TabResult[14 + i, PResSimulT.NbJSim] := IngSec1 * TabAAtotal1[i]
|
||
472 | + IngSec2 * TabAAtotal2[i] ; |
||
473 | // Acides amin?s digestibles ing?r?s
|
||
474 | for i := 0 to 12 do |
||
475 | TabAAdig[i] := IngSec1 * TabAAtotal1[i] * TabCUDAA1[i] / 100
|
||
476 | + IngSec2 * TabAAtotal2[i] * TabCUDAA2[i] / 100 ;
|
||
477 | for i := 0 to 12 do |
||
478 | PResSimulT.TabResult[27 + i, PResSimulT.NbJSim] := TabAAdig[i] ;
|
||
479 | ////////////////
|
||
480 | // Simulation //
|
||
481 | ////////////////
|
||
482 | // Logement
|
||
483 | repeat
|
||
484 | ok := TRUE ; |
||
485 | with RuleLoge[NumRuleLoge] do |
||
486 | if ModeFin = 0 |
||
487 | then // Dur?e |
||
488 | if Jour - RuleLogeInit >= ValFin then ok := FALSE ; |
||
489 | if not (ok) |
||
490 | then // Changement de r?gle |
||
491 | begin
|
||
492 | Inc (NumRuleLoge) ; |
||
493 | RuleLogeInit := Jour ; |
||
494 | end ;
|
||
495 | until ok ;
|
||
496 | PResSimulT.TabResult[6, PResSimulT.NbJSim] := NumRuleLoge ;
|
||
497 | with RuleLoge[NumRuleLoge] do |
||
498 | begin
|
||
499 | if (Sol = 1) |
||
500 | then // Paill? |
||
501 | Temperature := Temp + 3
|
||
502 | else
|
||
503 | Temperature := Temp ; |
||
504 | // Sensibilit? (Temp?rature ambiante)
|
||
505 | if (Variable = 3) |
||
506 | and ((Cycle >= CycleInitVar) and (Cycle <= CycleFinVar)) |
||
507 | and ((StadeVar = 2) or (TypeStade = StadeVar)) |
||
508 | then
|
||
509 | Temperature := Round (Temperature * Variation) ; |
||
510 | Activite := Act ; |
||
511 | // Sensibilit? (Temps debout)
|
||
512 | if (Variable = 4) |
||
513 | and ((Cycle >= CycleInitVar) and (Cycle <= CycleFinVar)) |
||
514 | and ((StadeVar = 2) or (TypeStade = StadeVar)) |
||
515 | then
|
||
516 | Activite := Round (Activite * Variation) ; |
||
517 | end ;
|
||
518 | PResSimulT.TabResult[56, PResSimulT.NbJSim] := Temperature ;
|
||
519 | PResSimulT.TabResult[57, PResSimulT.NbJSim] := Activite ;
|
||
520 | case TypeStade of |
||
521 | 0 : // Gestation |
||
522 | begin
|
||
523 | // Energie m?tabolisable entretien
|
||
524 | EMEnt := Power (PVVTot, 0.75) * EEGest * CoeffEntGest ;
|
||
525 | PResSimulT.TabResult[74, PResSimulT.NbJSim] := EMEnt ;
|
||
526 | // Energie m?tabolisable thermor?gulation
|
||
527 | if (RuleLoge[NumRuleLoge].Typ = 1) |
||
528 | then // Collectif |
||
529 | if Temperature < TCICol
|
||
530 | then
|
||
531 | EMThe := (TCICol - Temperature) * Power (PVVTot, 0.75) * EThCol / 1000 |
||
532 | else
|
||
533 | EMThe := 0
|
||
534 | else
|
||
535 | if Temperature < TCIInd
|
||
536 | then
|
||
537 | EMThe := (TCIInd - Temperature) * Power (PVVTot, 0.75) * EThInd / 1000 |
||
538 | else
|
||
539 | EMThe := 0 ;
|
||
540 | PResSimulT.TabResult[75, PResSimulT.NbJSim] := EMThe ;
|
||
541 | // Energie m?tabolisable activit?
|
||
542 | EMAct := 0.3 * Power (PVVTot, 0.75) * (Activite - 240) / 1000 ; |
||
543 | PResSimulT.TabResult[76, PResSimulT.NbJSim] := EMAct ;
|
||
544 | // Energie contenus ut?rins
|
||
545 | ENProdTot := Exp (11.72 - 8.62 * Exp (-0.01382 * Jour) + 0.0932 * NesTotaux) / 1000 ; |
||
546 | ENProdTot := ENProdTot * CorrPP ; // Correction
|
||
547 | ENProd := ENProdTot - ENProdCum ; |
||
548 | ENProdCum := ENProdTot ; |
||
549 | EMProd := ENProd / KU ; |
||
550 | PResSimulT.TabResult[77, PResSimulT.NbJSim] := EMProd ;
|
||
551 | // Poids contenus ut?rins
|
||
552 | PProdTot := Exp (8.621 - 21.02 * Exp (-0.05302 * Jour) + 0.1114 * NesTotaux) ; |
||
553 | PProdTot := PProdTot * CorrCu ; // Correction
|
||
554 | PProd := PProdTot - PProdCum ; |
||
555 | PProdCum := PProdTot ; |
||
556 | // Azote contenus ut?rins
|
||
557 | NRProdTot := Exp (8.09 - 8.71 * Exp (-0.01494 * Jour) + 0.0872 * NesTotaux) / 6.25 ; |
||
558 | NRProdTot := NRProdTot * CorrPP ; // Correction
|
||
559 | NRProd := NRProdTot - NRProdCum ; |
||
560 | NRProdCum := NRProdTot ; |
||
561 | // R?tention azot?e potentielle
|
||
562 | Case Cycle of |
||
563 | 1 : // Port?e 1 |
||
564 | CorrNR := 0.5708 ;
|
||
565 | 2 : // Port?e 2 |
||
566 | CorrNR := 0.4345 ;
|
||
567 | else
|
||
568 | CorrNR := 0.3664 ;
|
||
569 | end ;
|
||
570 | if (Jour < 98) |
||
571 | then
|
||
572 | CorrJ := Jour |
||
573 | else
|
||
574 | CorrJ := Jour - 6 / 16 * (Jour - 98) ; |
||
575 | NRPot := NRProd + CoeffNR * (-0.43 + 45.92 * (CorrJ / 100) - 105.35 * Power ((CorrJ / 100), 2) + 64.388 * Power ((CorrJ / 100), 3) + CorrNR * (EMIng - EMThe - EMEntInit)) * 0.85 ; |
||
576 | PResSimulT.TabResult[40, PResSimulT.NbJSim] := NRPot * 6.25 ; |
||
577 | // R?tention possible par les apports d'acides amin?s
|
||
578 | TeneurLysPot := (0.060 * NRProd + 0.070 * (NRPot - NRProd)) / NRPot ; |
||
579 | NRAA[0] := (TabAAdig[0] - (AAm75[0] * Power (PVTot, 0.75) + IngereSec * AAendogene[0])) * kAA[0] / AAbody[0] / 6.25 ; |
||
580 | NRAA[1] := (TabAAdig[1] - (AAm75[1] * Power (PVTot, 0.75) + IngereSec * AAendogene[1])) * KLysGest / TeneurLysPot / 6.25 ; |
||
581 | for i := 2 to 12 do |
||
582 | begin
|
||
583 | if ProtIdGest[i] = 0 |
||
584 | then
|
||
585 | EqLysd := 0
|
||
586 | else
|
||
587 | EqLysd := TabAAdig[i] * 100 / ProtIdGest[i] ;
|
||
588 | NRAA[i] := (EqLysd - (AAm75[i] * Power (PVTot, 0.75) + IngereSec * AAendogene[i])) * KLysGest / TeneurLysPot / 6.25 ; |
||
589 | end ;
|
||
590 | // met+cys
|
||
591 | if ProtIdGest[2] + ProtIdGest[3] = 0 |
||
592 | then
|
||
593 | EqLysd := 0
|
||
594 | else
|
||
595 | EqLysd := (TabAAdig[2] + TabAAdig[3]) * 100 / (ProtIdGest[2] + ProtIdGest[3]) ; |
||
596 | NRAA[13] := (EqLysd - ((AAm75[2] + AAm75[3]) * Power (PVTot, 0.75) + IngereSec * (AAendogene[2] + AAendogene[3]))) * KLysGest / TeneurLysPot / 6.25 ; |
||
597 | // phe+tyr
|
||
598 | if ProtIdGest[6] + ProtIdGest[7] = 0 |
||
599 | then
|
||
600 | EqLysd := 0
|
||
601 | else
|
||
602 | EqLysd := (TabAAdig[6] + TabAAdig[7]) * 100 / (ProtIdGest[6] + ProtIdGest[7]) ; |
||
603 | NRAA[14] := (EqLysd - ((AAm75[6] + AAm75[7]) * Power (PVTot, 0.75) + IngereSec * (AAendogene[6] + AAendogene[7]))) * KLysGest / TeneurLysPot / 6.25 ; |
||
604 | for i := 0 to 14 do |
||
605 | if NRAA[i] > 0 |
||
606 | then
|
||
607 | PResSimulT.TabResult[41 + i, PResSimulT.NbJSim] := NRAA[i] * 6.25 ; |
||
608 | // Premier facteur limitant le d?pot de prot?ines
|
||
609 | NRPotAA := NRAA[0] ;
|
||
610 | for i := 1 to 14 do |
||
611 | if (i <> 3) and (i <> 7) // Ignorer 'cys' et 'tyr' |
||
612 | then
|
||
613 | if (NRAA[i] > 0) and (NRAA[i] < NRPotAA) |
||
614 | then
|
||
615 | NRPotAA := NRAA[i] ; |
||
616 | // R?tention azot?e
|
||
617 | NR := Min (NRPot, NRPotAA) ; |
||
618 | // R?tention azot?e maternelle
|
||
619 | NRRes := NR - NRProd ; |
||
620 | // Energie retenue dans les tissus maternels et production de chaleur
|
||
621 | ENProt := NRRes * 6.25 * 23.8 / 1000 ; |
||
622 | EMProt := ENProt / KProt ; |
||
623 | EMLip := EMIng - EMEnt - EMThe - EMAct - EMProd - EMProt ; |
||
624 | if EMLip > 0 |
||
625 | then // D?p?t |
||
626 | begin
|
||
627 | ENLip := EMLip * KLip ; |
||
628 | Chaleur := EMEnt + EMThe + EMAct + EMProd * (1 - KU) + EMProt * (1 - KProt) + EMLip * (1 - KLip) ; |
||
629 | end
|
||
630 | else // Mobilisation |
||
631 | begin
|
||
632 | ENLip := (EMIng - EMEnt - EMThe - EMAct - EMProd - EMProt) / KResGest ; |
||
633 | Chaleur := EMEnt + EMThe + EMAct + EMProd * (1 - KU) + EMProt * (1 - KProt) - EMLip * (1 - KResGest); |
||
634 | end;
|
||
635 | PResSimulT.TabResult[70, PResSimulT.NbJSim] := Chaleur ;
|
||
636 | ENRes := ENProt + ENLip ; |
||
637 | ENResCum := ENResCum + ENRes ; |
||
638 | // Excr?tion azot?e
|
||
639 | NExcF := (MATIng - MATdIng) / 6.25 ;
|
||
640 | NExcU := (MATdIng / 6.25) - NR ;
|
||
641 | // D?p?ts de prot?ines et lipides
|
||
642 | PDNet := NRRes * 6.25 ;
|
||
643 | PResSimulT.TabResult[63, PResSimulT.NbJSim] := PDNet ;
|
||
644 | PDTot := NR * 6.25 ;
|
||
645 | PResSimulT.TabResult[64, PResSimulT.NbJSim] := PDTot ;
|
||
646 | LD := ENLip / 39.7 * 1000 ; |
||
647 | PResSimulT.TabResult[66, PResSimulT.NbJSim] := LD ;
|
||
648 | p := p + PDNet / 1000 ;
|
||
649 | l := l + LD / 1000 ;
|
||
650 | // Poids vif
|
||
651 | R1 := -((p - 2.28) * 45.94 + (ENResCum + 1024) * 0.333) / APN ; |
||
652 | R2 := -((p - 2.28) * 1.3311 + (l + 24.5) * 0.333) / BPN ; |
||
653 | PVVNet := (R1 + R2) / 2 ;
|
||
654 | PVVTot := PVVNet + PProdTot / 1000 ;
|
||
655 | PVTot := PVVTot / PV2PVV ; |
||
656 | PResSimulT.TabResult[59, PResSimulT.NbJSim] := PVTot
|
||
657 | - PResSimulT.TabResult[58, PResSimulT.NbJSim] ;
|
||
658 | PVNet := PVVNet / PV2PVV ; |
||
659 | PResSimulT.TabResult[61, PResSimulT.NbJSim] := PVNet
|
||
660 | - PResSimulT.TabResult[60, PResSimulT.NbJSim] ;
|
||
661 | // Epaisseur de lard dorsale
|
||
662 | R1 := ((p - 2.28) * 13.66 - (ENResCum + 1024) * 0.178) / APN ; |
||
663 | R2 := ((p - 2.28) * 0.221 - (l + 26.4) * 0.178) / BPN ; |
||
664 | P2 := (R1 + R2) / 2 ;
|
||
665 | PResSimulT.TabResult[68, PResSimulT.NbJSim] := P2
|
||
666 | - PResSimulT.TabResult[67, PResSimulT.NbJSim] ;
|
||
667 | end ;
|
||
668 | 1 : // Lactation |
||
669 | begin
|
||
670 | // Energie m?tabolisable entretien
|
||
671 | EMEnt := Power (PVVNet, 0.75) * EELact * CoeffEntLact ;
|
||
672 | PResSimulT.TabResult[74, PResSimulT.NbJSim] := EMEnt ;
|
||
673 | // Energie m?tabolisable thermor?gulation
|
||
674 | EMThe := 0 ;
|
||
675 | PResSimulT.TabResult[75, PResSimulT.NbJSim] := EMThe ;
|
||
676 | // Energie m?tabolisable activit?
|
||
677 | EMAct := 0 ;
|
||
678 | PResSimulT.TabResult[76, PResSimulT.NbJSim] := EMAct ;
|
||
679 | // Production d'?nergie dans le lait
|
||
680 | RA := 0.0000023096 * Power (Duree, 4) - 0.00027619 * Power (Duree, 3) + 0.012889 * Power (Duree, 2) - 0.28116 * Duree + 4.799 ; |
||
681 | ENProd := (20.6 * GMQPt * 1000 - 376 * Sevres) * RA * Exp (-0.025 * Jour) * Exp (-Exp (0.5 - 0.1 * Jour)) / 1000 ; |
||
682 | ENProdCum := ENPRodCum + ENProd ; |
||
683 | EMProd := ENProd / KL ; |
||
684 | PResSimulT.TabResult[77, PResSimulT.NbJSim] := EMProd ;
|
||
685 | // Production d'azote dans le lait
|
||
686 | NRProd := (0.0257 * GMQPt * 1000 + 0.42 * Sevres) * RA * Exp (-0.025 * Jour) * Exp (- Exp (0.5 - 0.1 * Jour)) ; |
||
687 | NRProdCum := NRProdCum + NRProd ; |
||
688 | PProd := NRProd * 6.38 / 50 ; |
||
689 | PResSimulT.TabResult[69, PResSimulT.NbJSim] := PProd ;
|
||
690 | PProdCum := PProdCum + PProd ; |
||
691 | PResSimulT.TabResult[40, PResSimulT.NbJSim] := NRProd * 6.38 ; |
||
692 | // R?tention possible par les apports d'acides amin?s
|
||
693 | PResSimulT.TabResult[41, PResSimulT.NbJSim] := (TabAAdig[0] - (AAm75[0] * Power (PVVTot, 0.75) + IngereSec * AAendogene[0])) * kAA[0] / AAbody[0] ; |
||
694 | NRAA[1] := -14.2 + 1.335 * TabAAdig[1] - 0.629 * NRProd ; |
||
695 | PResSimulT.TabResult[42, PResSimulT.NbJSim] := (-14.2 + 1.335 * TabAAdig[1]) / 0.629 * 6.25 ; |
||
696 | for i := 2 to 12 do |
||
697 | begin
|
||
698 | EqLysd := TabAAdig[i] * 100 / ProtIdLact[i] ;
|
||
699 | NRAA[i] := -14.2 + 1.335 * EqLysd - 0.629 * NRProd ; |
||
700 | if EqLysd > 0 |
||
701 | then
|
||
702 | PResSimulT.TabResult[41 + i, PResSimulT.NbJSim] := (-14.2 + 1.335 * EqLysd) / 0.629 * 6.25 ; |
||
703 | end ;
|
||
704 | // met+cys
|
||
705 | EqLysd := (TabAAdig[2] + TabAAdig[3]) * 100 / (ProtIdLact[2] + ProtIdLact[3]) ; |
||
706 | NRAA[13] := -14.2 + 1.335 * EqLysd - 0.629 * NRProd ; |
||
707 | if EqLysd > 0 |
||
708 | then
|
||
709 | PResSimulT.TabResult[54, PResSimulT.NbJSim] := (-14.2 + 1.335 * EqLysd) / 0.629 * 6.25 ; |
||
710 | // phe+tyr
|
||
711 | EqLysd := (TabAAdig[6] + TabAAdig[7]) * 100 / (ProtIdLact[6] + ProtIdLact[7]) ; |
||
712 | NRAA[14] := -14.2 + 1.335 * EqLysd - 0.629 * NRProd ; |
||
713 | if EqLysd > 0 |
||
714 | then
|
||
715 | PResSimulT.TabResult[55, PResSimulT.NbJSim] := (-14.2 + 1.335 * EqLysd) / 0.629 * 6.25 ; |
||
716 | // Premier facteur limitant le d?pot de prot?ines
|
||
717 | NR := NRAA[1] ;
|
||
718 | for i := 2 to 14 do |
||
719 | if (i <> 3) and (i <> 7) // Ignorer 'cys' et 'tyr' |
||
720 | then
|
||
721 | if NRAA[i] < NR
|
||
722 | then
|
||
723 | NR := NRAA[i] ; |
||
724 | // R?tention azot?e maternelle
|
||
725 | if NR > 0 |
||
726 | then
|
||
727 | NR := 0 ;
|
||
728 | // Mobilisation des r?serves ?nerg?tiques
|
||
729 | EMRes := EMIng - EMEnt - EMThe - EMAct - EMProd ; |
||
730 | if EMRes > 0 |
||
731 | then // D?p?t |
||
732 | begin
|
||
733 | ENRes := EMRes * KLip ; |
||
734 | ENProt := 0 ;
|
||
735 | ENLip := ENRes ; |
||
736 | Chaleur := EMEnt + EMThe + EMAct + EMProd * (1 - KL) + EMRes * (1 - KLip) |
||
737 | end
|
||
738 | else // Mobilisation |
||
739 | begin
|
||
740 | ENRes := EMRes * KL / KResL ; |
||
741 | ENProt := Min (NR * 6.25 * 23.8 / 1000, ENRes * (1 - RatioLP)) ; |
||
742 | ENLip := ENRes - ENProt ; |
||
743 | Chaleur := EMEnt + EMThe + EMAct + (EMProd + EMRes) * (1 - KL) - EMRes * KL / KResL * (1 - KResL) ; |
||
744 | end ;
|
||
745 | ENResCum := ENResCum + ENRes ; |
||
746 | PResSimulT.TabResult[70, PResSimulT.NbJSim] := Chaleur ;
|
||
747 | NRRes := ENProt / 6.25 / 23.8 * 1000 ; |
||
748 | // Excr?tion azot?e
|
||
749 | NExcF := (MATIng - MATdIng) / 6.25 ;
|
||
750 | NExcU := (MATdIng / 6.25) - NR - NRProd ;
|
||
751 | // D?p?ts de prot?ines et lipides
|
||
752 | PDNet := NRRes * 6.25 ;
|
||
753 | PResSimulT.TabResult[63, PResSimulT.NbJSim] := PDNet ;
|
||
754 | PDTot := NR * 6.25 ;
|
||
755 | PResSimulT.TabResult[64, PResSimulT.NbJSim] := PDTot ;
|
||
756 | LD := ENLip / 39.7 * 1000 ; |
||
757 | PResSimulT.TabResult[66, PResSimulT.NbJSim] := LD ;
|
||
758 | p := p + PDNet / 1000 ;
|
||
759 | l := l + LD / 1000 ;
|
||
760 | // Poids vif
|
||
761 | R1 := -((p - 2.28) * 45.94 + (ENResCum + 1024) * 0.333) / APN ; |
||
762 | R2 := -((p - 2.28) * 1.3311 + (l + 24.5) * 0.333) / BPN ; |
||
763 | PVVNet := (R1 + R2) / 2 ;
|
||
764 | PVVTot := PVVNet ; |
||
765 | PVTot := PVVTot / PV2PVV ; |
||
766 | PResSimulT.TabResult[59, PResSimulT.NbJSim] := PVTot
|
||
767 | - PResSimulT.TabResult[58, PResSimulT.NbJSim] ;
|
||
768 | PVNet := PVVNet / PV2PVV ; |
||
769 | PResSimulT.TabResult[61, PResSimulT.NbJSim] := PVNet
|
||
770 | - PResSimulT.TabResult[60, PResSimulT.NbJSim] ;
|
||
771 | // Epaisseur de lard dorsale
|
||
772 | R1 := ((p - 2.28) * 13.66 - (ENResCum + 1024) * 0.178) / APN ; |
||
773 | R2 := ((p - 2.28) * 0.221 - (l + 26.4) * 0.178) / BPN ; |
||
774 | P2 := (R1 + R2) / 2 ;
|
||
775 | PResSimulT.TabResult[68, PResSimulT.NbJSim] := P2
|
||
776 | - PResSimulT.TabResult[67, PResSimulT.NbJSim] ;
|
||
777 | end ;
|
||
778 | else // ISSF |
||
779 | begin
|
||
780 | // Energie m?tabolisable entretien
|
||
781 | EMEnt := Power (PVVTot, 0.75) * EEGest * CoeffEntGest ;
|
||
782 | PResSimulT.TabResult[74, PResSimulT.NbJSim] := EMEnt ;
|
||
783 | // Energie m?tabolisable thermor?gulation
|
||
784 | case RuleLoge[NumRuleLoge].Typ of |
||
785 | 0 : // Logement individuel |
||
786 | if Temperature < TCIInd
|
||
787 | then
|
||
788 | EMThe := (TCIInd - Temperature) * Power (PVVTot, 0.75) * EThInd / 1000 |
||
789 | else
|
||
790 | EMThe := 0 ;
|
||
791 | 1 : // Logement Collectif |
||
792 | if Temperature < TCICol
|
||
793 | then
|
||
794 | EMThe := (TCICol - Temperature) * Power (PVVTot, 0.75) * EThCol / 1000 |
||
795 | else
|
||
796 | EMThe := 0 ;
|
||
797 | else
|
||
798 | EMThe := 0 ;
|
||
799 | end ;
|
||
800 | PResSimulT.TabResult[75, PResSimulT.NbJSim] := EMThe ;
|
||
801 | // Energie m?tabolisable acivit?
|
||
802 | EMAct := 0.3 * Power (PVVTot, 0.75) * (Activite - 240) / 1000 ; |
||
803 | PResSimulT.TabResult[76, PResSimulT.NbJSim] := EMAct ;
|
||
804 | // R?tention azot?e potentielle
|
||
805 | Case Cycle of |
||
806 | 1 : // Port?e 1 |
||
807 | CorrNR := 0.5708 ;
|
||
808 | 2 : // Port?e 2 |
||
809 | CorrNR := 0.4345 ;
|
||
810 | else
|
||
811 | CorrNR := 0.3664 ;
|
||
812 | end;
|
||
813 | if (Jour < 98) |
||
814 | then
|
||
815 | CorrJ := Jour |
||
816 | else
|
||
817 | CorrJ := Jour - 6 / 16 * (Jour - 98) ; |
||
818 | NRPot := (-0.43 + 45.92 * (CorrJ / 100) - 105.35 * Power ((CorrJ / 100), 2) + 64.388 * Power ((CorrJ / 100), 3) + CorrNR * (EMIng - EMThe - EMEntInit)) * 0.85 ; |
||
819 | PResSimulT.TabResult[40, PResSimulT.NbJSim] := NRPot * 6.25 ; |
||
820 | // R?tention possible par les apports d'acides amin?s
|
||
821 | NRAA[0] := (TabAAdig[0] - (AAm75[0] * Power (PVVTot, 0.75) + IngereSec * AAendogene[0])) * kAA[0] / AAbody[0] / 6.25 ; |
||
822 | NRAA[1] := (TabAAdig[1] - 0.036 * Power (PVVTot, 0.75)) * KLysGest / 0.065 / 6.25 ; |
||
823 | for i := 2 to 12 do |
||
824 | begin
|
||
825 | if ProtIdGest[i] = 0 |
||
826 | then
|
||
827 | EqLysd := 0
|
||
828 | else
|
||
829 | EqLysd := TabAAdig[i] * 100 / ProtIdGest[i] ;
|
||
830 | NRAA[i] := (EqLysd - 0.036 * Power (PVVTot, 0.75)) * KLysGest / 0.065 / 6.25 ; |
||
831 | end ;
|
||
832 | // met+cys
|
||
833 | if ProtIdGest[2] + ProtIdGest[3] = 0 |
||
834 | then
|
||
835 | EqLysd := 0
|
||
836 | else
|
||
837 | EqLysd := (TabAAdig[2] + TabAAdig[3]) * 100 / (ProtIdGest[2] + ProtIdGest[3]) ; |
||
838 | NRAA[13] := (EqLysd - 0.036 * Power (PVVTot, 0.75)) * KLysGest / 0.065 / 6.25 ; |
||
839 | // phe+tyr
|
||
840 | if ProtIdGest[6] + ProtIdGest[7] = 0 |
||
841 | then
|
||
842 | EqLysd := 0
|
||
843 | else
|
||
844 | EqLysd := (TabAAdig[6] + TabAAdig[7]) * 100 / (ProtIdGest[6] + ProtIdGest[7]) ; |
||
845 | NRAA[14] := (EqLysd - 0.036 * Power (PVVTot, 0.75)) * KLysGest / 0.065 / 6.25 ; |
||
846 | for i := 0 to 14 do |
||
847 | if NRAA[i] > 0 |
||
848 | then
|
||
849 | PResSimulT.TabResult[41 + i, PResSimulT.NbJSim] := NRAA[i] * 6.25 ; |
||
850 | // Premier facteur limitant le d?pot de prot?ines
|
||
851 | NRPotAA := NRAA[0] ;
|
||
852 | for i := 1 to 14 do |
||
853 | if (i <> 3) and (i <> 7) // Ignorer 'cys' et 'tyr' |
||
854 | then
|
||
855 | if (NRAA[i] > 0) and (NRAA[i] < NRPotAA) |
||
856 | then
|
||
857 | NRPotAA := NRAA[i] ; |
||
858 | // R?tention azot?e
|
||
859 | NR := Min (NRPot, NRPotAA) ; |
||
860 | // R?tention azot?e maternelle
|
||
861 | NRRes := NR ; |
||
862 | // Energie retenue dans les tissus maternels et production de chaleur
|
||
863 | ENProt := NRRes * 6.25 * 23.8 / 1000 ; |
||
864 | EMProt := ENProt / KProt ; |
||
865 | EMLip := EMIng - EMEnt - EMThe - EMAct - EMProt ; |
||
866 | if EMLip > 0 |
||
867 | then
|
||
868 | begin
|
||
869 | ENLip := EMLip * KLip ; |
||
870 | Chaleur := EMEnt + EMThe + EMAct + EMProt * (1 - KProt) + EMLip * (1 - KLip) ; |
||
871 | end
|
||
872 | else
|
||
873 | begin
|
||
874 | ENLip := (EMIng - EMEnt - EMThe - EMAct - EMProt) / KResGest ; |
||
875 | Chaleur := EMEnt + EMThe + EMAct + EMProt * (1 - KProt) - EMLip * (1 - KResGest); |
||
876 | end;
|
||
877 | PResSimulT.TabResult[70, PResSimulT.NbJSim] := Chaleur ;
|
||
878 | ENRes := ENProt + ENLip ; |
||
879 | ENResCum := ENResCum + ENRes ; |
||
880 | // Excr?tion azot?e
|
||
881 | NExcF := (MATIng - MATdIng) / 6.25 ;
|
||
882 | NExcU := (MATdIng / 6.25) - NR ;
|
||
883 | // D?p?ts de prot?ines et lipides
|
||
884 | PDNet := NRRes * 6.25 ;
|
||
885 | PResSimulT.TabResult[63, PResSimulT.NbJSim] := PDNet ;
|
||
886 | PDTot := NR * 6.25 ;
|
||
887 | PResSimulT.TabResult[64, PResSimulT.NbJSim] := PDTot ;
|
||
888 | LD := ENLip / 39.7 * 1000 ; |
||
889 | PResSimulT.TabResult[66, PResSimulT.NbJSim] := LD ;
|
||
890 | p := p + PDNet / 1000 ;
|
||
891 | l := l + LD / 1000 ;
|
||
892 | // Poids vif
|
||
893 | R1 := -((p - 2.28) * 45.94 + (ENResCum + 1024) * 0.333) / APN ; |
||
894 | R2 := -((p - 2.28) * 1.3311 + (l + 24.5) * 0.333) / BPN ; |
||
895 | PVVNet := (R1 + R2) / 2 ;
|
||
896 | PVVTot := PVVNet ; |
||
897 | PVTot := PVVTot / PV2PVV ; |
||
898 | PResSimulT.TabResult[59, PResSimulT.NbJSim] := PVTot
|
||
899 | - PResSimulT.TabResult[58, PResSimulT.NbJSim] ;
|
||
900 | PVNet := PVVNet / PV2PVV ; |
||
901 | PResSimulT.TabResult[61, PResSimulT.NbJSim] := PVNet
|
||
902 | - PResSimulT.TabResult[60, PResSimulT.NbJSim] ;
|
||
903 | // Epaisseur de lard dorsale
|
||
904 | R1 := ((p - 2.28) * 13.66 - (ENResCum + 1024) * 0.178) / APN ; |
||
905 | R2 := ((p - 2.28) * 0.221 - (l + 26.4) * 0.178) / BPN ; |
||
906 | P2 := (R1 + R2) / 2 ;
|
||
907 | PResSimulT.TabResult[68, PResSimulT.NbJSim] := P2
|
||
908 | - PResSimulT.TabResult[67, PResSimulT.NbJSim] ;
|
||
909 | end ;
|
||
910 | end ;
|
||
911 | Inc (Age) ; |
||
912 | end ; // Fin boucle jours |
||
913 | if TypeStade = 0 |
||
914 | then // Gestation |
||
915 | PVTot := PVNet ; // Mise bas
|
||
916 | end ; // Fin boucle stades |
||
917 | end ;
|
||
918 | |||
919 | end. |