root / UVariables.pas @ 3
Historique | Voir | Annoter | Télécharger (21,47 ko)
1 | 3 | avalancogn | unit UVariables;
|
---|---|---|---|
2 | |||
3 | interface
|
||
4 | |||
5 | uses
|
||
6 | Classes, SysUtils, Graphics, Registry, IniFiles; |
||
7 | |||
8 | const
|
||
9 | //URL = 'http://w3.rennes.inra.fr/inraporc/';
|
||
10 | URL_HTTPS = 'https://inraporc.inra.fr/inraporc/';
|
||
11 | clPink = TColor($FF80FF);
|
||
12 | MILLI = 1E-03;
|
||
13 | MICRO = 1E-06;
|
||
14 | NANO = 1E-09;
|
||
15 | PICO = 1E-12;
|
||
16 | INFINI = 1E99;
|
||
17 | MAX_MP = 50;
|
||
18 | NB_CYCLES = 8;
|
||
19 | NB_COL_TRUIE = 78;
|
||
20 | MAX_LIG_TRUIE = 1500;
|
||
21 | NB_COL_PORC = 113;
|
||
22 | MAX_LIG_PORC = 1000;
|
||
23 | MAX_RULE = 10;
|
||
24 | DefaultCoefNR: array[1..NB_CYCLES] of double = (1.11, 1.11, 1.03, 0.77, 0.60, |
||
25 | 0.41, 0.38, 0.31); |
||
26 | // Valeurs et coeficients ?nergetiques
|
||
27 | // MAT, Lip, Amidon, Sucres, CB, Residu
|
||
28 | // EB, ED, EM, EM/ED, EN/EM, EN
|
||
29 | ValEnergie: array[1..6, 1..6] of double = ( |
||
30 | (22.64, 23.31, 20.34, 0, 0, 12.08), |
||
31 | (38.76, 39.00, 39.00, 1, 35.01 / 39.00, 35.01), |
||
32 | (17.54, 17.45, 17.45, 1, 14.32 / 17.45, 14.32), |
||
33 | (16.71, 16.62, 16.62, 1, 11.94 / 16.62, 11.94), |
||
34 | (18.58, 16.61, 15.51, 15.51 / 16.61, 8.64 / 15.51, 8.64), |
||
35 | (18.58, 16.61, 15.51, 15.51 / 16.61, 8.64 / 15.51, 8.64)); |
||
36 | // Coefficients li?s au poids de carcasse
|
||
37 | aPVV = 0.8901791;
|
||
38 | bPVV = 1.0142019;
|
||
39 | aTPQ = 0.20693514;
|
||
40 | bTPQ = 0.77847131;
|
||
41 | TeteTPQ = 0.76138234;
|
||
42 | PiedsTPQ = 0.22435546;
|
||
43 | QueueTPQ = 1 - TeteTPQ - PiedsTPQ;
|
||
44 | aLangue = 0.005;
|
||
45 | aHampe = 0.0026859;
|
||
46 | bHampe = 1.06955354;
|
||
47 | aPanne = 0.00056132;
|
||
48 | bPanne = 1.68632852;
|
||
49 | bCarcasse = 1.058788;
|
||
50 | // Coefficient pour passer du poids vif au poids vif vide
|
||
51 | PV2PVV = 0.95;
|
||
52 | // Coefficient pour passer du poids vif vide au poids de prot?ines
|
||
53 | // PVV2Prot = 0.16 ;
|
||
54 | // Coefficient pour passer du poids vif au poids de prot?ines
|
||
55 | // PV2Prot = PV2PVV * PVV2Prot ;
|
||
56 | // PORC CROISSANCE
|
||
57 | Pallom = 8.7845;
|
||
58 | Lallom = 1.2566;
|
||
59 | Ballom = 0.94406;
|
||
60 | kProtJaap = 0.52;
|
||
61 | GEProtJaap = 23.8; |
||
62 | varUrinEloss = 31.1; |
||
63 | NEact60h = 150 / 2.9; |
||
64 | NEPD = 0.484;
|
||
65 | FHPint = 436.47; |
||
66 | FHPpente = 0.1298 / 0.74; |
||
67 | kBR = 0.616 * 1.15; |
||
68 | // Caract?ristique endog?ne AA pour calcul CUD apparent
|
||
69 | AAendogene: array[0..12] of double = (8.5167, 0.3133, 0.0867, 0.1400, 0.1167, |
||
70 | 0.3300, 0.2733, 0.2233, 0.4267, 0.2567, 0.3567, 0.1300, 0.2800); |
||
71 | // Besoin en AA pour l'entretien (turnover + peau)
|
||
72 | AAm75: array[0..12] of double = (0.3611 + 0.1044, 0.0239 + 0.0045, |
||
73 | 0.0070 + 0.0010, 0.0047 + 0.0047, 0.0035 + 0.0009, 0.0138 + 0.0033, |
||
74 | 0.0137 + 0.0030, 0.0090 + 0.0019, 0.0271 + 0.0053, 0.0124 + 0.0025, |
||
75 | 0.0164 + 0.0038, 0.0102 + 0.0013, 0.000 + 0.000); |
||
76 | // Rendement d'utilisation des AA
|
||
77 | kAA: array[0..12] of double = (0.85, 0.72, 0.64, 0.37, 0.57, 0.61, 0.82, |
||
78 | 0.67, 0.76, 0.67, 0.71, 0.93, 1.54); |
||
79 | // Composition des prot?ines corporelles
|
||
80 | AAbody: array[0..12] of double = (1, 0.0696, 0.0188, 0.0103, 0.0095, 0.0370, |
||
81 | 0.0378, 0.0286, 0.0717, 0.0346, 0.0467, 0.0279, 0.0626); |
||
82 | // TRUIE REPRODUCTRICE
|
||
83 | DureeGest = 114;
|
||
84 | EEGest = 0.440; // Entretien gestation (MJ/kg^0.75) |
||
85 | EELact = 0.440; // Entretien lactation (MJ/kg^0.75) |
||
86 | TCIInd = 20; // Temp?rature critique individuel (?C) |
||
87 | TCICol = 15; // Temp?rature critique collectif (?C) |
||
88 | EThInd = 16.5; // Thermor?gulation individuel (kJ/kg^0.75/?C) |
||
89 | EThCol = 9.0; // Thermor?gulation collectif (kJ/kg^0.75/?C) |
||
90 | KU = 0.5; // Efficacit? ?nergie ut?rus |
||
91 | KProt = 0.6; // Efficacit? ?nergie prot?ines |
||
92 | KLip = 0.8; // Efficacit? ?nergie lipides |
||
93 | KGest = 0.77; // Efficacit? moyenne gestation |
||
94 | KL = 0.72; // Efficacit? ?nergie lait |
||
95 | KResL = 0.87; // Efficacit? ?nergie r?serves lait |
||
96 | KResGest = 0.9; // Efficacit? ?nergie r?serves gestation |
||
97 | KLysGest = 0.68; // Efficacit? lysine gestation |
||
98 | KLysLact = 0.77; // Efficacit? lysine lactation |
||
99 | LysEnt = 0.036; // Lysine entretien (g/kg^0.75) |
||
100 | ECU = 5.43; // Energie contenus ut?rins (MJ/(kg porcelets)) |
||
101 | APN = -0.333 * 13.66 - 45.94 * 0.178; |
||
102 | BPN = -0.333 * 0.221 - 1.331 * 0.178; |
||
103 | // lys, met, cys, trp, thr, phe, tyr, leu, ile, val, hst, arg
|
||
104 | ProtIdGest: array[1..12] of double = |
||
105 | (100, 28, 37, 20, 72, 60, 40, 100, 65, 75, 30, 0); |
||
106 | ProtIdLact: array[1..12] of double = |
||
107 | (100, 30, 30, 19, 66, 60, 55, 105, 60, 85, 40, 67); |
||
108 | ProtIdEnt: array[1..12] of double = |
||
109 | (100, 25, 114, 31, 147, 50, 53, 64, 44, 55, 0, 0); |
||
110 | ProtIdRet: array[1..12] of double = |
||
111 | (100, 24.9, 22.5, 15, 58, 60.7, 36.1, 102.1, 50.3, 71.6, 35.4, 103.7); |
||
112 | ProtIdLait: array[1..12] of double = |
||
113 | (100, 26, 21, 17, 59, 54, 58, 116, 53, 73, 43, 66); |
||
114 | // Param?tres c et d de la fonction Gamma
|
||
115 | cGammaFrais = 0.075;
|
||
116 | cGammaMS = 0.066;
|
||
117 | cGammaED = 1.04;
|
||
118 | cGammaEM = 1.00;
|
||
119 | cGammaEN = 0.75;
|
||
120 | dGamma = 0.60;
|
||
121 | |||
122 | type
|
||
123 | // Composition chimique
|
||
124 | CompositionChimique = record
|
||
125 | // Composition ?l?mentaire
|
||
126 | MS, MM, MO, Lip, MAT, Amidon, Sucres, |
||
127 | // CUD Truie / Croissance
|
||
128 | dMO_T, dMO_C, dLip_T, dLip_C, dMAT_T, dMAT_C, |
||
129 | // Energie
|
||
130 | EB, ED_T, ED_C, EM_T, EM_C, EN_T, EN_C, |
||
131 | // Min?raux
|
||
132 | Ca, P, Na, K, Cl, Mg, Cu, Zn, Fe, Mn, S, Se, Co, Mb, I, |
||
133 | Phytase, ActPhytE, ActPhytM, PdigG, PdigF, |
||
134 | // Acides gras
|
||
135 | C6C8C10, C12_0, C14_0, C16_0, C16_1, C18_0, C18_1, C18_2, C18_3, C18_4, |
||
136 | C20_0, C20_1, C20_4, C20_5, C22_0, C22_1, C22_5, C22_6, C24_0, |
||
137 | AGsLip, |
||
138 | // Fibres
|
||
139 | CB, dCB_T, dCB_C, Residu, dResidu_T, dResidu_C, |
||
140 | NDF, ADF, ADL, Parois: double; |
||
141 | end;
|
||
142 | // Composition en mati?res premi?res
|
||
143 | CompositionMatiere = record
|
||
144 | NbMat: integer; |
||
145 | NumMat: array[0..MAX_MP] of integer; |
||
146 | Qte, MS: array[0..MAX_MP] of double; |
||
147 | end;
|
||
148 | // Mati?re premi?re
|
||
149 | RecMatiere = record
|
||
150 | Num: integer; |
||
151 | Nom: string[35]; |
||
152 | Memo: string[255]; // Commentaires |
||
153 | Typ: integer; // 0=NonRenseign?, ..., 9=NonR?f?renc?
|
||
154 | CC: CompositionChimique; |
||
155 | AAtotal, CUDAA: array[0..12] of double; |
||
156 | end;
|
||
157 | PRecMatiere = ^RecMatiere; |
||
158 | // Aliment
|
||
159 | RecAliment = record
|
||
160 | Num: integer; |
||
161 | Nom: string[35]; |
||
162 | Memo: string[255]; // Commentaires |
||
163 | Typ: integer; // 0=NonRenseign?, 1=PorcCroissance, 2=Truie
|
||
164 | Presentation: integer; // 0=Granul?s, 1=Farine
|
||
165 | Prix: double; |
||
166 | MP: CompositionMatiere; |
||
167 | CC: CompositionChimique; |
||
168 | AAtotal, CUDAA: array[0..12] of double; |
||
169 | end;
|
||
170 | PRecAliment = ^RecAliment; |
||
171 | // Import / export
|
||
172 | RecCSV = record
|
||
173 | Nom: string;
|
||
174 | Memo: string[255]; // Commentaires |
||
175 | Typ: integer; // <10=Mati?re premi?re (Type), >9=Aliment (Type, Pr?sentation)
|
||
176 | CC: CompositionChimique; |
||
177 | AAtotal, CUDAA: array[0..12] of double; |
||
178 | end;
|
||
179 | PRecCSV = ^RecCSV; |
||
180 | // S?quence alimentaire truie reproductrice
|
||
181 | RecRuleSeqAliT = record
|
||
182 | ModeFin: integer; // -1=Fin, 0=Dur?e
|
||
183 | ValFin: integer; |
||
184 | NumAli1, NumAli2: integer; |
||
185 | PctAli1Init, PctAli1Fin: integer; |
||
186 | end;
|
||
187 | |||
188 | RecSeqAliT = record
|
||
189 | Num: integer; |
||
190 | Nom: string[25]; |
||
191 | Memo: string[255]; // Commentaires |
||
192 | NbRuleGest: integer; |
||
193 | RuleGest: array[1..MAX_RULE] of RecRuleSeqAliT; |
||
194 | NbRuleLact: integer; |
||
195 | RuleLact: array[1..MAX_RULE] of RecRuleSeqAliT; |
||
196 | NbRuleISSF: integer; |
||
197 | RuleISSF: array[1..MAX_RULE] of RecRuleSeqAliT; |
||
198 | end;
|
||
199 | PRecSeqAliT = ^RecSeqAliT; |
||
200 | // Plan de rationnement truie reproductrice
|
||
201 | RecRuleRationT = record
|
||
202 | ModeFin: integer; // -1=Fin, 0=Dur?e
|
||
203 | ValFin: integer; |
||
204 | Equation: integer; // 0=Constant, 1=Lin?aire, 2=Curvilin?aire 3=Lin?aire-plateau
|
||
205 | a, b, c: double; |
||
206 | d: integer; |
||
207 | end;
|
||
208 | |||
209 | RecRationT = record
|
||
210 | Num: integer; |
||
211 | Nom: string[25]; |
||
212 | Memo: string[255]; // Commentaires |
||
213 | NbRuleGest: integer; |
||
214 | RuleGest: array[1..MAX_RULE] of RecRuleRationT; |
||
215 | UniteGest: integer; // 0=Quantit?, 1=ED, 2=EM, 3=EN, 4=MS
|
||
216 | NbRuleLact: integer; |
||
217 | RuleLact: array[1..MAX_RULE] of RecRuleRationT; |
||
218 | UniteLact: integer; // 0=Quantit?, 1=ED, 2=EM, 3=EN, 4=MS
|
||
219 | NbRuleISSF: integer; |
||
220 | RuleISSF: array[1..MAX_RULE] of RecRuleRationT; |
||
221 | UniteISSF: integer; // 0=Quantit?, 1=ED, 2=EM, 3=EN, 4=MS
|
||
222 | end;
|
||
223 | PRecRationT = ^RecRationT; |
||
224 | TabCycle = array[1..NB_CYCLES] of integer; |
||
225 | // Logement truie reproductrice
|
||
226 | RecRuleLogeT = record
|
||
227 | ModeFin: integer; // -1=Fin, 0=Dur?e
|
||
228 | ValFin: integer; |
||
229 | Typ, Sol, Temp, Act: integer; |
||
230 | end;
|
||
231 | |||
232 | RecLogeT = record
|
||
233 | Num: integer; |
||
234 | Nom: string[25]; |
||
235 | Memo: string[255]; // Commentaires |
||
236 | NbRuleGest: integer; |
||
237 | RuleGest: array[1..MAX_RULE] of RecRuleLogeT; |
||
238 | NbRuleLact: integer; |
||
239 | RuleLact: array[1..MAX_RULE] of RecRuleLogeT; |
||
240 | NbRuleISSF: integer; |
||
241 | RuleISSF: array[1..MAX_RULE] of RecRuleLogeT; |
||
242 | end;
|
||
243 | PRecLogeT = ^RecLogeT; |
||
244 | // Performances truies (Truie)
|
||
245 | RecTruies = record
|
||
246 | Nombre: integer; |
||
247 | AgeSail: integer; |
||
248 | PdsSail, P2Sail: double; |
||
249 | PdsAvMB, PdsApMB, P2MB: double; |
||
250 | end;
|
||
251 | // Performances truies (Porcelets)
|
||
252 | RecPorcelets = record
|
||
253 | NesTotaux, NesVivants, Sevres: double; |
||
254 | PdsNais, PdsSev: double; |
||
255 | end;
|
||
256 | // Profil truie reproductrice
|
||
257 | RecProfilT = record
|
||
258 | Num: integer; |
||
259 | Nom: string[25]; |
||
260 | Memo: string[255]; // Commentaires |
||
261 | Truies: array[1..NB_CYCLES] of RecTruies; |
||
262 | Porcelets: array[1..NB_CYCLES] of RecPorcelets; |
||
263 | SeqAli: integer; |
||
264 | Unite: integer; // 0=Quantit?, 1=ED, 2=EM, 3=EN, 4=MS
|
||
265 | Gest, Lact: array[1..NB_CYCLES] of double; |
||
266 | Loge: integer; |
||
267 | DureeLact: integer; |
||
268 | CoefEntretienGest, CoefEntretienLact, RatioLipProt: double; |
||
269 | CoefNR: array[1..NB_CYCLES] of double; |
||
270 | // GTTT (aide ? la saisie)
|
||
271 | NbTruies, AgeMB1: integer; |
||
272 | ISO: double; |
||
273 | PVSail1, PVAdulte, PertePVPrim, PertePVMult: double; |
||
274 | P2Sail1, P2Objectif, PerteP2Prim, PerteP2Mult: double; |
||
275 | NbVifs, NbMorts, NbSevres: double; |
||
276 | AgeSevr: integer; |
||
277 | PVNais, PVSevr: double; |
||
278 | ConsoLact, ConsoGest: double; |
||
279 | // Ajustement du poids apr?s mise-bas
|
||
280 | pmax, a, b: double; |
||
281 | end;
|
||
282 | PRecProfilT = ^RecProfilT; |
||
283 | // Simulation truie reproductrice
|
||
284 | RecSimulT = record
|
||
285 | Num: integer; |
||
286 | Nom: string[25]; |
||
287 | Memo: string[255]; // Commentaires |
||
288 | Profil, Logement: integer; |
||
289 | DureeLact, DureeISSF: integer; // Conduite (DureeISSF n'est plus utilis?)
|
||
290 | OptInit: integer; // Option de r?initialisation (PV et P2)
|
||
291 | StadeInit, StadeFin: integer; |
||
292 | SeqAli, Ration: array[1..NB_CYCLES] of integer; |
||
293 | end;
|
||
294 | PRecSimulT = ^RecSimulT; |
||
295 | // R?sultats de simulation truie reproductrice
|
||
296 | TabResSimulT = record
|
||
297 | TabResult: array[1..NB_COL_TRUIE, 1..MAX_LIG_TRUIE] of double; |
||
298 | NbJSim: integer; |
||
299 | end;
|
||
300 | PTabResSimulT = ^TabResSimulT; |
||
301 | |||
302 | RecTabSimulT = record
|
||
303 | Ok: boolean; |
||
304 | Simul: integer; |
||
305 | Variation: double; |
||
306 | Result: PTabResSimulT; |
||
307 | end;
|
||
308 | // S?quence alimentaire porc croissance
|
||
309 | RecRuleSeqAliP = record
|
||
310 | ModeFin: integer; // -1=Fin, 0=Dur?e, 1=Age, 2=PoidsVif, 3=CumulAliment
|
||
311 | ValFin: double; |
||
312 | NumAli1, NumAli2: integer; |
||
313 | PctAli1Init, PctAli1Fin: integer; |
||
314 | end;
|
||
315 | |||
316 | RecSeqAliP = record
|
||
317 | Num: integer; |
||
318 | Nom: string[25]; |
||
319 | Memo: string[255]; // Commentaires |
||
320 | NbRule: integer; |
||
321 | Rule: array[1..MAX_RULE] of RecRuleSeqAliP; |
||
322 | end;
|
||
323 | PRecSeqAliP = ^RecSeqAliP; |
||
324 | // Plan de rationnement porc croissance
|
||
325 | RecRuleRationPold = record
|
||
326 | ModeFin: integer; |
||
327 | // -1=Fin, 0=Dur?e, 1=Age, 2=PoidsVif, 3=CumulAliment, 4-8=Consommation (Aliment, MS, ED, EM, EN)
|
||
328 | ValFin: double; |
||
329 | Unite: integer; // 0=Quantit?, 1=ED, 2=EM, 3=EN, 4=MS
|
||
330 | Equation: integer; |
||
331 | // 0=AdLib, 1=Constant, 2=f(PV), 3=a+b*PV, 4=a*PV^b, 5=a*(1-exp(-b*PV)), 6=f(dur?e), 7=a+b*dur?e, 8=a+b*dur?e(step), 9=%AdLib
|
||
332 | a, b: double; |
||
333 | end;
|
||
334 | |||
335 | RecRationPold = record
|
||
336 | Num: integer; |
||
337 | Nom: string[25]; |
||
338 | Memo: string[255]; // Commentaires |
||
339 | NbRule: integer; |
||
340 | Rule: array[1..MAX_RULE] of RecRuleRationPold; |
||
341 | end;
|
||
342 | PRecRationPold = ^RecRationPold; |
||
343 | |||
344 | RecRuleRationP = record
|
||
345 | ModeFin: integer; |
||
346 | // -1=Fin, 0=Dur?e, 1=Age, 2=PoidsVif, 3=CumulAliment, 4-8=Consommation (Aliment, MS, ED, EM, EN)
|
||
347 | ValFin: double; |
||
348 | Gaspillage: double; |
||
349 | RuleType: integer; // 0=%AdLib, 1=Constant, 2=f(PV), 3=f(dur?e)
|
||
350 | Unite: integer; // 0=Quantit?, 1=ED, 2=EM, 3=EN, 4=MS
|
||
351 | EqDuree: integer; // f(dur?e): 0=a+b*jour, 1=a+b*semaine
|
||
352 | EqPV: integer; // f(PV): 0=a+b*PV, 1=a*PV^b, 2=a*(1-exp(-b*PV))
|
||
353 | Percent, Quantity, aDuree, bDuree, aPV, bPV: double; |
||
354 | end;
|
||
355 | |||
356 | RecRationP = record
|
||
357 | Num: integer; |
||
358 | Nom: string[25]; |
||
359 | Memo: string[255]; // Commentaires |
||
360 | NbRule: integer; |
||
361 | Rule: array[1..MAX_RULE] of RecRuleRationP; |
||
362 | end;
|
||
363 | PRecRationP = ^RecRationP; |
||
364 | // Profil porc croissance
|
||
365 | RecProfilPold = record
|
||
366 | Num: integer; |
||
367 | Nom: string[25]; |
||
368 | Memo: string[255]; // Commentaires |
||
369 | SeqAli: integer; |
||
370 | Unite: integer; // 0=Quantit?, 1=ED, 2=EM, 3=EN, 4=MS
|
||
371 | Equation: integer; // 0=a+b*PV, 1=a*PV^b, 2=a*(1-exp(-b*PV))
|
||
372 | a, b: double; |
||
373 | AgeInit: integer; |
||
374 | PVInit: double; |
||
375 | ProtInit: double; |
||
376 | LipInit: double; |
||
377 | ModeFin: integer; // 0=Duree, 1=Poids vif
|
||
378 | Duree: integer; |
||
379 | PVFin: double; |
||
380 | Carcasse: double; // Rendement carcasse
|
||
381 | PDMoy: double; |
||
382 | BGompertz: double; // Comportement
|
||
383 | Entretien: double; |
||
384 | PVmr2: double; |
||
385 | end;
|
||
386 | PRecProfilPold = ^RecProfilPold; |
||
387 | |||
388 | RecProfilP = record
|
||
389 | Num: integer; |
||
390 | Nom: string[25]; |
||
391 | Memo: string[255]; // Commentaires |
||
392 | Sexe: integer; // 0=Castr?, 1=Femelle, 2=M?le, 3=Mixte
|
||
393 | SeqAli, Ration: integer; |
||
394 | AgeInit: integer; |
||
395 | PVInit: double; |
||
396 | ProtInit: double; |
||
397 | LipInit: double; |
||
398 | ModeFin: integer; // 0=Duree, 1=Poids vif
|
||
399 | Duree: integer; |
||
400 | PVFin: double; |
||
401 | Carcasse: double; // Rendement carcasse
|
||
402 | Unite: integer; // 0=Quantit?, 1=ED, 2=EM, 3=EN, 4=MS
|
||
403 | Equation: integer; // 0=a+b*PV, 1=a*PV^b, 2=a*(1-exp(-b*PV))
|
||
404 | a, b: double; |
||
405 | PDMoy: double; |
||
406 | BGompertz: double; // Comportement
|
||
407 | Entretien: double; |
||
408 | PVmr2: double; |
||
409 | end;
|
||
410 | PRecProfilP = ^RecProfilP; |
||
411 | // Simulation porc croissance
|
||
412 | RecSimulP = record
|
||
413 | Num: integer; |
||
414 | Nom: string[25]; |
||
415 | Memo: string[255]; // Commentaires |
||
416 | Profil, SeqAli, Ration: integer; |
||
417 | AgeInitProfil, PVInitProfil, ProtLipInitProfil, FinProfil: boolean; |
||
418 | AgeInit: integer; |
||
419 | PVInit, ProtInit, LipInit: double; |
||
420 | ModeFin: integer; // 0=Duree, 1=Poids vif
|
||
421 | Duree: integer; |
||
422 | PVFin: double; |
||
423 | end;
|
||
424 | PRecSimulP = ^RecSimulP; |
||
425 | // R?sultats de simulation porc croissance
|
||
426 | TabResSimulP = record
|
||
427 | TabResult: array[1..NB_COL_PORC, 1..MAX_LIG_PORC] of double; |
||
428 | NbJSim: integer; |
||
429 | end;
|
||
430 | PTabResSimulP = ^TabResSimulP; |
||
431 | |||
432 | RecTabSimulP = record
|
||
433 | Ok: boolean; |
||
434 | Simul, Profil, SeqAli, Ration: integer; |
||
435 | Variation: double; |
||
436 | Result: PTabResSimulP; |
||
437 | end;
|
||
438 | |||
439 | function CCVide: CompositionChimique; // initialisation |
||
440 | |||
441 | var
|
||
442 | ResInstance: longword; |
||
443 | Reg: TRegistry; |
||
444 | Lic: TIniFile; |
||
445 | // Licence
|
||
446 | MajorVersion, MinorVersion, ReleaseVersion, BuildVersion: integer; |
||
447 | VersionString: string;
|
||
448 | MainLeft, MainTop, MainWidth, MainHeight: integer; |
||
449 | FirstName, LastName, Company: string;
|
||
450 | Address1, Address2, PostalCode, City, Country: string;
|
||
451 | Phone, Fax, Mail: string;
|
||
452 | Course: string;
|
||
453 | LicenseType, LicenseNumber: integer; |
||
454 | Drive, Volume, FinalDate, SoftwareEnableKey: string;
|
||
455 | // Configuration
|
||
456 | CheckForUpdates: boolean; |
||
457 | Folder, NewFolder, Logo, NewLogo, ExcelFile, CurrencySign: string;
|
||
458 | LanguageCode, NewLanguageCode: string;
|
||
459 | AffCorrCUD, AffCalcAli, AffGraphAli, AffUnitProfilP, AffPDMoy, |
||
460 | AffPrecocite, AffEntretien, AffOptInit, AffSimulT, AffBesoin: boolean; |
||
461 | ConfRap, ConfDig, ConfTCompo, ConfTAA, ConfTAG, ConfTMacro, ConfTOligo, |
||
462 | ConfTFibres, ConfDCompo, ConfDAA: integer; |
||
463 | ConfAffMP: boolean; |
||
464 | TypeAliGest: integer; |
||
465 | Duree1, Duree3: integer; |
||
466 | Quantite1, Quantite2, Quantite3, Augment: double; |
||
467 | XTruie, XCrois: integer; |
||
468 | CarTete, CarLangue, CarPieds, CarQueue, CarHampe, CarPanne: boolean; |
||
469 | ConfigChanged, DataFolderExists, ConvertData: boolean; |
||
470 | FeedInfo, FatInfo, LeanInfo: integer; |
||
471 | UserFatShortName, UserFatLongName, UserLeanShortName, UserLeanLongName: string;
|
||
472 | UserFatPVV, UserLeanPVV: boolean; |
||
473 | UserFatA, UserFatB, UserFatC, UserLeanA, UserLeanB, UserLeanC: double; |
||
474 | // Mati?re premi?re
|
||
475 | NFicMatiere, NFicMatInraAfz: string; // nom du fichier |
||
476 | PMatiere: PRecMatiere; // pointeur sur enregistrement
|
||
477 | ListMatiere: TList; // liste des enregistrements
|
||
478 | NumWinMatiere: integer; // num?ro de fen?tre MDI
|
||
479 | NumMatInraAfz: integer; // Nombre de mati?res premi?res INRA/AFZ
|
||
480 | // Aliment
|
||
481 | NFicAliment: string; // nom du fichier |
||
482 | PAliment: PRecAliment; // pointeur sur enregistrement
|
||
483 | ListAliment: TList; // liste des enregistrements
|
||
484 | NumWinAliment: integer; // num?ro de fen?tre MDI
|
||
485 | // Tarif
|
||
486 | NumWinTarif: integer; // num?ro de fen?tre MDI
|
||
487 | // Import / export
|
||
488 | NumWinImpExp: integer; // num?ro de fen?tre MDI
|
||
489 | // S?quence alimentaire truie reproductrice
|
||
490 | NFicSeqAliT: string; // nom du fichier |
||
491 | PSeqAliT: PRecSeqAliT; // pointeur sur enregistrement
|
||
492 | ListSeqAliT: TList; // liste des enregistrements
|
||
493 | NumWinSeqAliT: integer; // num?ro de fen?tre MDI
|
||
494 | // Plan de rationnement truie reproductrice
|
||
495 | NFicRationT: string; // nom du fichier |
||
496 | PRationT: PRecRationT; // pointeur sur enregistrement
|
||
497 | ListRationT: TList; // liste des enregistrements
|
||
498 | NumWinRationT: integer; // num?ro de fen?tre MDI
|
||
499 | // Logement truie reproductrice
|
||
500 | NFicLogeT: string; // nom du fichier |
||
501 | PLogeT: PRecLogeT; // pointeur sur enregistrement
|
||
502 | ListLogeT: TList; // liste des enregistrements
|
||
503 | NumWinLogeT: integer; // num?ro de fen?tre MDI
|
||
504 | // Profil truie reproductrice
|
||
505 | NFicProfilT: string; // nom du fichier |
||
506 | PProfilT: PRecProfilT; // pointeur sur enregistrement
|
||
507 | ListProfilT: TList; // liste des enregistrements
|
||
508 | NumWinProfilT: integer; // num?ro de fen?tre MDI
|
||
509 | // Simulation truie reproductrice
|
||
510 | NFicSimulT: string; // nom du fichier |
||
511 | PSimulT: PRecSimulT; // pointeur sur enregistrement
|
||
512 | ListSimulT: TList; // liste des enregistrements
|
||
513 | NumWinSimulT: integer; // num?ro de fen?tre MDI
|
||
514 | // R?sultats de simulation truie reproductrice
|
||
515 | PResSimulT: PTabResSimulT; |
||
516 | TabSimulT: array[1..5] of RecTabSimulT; |
||
517 | // Besoins en gestation (truie/?levage)
|
||
518 | NumWinBesGestT: integer; // num?ro de fen?tre MDI
|
||
519 | NumWinBesGestE: integer; // num?ro de fen?tre MDI
|
||
520 | // Besoins en lactation (truie/?levage)
|
||
521 | NumWinBesLactT: integer; // num?ro de fen?tre MDI
|
||
522 | NumWinBesLactE: integer; // num?ro de fen?tre MDI
|
||
523 | // S?quence alimentaire porc croissance
|
||
524 | NFicSeqAliP: string; // nom du fichier |
||
525 | PSeqAliP: PRecSeqAliP; // pointeur sur enregistrement
|
||
526 | ListSeqAliP: TList; // liste des enregistrements
|
||
527 | NumWinSeqAliP: integer; // num?ro de fen?tre MDI
|
||
528 | // Plan de rationnement porc croissance
|
||
529 | NFicRationPold: string; // nom du fichier |
||
530 | PRationPold: PRecRationP; // pointeur sur enregistrement
|
||
531 | NFicRationP: string; // nom du fichier |
||
532 | PRationP: PRecRationP; // pointeur sur enregistrement
|
||
533 | ListRationP: TList; // liste des enregistrements
|
||
534 | NumWinRationP: integer; // num?ro de fen?tre MDI
|
||
535 | // Profil porc croissance
|
||
536 | NFicProfilPold: string; // nom du fichier |
||
537 | PProfilPold: PRecProfilPold; // pointeur sur enregistrement
|
||
538 | NFicProfilP: string; // nom du fichier |
||
539 | PProfilP: PRecProfilP; // pointeur sur enregistrement
|
||
540 | ListProfilP: TList; // liste des enregistrements
|
||
541 | NumWinProfilP: integer; // num?ro de fen?tre MDI
|
||
542 | // Simulation porc croissance
|
||
543 | NFicSimulP: string; // nom du fichier |
||
544 | PSimulP: PRecSimulP; // pointeur sur enregistrement
|
||
545 | ListSimulP: TList; // liste des enregistrements
|
||
546 | NumWinSimulP: integer; // num?ro de fen?tre MDI
|
||
547 | // R?sultats de simulation porc croissance
|
||
548 | PResSimulP: PTabResSimulP; |
||
549 | TabSimulP: array[1..5] of RecTabSimulP; |
||
550 | |||
551 | implementation
|
||
552 | |||
553 | function CCVide: CompositionChimique; // initialisation |
||
554 | begin
|
||
555 | with Result do |
||
556 | begin
|
||
557 | MS := 1000;
|
||
558 | MM := 0;
|
||
559 | MO := 0;
|
||
560 | Lip := 0;
|
||
561 | MAT := 0;
|
||
562 | Amidon := 0;
|
||
563 | Sucres := 0;
|
||
564 | dMO_T := 0;
|
||
565 | dMO_C := 0;
|
||
566 | dLip_T := 0;
|
||
567 | dLip_C := 0;
|
||
568 | dMAT_T := 0;
|
||
569 | dMAT_C := 0;
|
||
570 | EB := 0;
|
||
571 | ED_T := 0;
|
||
572 | ED_C := 0;
|
||
573 | EM_T := 0;
|
||
574 | EM_C := 0;
|
||
575 | EN_T := 0;
|
||
576 | EN_C := 0;
|
||
577 | Ca := 0;
|
||
578 | P := 0;
|
||
579 | Na := 0;
|
||
580 | K := 0;
|
||
581 | Cl := 0;
|
||
582 | Mg := 0;
|
||
583 | Cu := 0;
|
||
584 | Zn := 0;
|
||
585 | Fe := 0;
|
||
586 | Mn := 0;
|
||
587 | S := 0;
|
||
588 | Se := 0;
|
||
589 | Co := 0;
|
||
590 | Mb := 0;
|
||
591 | I := 0;
|
||
592 | Phytase := 0;
|
||
593 | ActPhytE := 0;
|
||
594 | ActPhytM := 0;
|
||
595 | PdigG := 0;
|
||
596 | PdigF := 0;
|
||
597 | C6C8C10 := 0;
|
||
598 | C12_0 := 0;
|
||
599 | C14_0 := 0;
|
||
600 | C16_0 := 0;
|
||
601 | C16_1 := 0;
|
||
602 | C18_0 := 0;
|
||
603 | C18_1 := 0;
|
||
604 | C18_2 := 0;
|
||
605 | C18_3 := 0;
|
||
606 | C18_4 := 0;
|
||
607 | C20_0 := 0;
|
||
608 | C20_1 := 0;
|
||
609 | C20_4 := 0;
|
||
610 | C20_5 := 0;
|
||
611 | C22_0 := 0;
|
||
612 | C22_1 := 0;
|
||
613 | C22_5 := 0;
|
||
614 | C22_6 := 0;
|
||
615 | C24_0 := 0;
|
||
616 | AGsLip := 0;
|
||
617 | CB := 0;
|
||
618 | dCB_T := 0;
|
||
619 | dCB_C := 0;
|
||
620 | Residu := 0;
|
||
621 | dResidu_T := 0;
|
||
622 | dResidu_C := 0;
|
||
623 | NDF := 0;
|
||
624 | ADF := 0;
|
||
625 | ADL := 0;
|
||
626 | Parois := 0;
|
||
627 | end;
|
||
628 | end;
|
||
629 | |||
630 | end. |