Mercurial > repos > siwaa > insilicow
comparison test-data/input/ALIEN/farmer-plan_ALIEN.txt @ 3:3fe3e1e6a40b draft default tip
"planemo upload for repository https://forgemia.inra.fr/insilicow/insilicow-tool commit b530a8209615f225696abe3e0ba49093ff3dc4ad"
author | siwaa |
---|---|
date | Mon, 25 Aug 2025 16:37:43 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
2:2722892ff716 | 3:3fe3e1e6a40b |
---|---|
1 ################################################################################################################# | |
2 # # | |
3 # InSiliCow # | |
4 # Virtual farm specification # | |
5 # # | |
6 ################################################################################################################# | |
7 | |
8 ################################################################################################################# | |
9 #====== GENERAL SETTINGS # | |
10 ################################################################################################################# | |
11 | |
12 #______ Include files | |
13 @include farmer-log.txt # providing log action and trigger | |
14 @include farmer-base.txt # providing basic components | |
15 | |
16 #______ Models: specify models for individual cows | |
17 param_general{ | |
18 garuns_type = garuns_olivier | |
19 rpm_type = rpm_lite | |
20 abortion_type = abortion_olivier | |
21 } | |
22 | |
23 #______ Simulation: provide time range, output database and code name | |
24 init{ | |
25 begin_date = $start_date$ 00:00:00 | |
26 end_date = $stop_date$ 23:59:59 | |
27 output_db = db_events.sqlite | |
28 output_config = config.txt | |
29 name = $sim_id$ | |
30 } | |
31 | |
32 #______ Log Farm information | |
33 link{ | |
34 trigger = init | |
35 action = log_db farm_tag $farm_tag$ | |
36 action = log_db start_date $start_date$ | |
37 action = log_db stop_date $stop_date$ | |
38 action = log_db now_date $now_date$ | |
39 action = log_db latitude $latitude$ | |
40 action = log_db longitude $longitude$ | |
41 } | |
42 | |
43 #______ End of simulation | |
44 trigger{ | |
45 type = chron | |
46 name = tr_end_simu | |
47 scheme = $stop_date$ 23:59:58 | |
48 } | |
49 | |
50 #______ Past and future | |
51 condition{ | |
52 type = chron_range | |
53 name = past | |
54 from = $start_date$ 00:00:00 | |
55 to = $now_date$ 00:00:01 | |
56 } | |
57 | |
58 condition{ | |
59 type = chron_range | |
60 name = future | |
61 from = $now_date$ 00:00:00 | |
62 to = $stop_date$ 23:59:59 | |
63 } | |
64 | |
65 #______ Day one | |
66 trigger{ | |
67 type = chron | |
68 name = day_one_herd | |
69 scheme = $start_date$ 23:59:59 | |
70 } | |
71 trigger{ | |
72 type = custom | |
73 name = day_one | |
74 } | |
75 link{ | |
76 trigger = day_one_herd | |
77 action = broadcast_now day_one | |
78 } | |
79 | |
80 #______ Calving tag | |
81 link{ | |
82 trigger = calving | |
83 condition = calf_sex male | |
84 condition = future | |
85 action = log_db birth_of_male no_tag | |
86 } | |
87 link{ | |
88 trigger = calving | |
89 condition = calf_sex female | |
90 condition = future | |
91 action = log_db birth_of_female no_tag | |
92 } | |
93 | |
94 #______ Manage initial dam | |
95 state{ | |
96 state = INITIAL-DAM | |
97 } | |
98 | |
99 link{ | |
100 trigger = day_one | |
101 action = state_add INITIAL-DAM | |
102 } | |
103 link{ | |
104 trigger = parturition | |
105 condition = is_in INITIAL-DAM | |
106 condition = not is_in IN_WILD | |
107 action = trigger_later tr_delete_cow 1 | |
108 } | |
109 trigger{ | |
110 type = custom | |
111 name = tr_delete_cow | |
112 } | |
113 link{ | |
114 trigger = tr_delete_cow | |
115 action = delete_cow remove_initial_dam | |
116 } | |
117 | |
118 #______ Stoechio | |
119 stoechio{ | |
120 | |
121 } | |
122 | |
123 ################################################################################################################# | |
124 #====== FARMING # | |
125 ################################################################################################################# | |
126 | |
127 #______ Keep cows and calves in farm: no natural mating | |
128 | |
129 link{ | |
130 trigger = enter IN_WILD | |
131 action = state_move IN_WILD IN_FARM | |
132 } | |
133 | |
134 link{ | |
135 trigger = enter WILD_COW | |
136 action = state_move WILD_COW DRY_COW | |
137 } | |
138 | |
139 #______ Remove calf from dam: no natural weaning | |
140 | |
141 link{ | |
142 trigger = enter SUCKLING_CALF | |
143 action = state_move SUCKLING_CALF NURSED_CALF | |
144 } | |
145 | |
146 #______ Milk cows: no natural drying-off at calf weaning | |
147 | |
148 link{ | |
149 trigger = enter NURSING_COW | |
150 action = state_move NURSING_COW LACTATING_COW | |
151 } | |
152 | |
153 #______ Optimal feeding | |
154 | |
155 link{ | |
156 trigger = enter IN_FARM | |
157 action = trigger_later tr_optimal_feeding 0 | |
158 } | |
159 trigger{ | |
160 type = custom | |
161 name = tr_optimal_feeding | |
162 } | |
163 link{ | |
164 trigger = tr_optimal_feeding | |
165 action = change_food optimal | |
166 } | |
167 | |
168 | |
169 ################################################################################################################# | |
170 #====== FARM COMPONENTS: genotype # | |
171 ################################################################################################################# | |
172 | |
173 #______ Genetic_sD: provide Mendelian sampling std dev for transmission of Genetic Scaling Parameters (GSP) | |
174 # GSP_newborn ~ Normal [ (GSP_mother + GSP_father)/2 , GSP_sd ] | within (min, max) | |
175 | |
176 genetic_sd{ | |
177 garuns_olivier.WM{ | |
178 sd = 50 | |
179 min = 200 | |
180 max = 800 | |
181 } | |
182 | |
183 garuns_olivier.khi_M { | |
184 sd = 0.06 | |
185 min = 0.1 | |
186 max = 0.6 | |
187 } | |
188 | |
189 garuns_olivier.b0{ | |
190 sd = 0 | |
191 min = 0.80 | |
192 max = 2.40 | |
193 } | |
194 | |
195 garuns_olivier.nu_X{ | |
196 sd = 0 | |
197 min = 0.2 | |
198 max = 1.8 | |
199 } | |
200 | |
201 garuns_olivier.nu_Y{ | |
202 sd = 0.1 | |
203 min = 0.2 | |
204 max = 1.8 | |
205 } | |
206 | |
207 garuns_olivier.nu_F{ | |
208 sd = 0 | |
209 min = 0.50 | |
210 max = 1.50 | |
211 } | |
212 | |
213 garuns_olivier.nu_P{ | |
214 sd = 0 | |
215 min = 0.50 | |
216 max = 1.50 | |
217 } | |
218 | |
219 garuns_olivier.eD_star{ | |
220 sd = 0 | |
221 min = 9.0 | |
222 max = 15.0 | |
223 } | |
224 | |
225 garuns_olivier.NDF_star{ | |
226 sd = 0 | |
227 min = 0.10 | |
228 max = 0.90 | |
229 } | |
230 | |
231 garuns_olivier.psi{ | |
232 sd = 0 | |
233 min = 0 | |
234 max = 1 | |
235 } | |
236 | |
237 rpm_lite.nu_I{ | |
238 sd = 0.007 | |
239 min = 0.00 | |
240 max = 0.20 | |
241 } | |
242 | |
243 rpm_lite.nu_B{ | |
244 sd = 0.07 | |
245 min = 1.20 | |
246 max = 2.20 | |
247 } | |
248 | |
249 rpm_lite.nu_Z{ | |
250 sd = 0.02 | |
251 min = 0.90 | |
252 max = 1.10 | |
253 } | |
254 } | |
255 | |
256 ################################################################################################################# | |
257 #====== FARM COMPONENTS: herd (genotype-based initialization of individual cows) # | |
258 ################################################################################################################# | |
259 | |
260 #______ INITIALIZATION of ALIEN farm | |
261 | |
262 #______ Initial dam | |
263 init_cow{ | |
264 name=initial_dam | |
265 | |
266 ### ABORTION rules according to days in pregnancy (dip) | |
267 abortion_olivier.delta = constant 3.0 | |
268 abortion_olivier.enabled = never | |
269 abortion_olivier.dip = vector constant 17 ; constant 64 | |
270 abortion_olivier.abo = vector constant 0.02 ; constant 0.005 ; constant 0.0004 | |
271 garuns_olivier.WM = norm99 450 50 #450 ± 25 | |
272 garuns_olivier.khi_M = norm99 0.30 0.03 # 0.33 ± 0.03 | |
273 garuns_olivier.b0 = norm99 1.6 0 # 1.6 ± 0.16 | |
274 garuns_olivier.nu_X = norm99 1 0 # 1.0 ± 0.10 | |
275 garuns_olivier.nu_Y = norm99 1.1 0.1 # 1.0 ± 0.10 | |
276 garuns_olivier.nu_F = norm99 1 0 # 1.0 ± 0.02 | |
277 garuns_olivier.nu_P = norm99 1 0 # 1.0 ± 0.02 | |
278 garuns_olivier.eD_star = norm99 10.7 0 # 10.7 ± 0.5 | |
279 garuns_olivier.NDF_star = norm99 0.5 0 # 0.5 ± 0.02 | |
280 garuns_olivier.psi = norm99 0.5 0 | |
281 rpm_lite.nu_B = norm99 1.7 0.07 # 1.7 ± 0.07 | |
282 rpm_lite.nu_Z = norm99 1 0.02 # 1.0 ± 0.02 | |
283 rpm_lite.nu_I = norm99 0.025 0.007 # 0.026 ± 0.007 | |
284 } | |
285 | |
286 #______ Initial sire | |
287 | |
288 breed{ | |
289 breed = initial | |
290 } | |
291 | |
292 init_bull{ | |
293 name=semen_initial_sire | |
294 bull.breed_name = initial | |
295 bull.semens_quality = constant 1.0 | |
296 bull.female_ratio = constant 1.0 | |
297 garuns_olivier.WM = norm99 450 50 #450 ± 25 | |
298 garuns_olivier.khi_M = norm99 0.30 0.03 # 0.33 ± 0.03 | |
299 garuns_olivier.b0 = norm99 1.6 0 # 1.6 ± 0.16 | |
300 garuns_olivier.nu_X = norm99 1 0 # 1.0 ± 0.10 | |
301 garuns_olivier.nu_Y = norm99 1.1 0.1 # 1.0 ± 0.10 | |
302 garuns_olivier.nu_F = norm99 1 0 # 1.0 ± 0.02 | |
303 garuns_olivier.nu_P = norm99 1 0 # 1.0 ± 0.02 | |
304 garuns_olivier.eD_star = norm99 10.7 0 # 10.7 ± 0.5 | |
305 garuns_olivier.NDF_star = norm99 0.5 0 # 0.5 ± 0.02 | |
306 garuns_olivier.psi = norm99 0.5 0 | |
307 rpm_lite.nu_B = norm99 1.7 0.07 # 1.7 ± 0.07 | |
308 rpm_lite.nu_Z = norm99 1 0.02 # 1.0 ± 0.02 | |
309 rpm_lite.nu_I = norm99 0.025 0.007 # 0.026 ± 0.007 | |
310 } | |
311 | |
312 | |
313 #______ Generate dams of each individual cow to create | |
314 | |
315 action{ | |
316 type = buy_cow | |
317 name = buy_dam_of_id0001 | |
318 init_cow = initial_dam | |
319 init_bull = semen_initial_sire | |
320 age = 600 | |
321 days_after_conception = -1 | |
322 number = 1 | |
323 } | |
324 | |
325 action{ | |
326 type = buy_cow | |
327 name = buy_dam_of_id0002 | |
328 init_cow = initial_dam | |
329 init_bull = semen_initial_sire | |
330 age = 600 | |
331 days_after_conception = -30 | |
332 number = 1 | |
333 } | |
334 | |
335 action{ | |
336 type = buy_cow | |
337 name = buy_dam_of_id0003 | |
338 init_cow = initial_dam | |
339 init_bull = semen_initial_sire | |
340 age = 600 | |
341 days_after_conception = -60 | |
342 number = 1 | |
343 } | |
344 | |
345 link{ | |
346 trigger = init | |
347 action = buy_dam_of_id0001 | |
348 action = buy_dam_of_id0002 | |
349 action = buy_dam_of_id0003 | |
350 } | |
351 | |
352 | |
353 ################################################################################################################# | |
354 #====== FARM COMPONENTS: semen (genotype-based initialization of semen from individual bulls) # | |
355 ################################################################################################################# | |
356 | |
357 | |
358 ################################################################################################################# | |
359 #====== FARM COMPONENTS: heat detection # | |
360 ################################################################################################################# | |
361 | |
362 | |
363 ################################################################################################################# | |
364 #====== FARM COMPONENTS: feedstuffs # | |
365 ################################################################################################################# | |
366 | |
367 | |
368 ################################################################################################################# | |
369 #====== FARM COMPONENTS: diets # | |
370 ################################################################################################################# | |
371 | |
372 | |
373 ################################################################################################################# | |
374 #====== FARM COMPONENTS: time schemes # | |
375 ################################################################################################################# | |
376 | |
377 | |
378 ################################################################################################################# | |
379 #====== FARM COMPONENTS: groups # | |
380 ################################################################################################################# | |
381 | |
382 | |
383 ################################################################################################################# | |
384 #====== FARM COMPONENTS: operations # | |
385 ################################################################################################################# | |
386 | |
387 | |
388 ################################################################################################################# | |
389 #====== FARM COMPONENTS: transfers # | |
390 ################################################################################################################# | |
391 | |
392 | |
393 ################################################################################################################# | |
394 #====== FARM COMPONENTS: perturbations # | |
395 ################################################################################################################# | |
396 | |
397 | |
398 ################################################################################################################# | |
399 #====== FARM COMPONENTS: parcels # | |
400 ################################################################################################################# | |
401 | |
402 |