Mercurial > repos > siwaa > insilicow
comparison test-data/input/ALIEN-demo/farmer-plan_ALIEN-demo.txt @ 3:3fe3e1e6a40b draft
"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 init_bull{ | |
| 288 name=semen_initial_sire | |
| 289 bull.breed_name = dairy | |
| 290 bull.semens_quality = constant 1.0 | |
| 291 bull.female_ratio = constant 1.0 | |
| 292 garuns_olivier.WM = norm99 450 50 #450 ± 25 | |
| 293 garuns_olivier.khi_M = norm99 0.30 0.03 # 0.33 ± 0.03 | |
| 294 garuns_olivier.b0 = norm99 1.6 0 # 1.6 ± 0.16 | |
| 295 garuns_olivier.nu_X = norm99 1 0 # 1.0 ± 0.10 | |
| 296 garuns_olivier.nu_Y = norm99 1.1 0.1 # 1.0 ± 0.10 | |
| 297 garuns_olivier.nu_F = norm99 1 0 # 1.0 ± 0.02 | |
| 298 garuns_olivier.nu_P = norm99 1 0 # 1.0 ± 0.02 | |
| 299 garuns_olivier.eD_star = norm99 10.7 0 # 10.7 ± 0.5 | |
| 300 garuns_olivier.NDF_star = norm99 0.5 0 # 0.5 ± 0.02 | |
| 301 garuns_olivier.psi = norm99 0.5 0 | |
| 302 rpm_lite.nu_B = norm99 1.7 0.07 # 1.7 ± 0.07 | |
| 303 rpm_lite.nu_Z = norm99 1 0.02 # 1.0 ± 0.02 | |
| 304 rpm_lite.nu_I = norm99 0.025 0.007 # 0.026 ± 0.007 | |
| 305 } | |
| 306 | |
| 307 | |
| 308 #______ Generate dams of each individual cow to create | |
| 309 | |
| 310 action{ | |
| 311 type = buy_cow | |
| 312 name = buy_dam_of_id0001 | |
| 313 init_cow = initial_dam | |
| 314 init_bull = semen_initial_sire | |
| 315 age = 600 | |
| 316 days_after_conception = -1 | |
| 317 number = 1 | |
| 318 } | |
| 319 | |
| 320 action{ | |
| 321 type = buy_cow | |
| 322 name = buy_dam_of_id0002 | |
| 323 init_cow = initial_dam | |
| 324 init_bull = semen_initial_sire | |
| 325 age = 600 | |
| 326 days_after_conception = -30 | |
| 327 number = 1 | |
| 328 } | |
| 329 | |
| 330 action{ | |
| 331 type = buy_cow | |
| 332 name = buy_dam_of_id0003 | |
| 333 init_cow = initial_dam | |
| 334 init_bull = semen_initial_sire | |
| 335 age = 600 | |
| 336 days_after_conception = -600 | |
| 337 number = 1 | |
| 338 } | |
| 339 | |
| 340 link{ | |
| 341 trigger = init | |
| 342 action = buy_dam_of_id0001 | |
| 343 action = buy_dam_of_id0002 | |
| 344 action = buy_dam_of_id0003 | |
| 345 } | |
| 346 | |
| 347 | |
| 348 ################################################################################################################# | |
| 349 #====== FARM COMPONENTS: semen (genotype-based initialization of semen from individual bulls) # | |
| 350 ################################################################################################################# | |
| 351 | |
| 352 # Only the semen of individual bulls is generated and used for insemination | |
| 353 | |
| 354 breed{ | |
| 355 breed = dairy | |
| 356 breed = beef | |
| 357 } | |
| 358 | |
| 359 init_bull{ | |
| 360 name=semen_dairy_standard | |
| 361 bull.breed_name = dairy | |
| 362 | |
| 363 ### QUALITY & SEX RATIO | |
| 364 bull.semens_quality = norm99 0.95 0.05 # a number between 0.0 (=never works) and 1.0 (=perfect) | |
| 365 bull.female_ratio = constant 0.5 # offspring sex ratio. 1.0 = 100%female, 0.0=0%female | |
| 366 | |
| 367 ### GARUNS & RPM_lite Genetic Scaling Parameters | |
| 368 # Genotype sub-block (see genotype_generic.txt) | |
| 369 | |
| 370 garuns_olivier.WM = constant 450 #450 | |
| 371 garuns_olivier.khi_M = constant 0.30 # 0.33 | |
| 372 garuns_olivier.b0 = constant 1.6 # 1.6 | |
| 373 garuns_olivier.nu_X = constant 1 # 1.0 | |
| 374 garuns_olivier.nu_Y = constant 1.1 # 1.0 | |
| 375 garuns_olivier.nu_F = constant 1 # 1.0 | |
| 376 garuns_olivier.nu_P = constant 1 # 1.0 | |
| 377 garuns_olivier.eD_star = constant 10.7 # 10.7 | |
| 378 garuns_olivier.NDF_star = constant 0.5 # 0.5 | |
| 379 garuns_olivier.psi = constant 0.5 | |
| 380 rpm_lite.nu_B = constant 1.7 # 1.7 | |
| 381 rpm_lite.nu_Z = constant 1 # 1.0 | |
| 382 rpm_lite.nu_I = constant 0.025 # 0.026 | |
| 383 } | |
| 384 | |
| 385 | |
| 386 | |
| 387 ################################################################################################################# | |
| 388 #====== FARM COMPONENTS: heat detection # | |
| 389 ################################################################################################################# | |
| 390 | |
| 391 #______ Estrous detection method | |
| 392 estrous_detection_method{ | |
| 393 name=estrous_detection_default | |
| 394 | |
| 395 #When do we observe oestruses | |
| 396 time_slice = 06:00:00 18:00:00 #00:00:01 23:59:59 | |
| 397 | |
| 398 #estrogene is transformed to an expression using a Hill function | |
| 399 expression_threshold=0.75 #default 0.75 | |
| 400 expression_stiffness=7 #default 7 | |
| 401 | |
| 402 #the oestrus worth an insemination if the memory function is above this threshold | |
| 403 #THIS threshold is scaled for an observation all the day long | |
| 404 #if you observe half a day multiply this threshold by 0.5 | |
| 405 #1.0 is a reasonable base value for all day observations | |
| 406 detection_threshold=0.05 # 0.1 | |
| 407 | |
| 408 #then, the oestrus is truely detected with a chance of | |
| 409 sensitivity = 0.75 #0.7 | |
| 410 | |
| 411 #then an average of wrong_oestrus_per_day are generated | |
| 412 wrong_oestrus_per_day = 0 #0.00 | |
| 413 } | |
| 414 | |
| 415 ################################################################################################################# | |
| 416 #====== FARM COMPONENTS: feedstuffs # | |
| 417 ################################################################################################################# | |
| 418 | |
| 419 | |
| 420 ################################################################################################################# | |
| 421 #====== FARM COMPONENTS: diets # | |
| 422 ################################################################################################################# | |
| 423 | |
| 424 feed{ | |
| 425 name = calf_diet | |
| 426 type = mix | |
| 427 | |
| 428 feed = CPL.MLK | |
| 429 proportion = 1.00 | |
| 430 } | |
| 431 | |
| 432 feed{ | |
| 433 name = heifer_diet | |
| 434 type = mix | |
| 435 | |
| 436 feed = FO.STR | |
| 437 proportion = 0.02 | |
| 438 feed = FO.HAP | |
| 439 proportion = 0.60 | |
| 440 feed = FO.GSI | |
| 441 proportion = 0.32 | |
| 442 feed = CO.CER | |
| 443 proportion = 0.05 | |
| 444 feed = CPL.CMV | |
| 445 proportion = 0.01 | |
| 446 } | |
| 447 | |
| 448 feed{ | |
| 449 name = lactation_diet | |
| 450 type = mix | |
| 451 | |
| 452 feed = FO.STR | |
| 453 proportion = 0.01 | |
| 454 feed = FO.HAP | |
| 455 proportion = 0.03 | |
| 456 feed = FO.GSI | |
| 457 proportion = 0.04 | |
| 458 feed = FO.CSI | |
| 459 proportion = 0.70 | |
| 460 feed = CO.CER | |
| 461 proportion = 0.05 | |
| 462 feed = CO.OSC | |
| 463 proportion = 0.13 | |
| 464 feed = CO.ROO | |
| 465 proportion = 0.03 | |
| 466 feed = CPL.CMV | |
| 467 proportion = 0.01 | |
| 468 } | |
| 469 | |
| 470 feed{ | |
| 471 name = drycow_diet | |
| 472 type = mix | |
| 473 | |
| 474 feed = FO.STR | |
| 475 proportion = 0.02 | |
| 476 feed = FO.HAP | |
| 477 proportion = 0.68 | |
| 478 feed = FO.CSI | |
| 479 proportion = 0.08 | |
| 480 feed = CO.CER | |
| 481 proportion = 0.05 | |
| 482 feed = CO.OSC | |
| 483 proportion = 0.13 | |
| 484 feed = CO.ROO | |
| 485 proportion = 0.03 | |
| 486 feed = CPL.CMV | |
| 487 proportion = 0.01 | |
| 488 } | |
| 489 | |
| 490 feed{ | |
| 491 name = pasture_diet | |
| 492 type = mix | |
| 493 | |
| 494 feed = FO.FGX | |
| 495 proportion = 0.778 | |
| 496 feed = CO.CER | |
| 497 proportion = 0.050 | |
| 498 feed = CO.OSC | |
| 499 proportion = 0.130 | |
| 500 feed = CO.TUB | |
| 501 proportion = 0.002 | |
| 502 feed = CO.ROO | |
| 503 proportion = 0.030 | |
| 504 feed = CPL.CMV | |
| 505 proportion = 0.010 | |
| 506 } | |
| 507 | |
| 508 | |
| 509 | |
| 510 | |
| 511 ################################################################################################################# | |
| 512 #====== FARM COMPONENTS: time schemes # | |
| 513 ################################################################################################################# | |
| 514 | |
| 515 | |
| 516 | |
| 517 #_______Breeding season: every year from *-03-21 00:00:00 to *-06-21 23:59:59 | |
| 518 | |
| 519 condition{ | |
| 520 type = chron_range | |
| 521 name = breeding_season | |
| 522 from = *-03-21 00:00:00 #date_breeding_start | |
| 523 to = *-06-21 23:59:59 #date_breeding_stop | |
| 524 } | |
| 525 | |
| 526 trigger{ | |
| 527 type = chron | |
| 528 name = breeding_start | |
| 529 scheme = *-03-21 00:00:00 #date_breeding_start | |
| 530 } | |
| 531 | |
| 532 trigger{ | |
| 533 type = chron | |
| 534 name = breeding_stop | |
| 535 scheme = *-06-21 23:59:59 #date_breeding_stop | |
| 536 } | |
| 537 | |
| 538 #_______Outdoor date | |
| 539 | |
| 540 trigger{ | |
| 541 type = chron | |
| 542 name = outdoor_herd | |
| 543 scheme = *-04-01 00:00:00 | |
| 544 } | |
| 545 trigger{ | |
| 546 type = custom | |
| 547 name = outdoor | |
| 548 } | |
| 549 link{ | |
| 550 trigger = outdoor_herd | |
| 551 action = broadcast_now outdoor | |
| 552 } | |
| 553 | |
| 554 #_______Indoor date | |
| 555 | |
| 556 trigger{ | |
| 557 type = chron | |
| 558 name = indoor_herd | |
| 559 scheme = *-10-01 00:00:00 | |
| 560 } | |
| 561 trigger{ | |
| 562 type = custom | |
| 563 name = indoor | |
| 564 } | |
| 565 link{ | |
| 566 trigger = indoor_herd | |
| 567 action = broadcast_now indoor | |
| 568 } | |
| 569 | |
| 570 | |
| 571 | |
| 572 | |
| 573 ################################################################################################################# | |
| 574 #====== FARM COMPONENTS: groups # | |
| 575 ################################################################################################################# | |
| 576 | |
| 577 state{ | |
| 578 state = REARED_CALF | |
| 579 state = WEANED_HEIFER | |
| 580 state = UNEXPECTED_PREGNANT | |
| 581 state = INSEMINATED | |
| 582 state = EXPECTED_PREGNANT | |
| 583 state = EXPECTED_TO_CALVE | |
| 584 state = CALVED | |
| 585 state = TO_BREED | |
| 586 state = TO_CULL | |
| 587 } | |
| 588 | |
| 589 action{ | |
| 590 type = genericlog | |
| 591 name = log_states_user | |
| 592 | |
| 593 log_type = sqlite | |
| 594 sqlite_path = db_states.sqlite | |
| 595 sqlite_table = user_states | |
| 596 | |
| 597 #log_type = file | |
| 598 #file_path = states-user.txt | |
| 599 #sep_col = \t | |
| 600 #file_line_flush=no | |
| 601 | |
| 602 | |
| 603 #--- from cow and simulator --- | |
| 604 column{ | |
| 605 value = time | |
| 606 name = time | |
| 607 sqlite_type = numeric | |
| 608 } | |
| 609 | |
| 610 column{ | |
| 611 value = state.count.REARED_CALF | |
| 612 name = REARED_CALF | |
| 613 sqlite_type = numeric | |
| 614 } | |
| 615 | |
| 616 column{ | |
| 617 value = state.count.WEANED_HEIFER | |
| 618 name = WEANED_HEIFER | |
| 619 sqlite_type = numeric | |
| 620 } | |
| 621 | |
| 622 column{ | |
| 623 value = state.count.UNEXPECTED_PREGNANT | |
| 624 name = UNEXPECTED_PREGNANT | |
| 625 sqlite_type = numeric | |
| 626 } | |
| 627 | |
| 628 column{ | |
| 629 value = state.count.INSEMINATED | |
| 630 name = INSEMINATED | |
| 631 sqlite_type = numeric | |
| 632 } | |
| 633 | |
| 634 column{ | |
| 635 value = state.count.EXPECTED_PREGNANT | |
| 636 name = EXPECTED_PREGNANT | |
| 637 sqlite_type = numeric | |
| 638 } | |
| 639 | |
| 640 column{ | |
| 641 value = state.count.EXPECTED_TO_CALVE | |
| 642 name = EXPECTED_TO_CALVE | |
| 643 sqlite_type = numeric | |
| 644 } | |
| 645 | |
| 646 column{ | |
| 647 value = state.count.CALVED | |
| 648 name = CALVED | |
| 649 sqlite_type = numeric | |
| 650 } | |
| 651 | |
| 652 column{ | |
| 653 value = state.count.TO_BREED | |
| 654 name = TO_BREED | |
| 655 sqlite_type = numeric | |
| 656 } | |
| 657 | |
| 658 column{ | |
| 659 value = state.count.TO_CULL | |
| 660 name = TO_CULL | |
| 661 sqlite_type = numeric | |
| 662 } | |
| 663 | |
| 664 } | |
| 665 | |
| 666 link{ | |
| 667 trigger = every_day_herd | |
| 668 action = log_states_user | |
| 669 } | |
| 670 | |
| 671 ################################################################################################################# | |
| 672 #====== FARM COMPONENTS: operations # | |
| 673 ################################################################################################################# | |
| 674 | |
| 675 | |
| 676 #______ Rear calves at 6 d | |
| 677 | |
| 678 trigger{ | |
| 679 type = custom | |
| 680 name = tr_rear_calf | |
| 681 } | |
| 682 | |
| 683 link{ | |
| 684 trigger = enter NURSED_CALF | |
| 685 action = trigger_later tr_rear_calf 6 | |
| 686 } | |
| 687 | |
| 688 link{ | |
| 689 trigger = tr_rear_calf | |
| 690 action = state_add REARED_CALF | |
| 691 } | |
| 692 | |
| 693 #______ Sell calves according to calf pen capacity | |
| 694 | |
| 695 link{ | |
| 696 trigger = every_day | |
| 697 condition = state_size REARED_CALF > 25 #calf_pen_capacity | |
| 698 action = sell_calves | |
| 699 } | |
| 700 | |
| 701 trigger{ | |
| 702 type = custom | |
| 703 name = tr_sell_calves | |
| 704 } | |
| 705 | |
| 706 action{ | |
| 707 type = broadcast_now | |
| 708 name = sell_calves | |
| 709 condition = is_in REARED_CALF | |
| 710 sortby = age | |
| 711 reverse = no | |
| 712 limit = 1 | |
| 713 trigger = tr_sell_calves | |
| 714 } | |
| 715 | |
| 716 link{ | |
| 717 trigger = tr_sell_calves | |
| 718 action = state_delete REARED_CALF | |
| 719 action = delete_cow sale of calves | |
| 720 } | |
| 721 | |
| 722 #______ Wean calves at 100 days | |
| 723 | |
| 724 link{ | |
| 725 trigger = every_day | |
| 726 condition = age >= 100 | |
| 727 action = state_move REARED_CALF WEANED_HEIFER | |
| 728 } | |
| 729 | |
| 730 #______ Open breeding | |
| 731 link{ | |
| 732 trigger = every_day | |
| 733 condition = age > 450 #breeding_age | |
| 734 condition = breeding_season | |
| 735 action = state_move WEANED_HEIFER UNEXPECTED_PREGNANT | |
| 736 action = state_move TO_BREED UNEXPECTED_PREGNANT | |
| 737 action = state_move EXPECTED_TO_CALVE UNEXPECTED_PREGNANT | |
| 738 } | |
| 739 | |
| 740 #______ Start estrous detection | |
| 741 | |
| 742 link{ | |
| 743 trigger = enter UNEXPECTED_PREGNANT | |
| 744 action = estrous_start estrous_detection_default | |
| 745 } | |
| 746 | |
| 747 #______ Detect estrous | |
| 748 | |
| 749 link{ | |
| 750 trigger = estrous | |
| 751 condition = is_in IN_FARM | |
| 752 action = state_move EXPECTED_PREGNANT UNEXPECTED_PREGNANT | |
| 753 } | |
| 754 | |
| 755 #______ Inseminate once a day when estrous is detected | |
| 756 | |
| 757 trigger{ | |
| 758 type = custom | |
| 759 name = tr_move_to_EXPECTED_PREGNANT | |
| 760 } | |
| 761 | |
| 762 link{ | |
| 763 trigger = tr_move_to_EXPECTED_PREGNANT | |
| 764 action = state_move INSEMINATED EXPECTED_PREGNANT | |
| 765 } | |
| 766 | |
| 767 link{ | |
| 768 trigger = estrous | |
| 769 condition = is_in IN_FARM | |
| 770 condition = future | |
| 771 condition = is_in UNEXPECTED_PREGNANT | |
| 772 action = state_move UNEXPECTED_PREGNANT INSEMINATED | |
| 773 action = trigger_later tr_move_to_EXPECTED_PREGNANT 1 | |
| 774 action = log_db 01_INSEMINATION | |
| 775 action = inseminate semen_dairy_standard | |
| 776 } | |
| 777 | |
| 778 #______ Close breeding | |
| 779 link{ | |
| 780 trigger = every_day | |
| 781 condition = is_in IN_FARM | |
| 782 condition = not breeding_season | |
| 783 action = state_move EXPECTED_PREGNANT EXPECTED_TO_CALVE | |
| 784 action = state_move INSEMINATED EXPECTED_TO_CALVE | |
| 785 action = estrous_stop | |
| 786 } | |
| 787 | |
| 788 link{ | |
| 789 trigger = every_day | |
| 790 condition = is_in IN_FARM | |
| 791 condition = is_in UNEXPECTED_PREGNANT | |
| 792 condition = not breeding_season | |
| 793 action = state_move UNEXPECTED_PREGNANT TO_CULL | |
| 794 action = log_db delete_cow: unexpected pregnant at the end of breeding season | |
| 795 action = estrous_stop | |
| 796 } | |
| 797 | |
| 798 | |
| 799 | |
| 800 | |
| 801 | |
| 802 | |
| 803 | |
| 804 #_______ Postpartum management | |
| 805 | |
| 806 trigger{ | |
| 807 type = custom | |
| 808 name = tr_postpartum | |
| 809 } | |
| 810 | |
| 811 link{ | |
| 812 trigger = parturition | |
| 813 action = state_move EXPECTED_TO_CALVE CALVED | |
| 814 action = trigger_later tr_postpartum 40 # VWP | |
| 815 } | |
| 816 | |
| 817 link{ | |
| 818 trigger = tr_postpartum | |
| 819 action = state_move CALVED TO_BREED | |
| 820 } | |
| 821 | |
| 822 #_______ Late abortion management | |
| 823 | |
| 824 #Abortions after 210 days in pregnancy are managed by culling | |
| 825 link{ | |
| 826 trigger = abortion | |
| 827 condition = days_after_conception > 210 | |
| 828 #action = log_db TO_CULL_from_PREGNANT_after_late_fetal_death | |
| 829 action = log_db delete_cow: after fetal death > 210 days | |
| 830 action = state_move EXPECTED_PREGNANT TO_CULL | |
| 831 action = state_move EXPECTED_TO_CALVE TO_CULL | |
| 832 } | |
| 833 | |
| 834 #_______ Drying-off after 305 days in milk if cow is expected to calve | |
| 835 | |
| 836 link{ | |
| 837 trigger = every_day | |
| 838 condition = is_in IN_FARM | |
| 839 condition = is_milking | |
| 840 condition = is_in EXPECTED_TO_CALVE | |
| 841 condition = days_after_calving >= 305 | |
| 842 action = stop_milking | |
| 843 action = log_db stop_milking: pregnant & days_after_calving >= 305 days | |
| 844 | |
| 845 } | |
| 846 | |
| 847 #_______ Drying-off if milk yield < 5 kg/d | |
| 848 | |
| 849 link{ | |
| 850 trigger = every_day | |
| 851 condition = is_in IN_FARM | |
| 852 condition = is_milking | |
| 853 condition = milk_yield < 5 | |
| 854 action = stop_milking | |
| 855 action = log_db stop_milking: milk_yield < 5 kg/d | |
| 856 | |
| 857 } | |
| 858 | |
| 859 #_______ Remove non-milking cows to cull | |
| 860 | |
| 861 link{ | |
| 862 trigger = every_week | |
| 863 condition = is_in TO_CULL | |
| 864 condition = not is_milking | |
| 865 ## #condition = not is_pregnant | |
| 866 #action = log_db Remove_ojm | |
| 867 action = delete_cow every week | |
| 868 } | |
| 869 | |
| 870 #_______ Individual pregnancy diagnosis 28 days after insemination | |
| 871 | |
| 872 trigger{ | |
| 873 type = custom | |
| 874 name = tr_cow_pregnancy_diagnosis | |
| 875 } | |
| 876 | |
| 877 link{ | |
| 878 trigger = insemination | |
| 879 condition = is_in IN_FARM | |
| 880 action = trigger_later tr_cow_pregnancy_diagnosis 28 | |
| 881 } | |
| 882 | |
| 883 link{ | |
| 884 trigger = tr_cow_pregnancy_diagnosis | |
| 885 condition = is_in IN_FARM | |
| 886 condition = is_in EXPECTED_PREGNANT | |
| 887 condition = not is_pregnant | |
| 888 action = state_move EXPECTED_PREGNANT UNEXPECTED_PREGNANT | |
| 889 } | |
| 890 | |
| 891 link{ | |
| 892 trigger = tr_cow_pregnancy_diagnosis | |
| 893 condition = is_in IN_FARM | |
| 894 condition = is_in EXPECTED_TO_CALVE | |
| 895 condition = not is_pregnant | |
| 896 action = state_move EXPECTED_TO_CALVE TO_CULL | |
| 897 action = log_db delete_cow: Negative cow pregnancy diagnosis | |
| 898 } | |
| 899 | |
| 900 | |
| 901 #_______ Herd pregnancy diagnosis 45 days after end of breeding season | |
| 902 | |
| 903 trigger{ | |
| 904 type = custom | |
| 905 name = tr_herd_pregnancy_diagnosis | |
| 906 } | |
| 907 | |
| 908 link{ | |
| 909 trigger = breeding_stop | |
| 910 action = trigger_later tr_herd_pregnancy_diagnosis 45 | |
| 911 } | |
| 912 | |
| 913 link{ | |
| 914 trigger = tr_herd_pregnancy_diagnosis | |
| 915 # action = log_db Herd_pregnancy_diagnosis | |
| 916 action = broadcast_now tr_cow_pregnancy_diagnosis | |
| 917 } | |
| 918 | |
| 919 #______ Culling rules during breeding season: Cull unexpected pregnant nulliparous at age > 800 days | |
| 920 | |
| 921 link{ | |
| 922 trigger = enter UNEXPECTED_PREGNANT | |
| 923 condition = parity = 0 | |
| 924 condition = age > 800 #nulliparous_max_breeding_age | |
| 925 #action = log_db TO_CULL_from_CYCLING_because_too_old_heifer | |
| 926 action = state_move UNEXPECTED_PREGNANT TO_CULL | |
| 927 action = log_db delete_cow: heifer of age > 800 days | |
| 928 } | |
| 929 | |
| 930 #______ Culling rules during breeding season: Cull unexpected pregnant 320 days_after_calving | |
| 931 link{ | |
| 932 trigger = enter UNEXPECTED_PREGNANT | |
| 933 condition = days_after_calving > 320 | |
| 934 #action = log_db TO_CULL_from_CYCLING_because_too_late_after_calving | |
| 935 action = log_db delete_cow: days after calving > 320 days | |
| 936 action = state_move UNEXPECTED_PREGNANT TO_CULL | |
| 937 } | |
| 938 | |
| 939 #______ Culling rules during breeding season: Cull unexpected pregnant after 5 inseminations | |
| 940 link{ | |
| 941 trigger = enter UNEXPECTED_PREGNANT | |
| 942 condition = parity > 0 | |
| 943 condition = num_insemination_lactation >= 5 | |
| 944 #action = log_db TO_CULL_from_BREEDING_max_nb_ins | |
| 945 action = log_db delete_cow: nb of insemination >= 5 | |
| 946 action = state_move UNEXPECTED_PREGNANT TO_CULL | |
| 947 } | |
| 948 | |
| 949 #______ Stop estrous detection of cows to cull | |
| 950 | |
| 951 link{ | |
| 952 trigger = enter TO_CULL | |
| 953 action = estrous_stop | |
| 954 } | |
| 955 | |
| 956 | |
| 957 #______ Feeding plan according to groups # > at rearing: on calf diet | |
| 958 link{ | |
| 959 trigger = enter REARED_CALF | |
| 960 action = change_food calf_diet | |
| 961 } | |
| 962 | |
| 963 # > at weaning: on heifer diet | |
| 964 link{ | |
| 965 trigger = enter WEANED_HEIFER | |
| 966 action = change_food heifer_diet | |
| 967 } | |
| 968 | |
| 969 # > at parturition: on lactation diet | |
| 970 link{ | |
| 971 trigger = parturition | |
| 972 action = change_food lactation_diet | |
| 973 } | |
| 974 | |
| 975 # > at drying-off: on drycow_diet | |
| 976 link{ | |
| 977 trigger = stop_milking | |
| 978 action = change_food drycow_diet | |
| 979 } | |
| 980 | |
| 981 # > OUTDOOR: on pasture diet | |
| 982 link{ | |
| 983 trigger = outdoor | |
| 984 condition = not is_in REARED_CALF | |
| 985 action = change_food pasture_diet | |
| 986 } | |
| 987 | |
| 988 # > INDOOR: back to diet according to state | |
| 989 | |
| 990 link{ | |
| 991 trigger = indoor | |
| 992 condition = is_in WEANED_HEIFER | |
| 993 action = change_food heifer_diet | |
| 994 } | |
| 995 | |
| 996 link{ | |
| 997 trigger = indoor | |
| 998 condition = not is_milking | |
| 999 action = change_food drycow_diet | |
| 1000 } | |
| 1001 | |
| 1002 link{ | |
| 1003 trigger = indoor | |
| 1004 condition = is_milking | |
| 1005 action = change_food lactation_diet | |
| 1006 } | |
| 1007 | |
| 1008 | |
| 1009 #______ Veal production / use semen from meat breed if expected pregnant > calf_pen_capacity | |
| 1010 | |
| 1011 #______ Detect high producing cows > use high-grade semen > rear preferentially high-grade calves (=Renewal) | |
| 1012 | |
| 1013 #______ Use extended lactation | |
| 1014 | |
| 1015 #______ Cull oldest cow | |
| 1016 | |
| 1017 | |
| 1018 ################################################################################################################# | |
| 1019 #====== FARM COMPONENTS: transfers # | |
| 1020 ################################################################################################################# | |
| 1021 | |
| 1022 | |
| 1023 ################################################################################################################# | |
| 1024 #====== FARM COMPONENTS: perturbations # | |
| 1025 ################################################################################################################# | |
| 1026 | |
| 1027 | |
| 1028 ################################################################################################################# | |
| 1029 #====== FARM COMPONENTS: parcels # | |
| 1030 ################################################################################################################# | |
| 1031 | |
| 1032 |
