Mercurial > repos > siwaa > insilicow
comparison test-data/input/TWIN/farmer-plan_TWIN.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 #TWIN CASE : all sd = 0 | |
| 177 | |
| 178 genetic_sd{ | |
| 179 garuns_olivier.WM{ | |
| 180 sd = 0 | |
| 181 min = 200 | |
| 182 max = 800 | |
| 183 } | |
| 184 | |
| 185 garuns_olivier.khi_M { | |
| 186 sd = 0 | |
| 187 min = 0.1 | |
| 188 max = 0.6 | |
| 189 } | |
| 190 | |
| 191 garuns_olivier.b0{ | |
| 192 sd = 0 | |
| 193 min = 0.80 | |
| 194 max = 2.40 | |
| 195 } | |
| 196 | |
| 197 garuns_olivier.nu_X{ | |
| 198 sd = 0 | |
| 199 min = 0.2 | |
| 200 max = 1.8 | |
| 201 } | |
| 202 | |
| 203 garuns_olivier.nu_Y{ | |
| 204 sd = 0 | |
| 205 min = 0.2 | |
| 206 max = 1.8 | |
| 207 } | |
| 208 | |
| 209 garuns_olivier.nu_F{ | |
| 210 sd = 0 | |
| 211 min = 0.50 | |
| 212 max = 1.50 | |
| 213 } | |
| 214 | |
| 215 garuns_olivier.nu_P{ | |
| 216 sd = 0 | |
| 217 min = 0.50 | |
| 218 max = 1.50 | |
| 219 } | |
| 220 | |
| 221 garuns_olivier.eD_star{ | |
| 222 sd = 0 | |
| 223 min = 9.0 | |
| 224 max = 15.0 | |
| 225 } | |
| 226 | |
| 227 garuns_olivier.NDF_star{ | |
| 228 sd = 0 | |
| 229 min = 0.10 | |
| 230 max = 0.90 | |
| 231 } | |
| 232 | |
| 233 garuns_olivier.psi{ | |
| 234 sd = 0 | |
| 235 min = 0 | |
| 236 max = 1 | |
| 237 } | |
| 238 | |
| 239 rpm_lite.nu_I{ | |
| 240 sd = 0 | |
| 241 min = 0.00 | |
| 242 max = 0.20 | |
| 243 } | |
| 244 | |
| 245 rpm_lite.nu_B{ | |
| 246 sd = 0 | |
| 247 min = 1.20 | |
| 248 max = 2.20 | |
| 249 } | |
| 250 | |
| 251 rpm_lite.nu_Z{ | |
| 252 sd = 0 | |
| 253 min = 0.90 | |
| 254 max = 1.10 | |
| 255 } | |
| 256 } | |
| 257 | |
| 258 ################################################################################################################# | |
| 259 #====== FARM COMPONENTS: herd (genotype-based initialization of individual cows) # | |
| 260 ################################################################################################################# | |
| 261 | |
| 262 #______ INITIALIZATION of TWIN farm from tables Genotype and Initialization | |
| 263 | |
| 264 # From table Genotype: for all <cow_tag> (all lines) | |
| 265 state{ | |
| 266 state = cow_01 | |
| 267 state = cow_02 | |
| 268 state = cow_03 | |
| 269 state = cow_04 | |
| 270 state = cow_05 | |
| 271 } | |
| 272 | |
| 273 action{ | |
| 274 type = genericlog | |
| 275 name = log_states_cows | |
| 276 | |
| 277 log_type = sqlite | |
| 278 sqlite_path = db_states.sqlite | |
| 279 sqlite_table = user_states | |
| 280 | |
| 281 #log_type = file | |
| 282 #file_path = states-user.txt | |
| 283 #sep_col = \t | |
| 284 #file_line_flush=no | |
| 285 | |
| 286 column{ | |
| 287 value = time | |
| 288 name = time | |
| 289 sqlite_type = numeric | |
| 290 } | |
| 291 column{ | |
| 292 value = state.count.INITIAL-DAM | |
| 293 name = INITIAL-DAM | |
| 294 sqlite_type = numeric | |
| 295 } | |
| 296 column{ | |
| 297 value = state.count.cow_01 | |
| 298 name = cow_01 | |
| 299 sqlite_type = numeric | |
| 300 } | |
| 301 column{ | |
| 302 value = state.count.cow_02 | |
| 303 name = cow_02 | |
| 304 sqlite_type = numeric | |
| 305 } | |
| 306 column{ | |
| 307 value = state.count.cow_03 | |
| 308 name = cow_03 | |
| 309 sqlite_type = numeric | |
| 310 } | |
| 311 column{ | |
| 312 value = state.count.cow_04 | |
| 313 name = cow_04 | |
| 314 sqlite_type = numeric | |
| 315 } | |
| 316 column{ | |
| 317 value = state.count.cow_05 | |
| 318 name = cow_05 | |
| 319 sqlite_type = numeric | |
| 320 } | |
| 321 } | |
| 322 | |
| 323 link{ | |
| 324 trigger = every_day_herd | |
| 325 action = log_states_cows | |
| 326 } | |
| 327 | |
| 328 # From table Genotype: for each <cow_tag> not in table Initialization | |
| 329 init_cow{ | |
| 330 name=cow_03 | |
| 331 | |
| 332 abortion_olivier.delta = constant 3.0 | |
| 333 abortion_olivier.enabled = never | |
| 334 abortion_olivier.dip = vector constant 17 ; constant 64 | |
| 335 abortion_olivier.abo = vector constant 0.02 ; constant 0.005 ; constant 0.0004 | |
| 336 | |
| 337 garuns_olivier.WM = constant 450 | |
| 338 garuns_olivier.khi_M = constant 0.3 | |
| 339 garuns_olivier.b0 = constant 1.6 | |
| 340 garuns_olivier.nu_X = constant 1 | |
| 341 garuns_olivier.nu_Y = constant 1.1 | |
| 342 garuns_olivier.nu_F = constant 1 | |
| 343 garuns_olivier.nu_P = constant 1 | |
| 344 garuns_olivier.eD_star = constant 10.7 | |
| 345 garuns_olivier.NDF_star = constant 1 | |
| 346 garuns_olivier.psi = constant 1 | |
| 347 rpm_lite.nu_B = constant 0.5 | |
| 348 rpm_lite.nu_Z = constant 0.025 | |
| 349 rpm_lite.nu_I = constant 1.7 | |
| 350 } | |
| 351 init_cow{ | |
| 352 name=cow_04 | |
| 353 | |
| 354 abortion_olivier.delta = constant 3.0 | |
| 355 abortion_olivier.enabled = never | |
| 356 abortion_olivier.dip = vector constant 17 ; constant 64 | |
| 357 abortion_olivier.abo = vector constant 0.02 ; constant 0.005 ; constant 0.0004 | |
| 358 | |
| 359 garuns_olivier.WM = constant 450 | |
| 360 garuns_olivier.khi_M = constant 0.3 | |
| 361 garuns_olivier.b0 = constant 1.6 | |
| 362 garuns_olivier.nu_X = constant 1 | |
| 363 garuns_olivier.nu_Y = constant 1.1 | |
| 364 garuns_olivier.nu_F = constant 1 | |
| 365 garuns_olivier.nu_P = constant 1 | |
| 366 garuns_olivier.eD_star = constant 10.7 | |
| 367 garuns_olivier.NDF_star = constant 1 | |
| 368 garuns_olivier.psi = constant 1 | |
| 369 rpm_lite.nu_B = constant 0.5 | |
| 370 rpm_lite.nu_Z = constant 0.025 | |
| 371 rpm_lite.nu_I = constant 1.7 | |
| 372 } | |
| 373 init_cow{ | |
| 374 name=cow_05 | |
| 375 | |
| 376 abortion_olivier.delta = constant 3.0 | |
| 377 abortion_olivier.enabled = never | |
| 378 abortion_olivier.dip = vector constant 17 ; constant 64 | |
| 379 abortion_olivier.abo = vector constant 0.02 ; constant 0.005 ; constant 0.0004 | |
| 380 | |
| 381 garuns_olivier.WM = constant 450 | |
| 382 garuns_olivier.khi_M = constant 0.3 | |
| 383 garuns_olivier.b0 = constant 1.6 | |
| 384 garuns_olivier.nu_X = constant 1 | |
| 385 garuns_olivier.nu_Y = constant 1.1 | |
| 386 garuns_olivier.nu_F = constant 1 | |
| 387 garuns_olivier.nu_P = constant 1 | |
| 388 garuns_olivier.eD_star = constant 10.7 | |
| 389 garuns_olivier.NDF_star = constant 1 | |
| 390 garuns_olivier.psi = constant 1 | |
| 391 rpm_lite.nu_B = constant 0.5 | |
| 392 rpm_lite.nu_Z = constant 0.025 | |
| 393 rpm_lite.nu_I = constant 1.7 | |
| 394 } | |
| 395 | |
| 396 # From table Initialization: for each <dam_tag> (each line) | |
| 397 breed{ | |
| 398 breed = dam_cow_01 | |
| 399 breed = dam_cow_02 | |
| 400 } | |
| 401 | |
| 402 # From table Initialization: for each <sire_tag> (each line) | |
| 403 init_bull{ | |
| 404 name= sire_cow_01 | |
| 405 bull.breed_name = dam_cow_01 | |
| 406 bull.semens_quality = constant 1.0 | |
| 407 bull.female_ratio = constant 1.0 | |
| 408 | |
| 409 # Genotype sub-block associated with cow_01 in table Genotype | |
| 410 garuns_olivier.WM = constant 450 | |
| 411 garuns_olivier.khi_M = constant 0.3 | |
| 412 garuns_olivier.b0 = constant 1.6 | |
| 413 garuns_olivier.nu_X = constant 1 | |
| 414 garuns_olivier.nu_Y = constant 1.1 | |
| 415 garuns_olivier.nu_F = constant 1 | |
| 416 garuns_olivier.nu_P = constant 1 | |
| 417 garuns_olivier.eD_star = constant 10.7 | |
| 418 garuns_olivier.NDF_star = constant 1 | |
| 419 garuns_olivier.psi = constant 1 | |
| 420 rpm_lite.nu_B = constant 0.5 | |
| 421 rpm_lite.nu_Z = constant 0.025 | |
| 422 rpm_lite.nu_I = constant 1.7 | |
| 423 } | |
| 424 init_bull{ | |
| 425 name= sire_cow_02 | |
| 426 bull.breed_name = dam_cow_02 | |
| 427 bull.semens_quality = constant 1.0 | |
| 428 bull.female_ratio = constant 1.0 | |
| 429 | |
| 430 # Genotype sub-block associated with cow_02 in table Genotype | |
| 431 garuns_olivier.WM = constant 450 | |
| 432 garuns_olivier.khi_M = constant 0.3 | |
| 433 garuns_olivier.b0 = constant 1.6 | |
| 434 garuns_olivier.nu_X = constant 1 | |
| 435 garuns_olivier.nu_Y = constant 1.1 | |
| 436 garuns_olivier.nu_F = constant 1 | |
| 437 garuns_olivier.nu_P = constant 1 | |
| 438 garuns_olivier.eD_star = constant 10.7 | |
| 439 garuns_olivier.NDF_star = constant 1 | |
| 440 garuns_olivier.psi = constant 1 | |
| 441 rpm_lite.nu_B = constant 0.5 | |
| 442 rpm_lite.nu_Z = constant 0.025 | |
| 443 rpm_lite.nu_I = constant 1.7 | |
| 444 } | |
| 445 | |
| 446 # From table Initialization: for each <dam_tag> (each line) | |
| 447 init_cow{ | |
| 448 name=dam_cow_01 | |
| 449 #______ Abortion sub-block | |
| 450 abortion_olivier.delta = constant 3.0 | |
| 451 abortion_olivier.enabled = never | |
| 452 abortion_olivier.dip = vector constant 17 ; constant 64 | |
| 453 abortion_olivier.abo = vector constant 0.02 ; constant 0.005 ; constant 0.0004 | |
| 454 | |
| 455 # Genotype sub-block associated with cow_01 in table Genotype | |
| 456 garuns_olivier.WM = constant 450 | |
| 457 garuns_olivier.khi_M = constant 0.3 | |
| 458 garuns_olivier.b0 = constant 1.6 | |
| 459 garuns_olivier.nu_X = constant 1 | |
| 460 garuns_olivier.nu_Y = constant 1.1 | |
| 461 garuns_olivier.nu_F = constant 1 | |
| 462 garuns_olivier.nu_P = constant 1 | |
| 463 garuns_olivier.eD_star = constant 10.7 | |
| 464 garuns_olivier.NDF_star = constant 1 | |
| 465 garuns_olivier.psi = constant 1 | |
| 466 rpm_lite.nu_B = constant 0.5 | |
| 467 rpm_lite.nu_Z = constant 0.025 | |
| 468 rpm_lite.nu_I = constant 1.7 | |
| 469 } | |
| 470 init_cow{ | |
| 471 name=dam_cow_02 | |
| 472 #______ Abortion sub-block | |
| 473 abortion_olivier.delta = constant 3.0 | |
| 474 abortion_olivier.enabled = never | |
| 475 abortion_olivier.dip = vector constant 17 ; constant 64 | |
| 476 abortion_olivier.abo = vector constant 0.02 ; constant 0.005 ; constant 0.0004 | |
| 477 | |
| 478 # Genotype sub-block associated with cow_02 in table Genotype | |
| 479 garuns_olivier.WM = constant 450 | |
| 480 garuns_olivier.khi_M = constant 0.3 | |
| 481 garuns_olivier.b0 = constant 1.6 | |
| 482 garuns_olivier.nu_X = constant 1 | |
| 483 garuns_olivier.nu_Y = constant 1.1 | |
| 484 garuns_olivier.nu_F = constant 1 | |
| 485 garuns_olivier.nu_P = constant 1 | |
| 486 garuns_olivier.eD_star = constant 10.7 | |
| 487 garuns_olivier.NDF_star = constant 1 | |
| 488 garuns_olivier.psi = constant 1 | |
| 489 rpm_lite.nu_B = constant 0.5 | |
| 490 rpm_lite.nu_Z = constant 0.025 | |
| 491 rpm_lite.nu_I = constant 1.7 | |
| 492 } | |
| 493 | |
| 494 # From table Initialization: for each line | |
| 495 # The value of days_after_conception is set such as N = - (birth_date – 280 – start_date) | |
| 496 action{ | |
| 497 type = buy_cow | |
| 498 name = buy_dam_cow_01 | |
| 499 init_cow = dam_cow_01 | |
| 500 init_bull = sire_cow_01 | |
| 501 age = 600 | |
| 502 days_after_conception = -1 | |
| 503 number = 1 | |
| 504 } | |
| 505 action{ | |
| 506 type = buy_cow | |
| 507 name = buy_dam_cow_02 | |
| 508 init_cow = dam_cow_02 | |
| 509 init_bull = sire_cow_02 | |
| 510 age = 600 | |
| 511 days_after_conception = -30 | |
| 512 number = 1 | |
| 513 } | |
| 514 | |
| 515 # From table Initialization: for all lines | |
| 516 link{ | |
| 517 trigger = init | |
| 518 action = buy_dam_cow_01 | |
| 519 action = buy_dam_cow_02 | |
| 520 } | |
| 521 | |
| 522 # From table Initialization: for each line | |
| 523 link{ | |
| 524 trigger = calving | |
| 525 condition = calf_breed dam_cow_01 | |
| 526 action = state_add cow_01 | |
| 527 action = log_db birth_of_female cow_01 birth_from_dam dam_cow_01 birth_from_sire sire_cow_01 | |
| 528 } | |
| 529 link{ | |
| 530 trigger = calving | |
| 531 condition = calf_breed dam_cow_02 | |
| 532 action = state_add cow_02 | |
| 533 action = log_db birth_of_female cow_02 birth_from_dam dam_cow_02 birth_from_sire sire_cow_02 | |
| 534 } | |
| 535 | |
| 536 #______ MANAGE BREEDING of TWIN farm from tables Genotype & Insemination | |
| 537 | |
| 538 # Define once | |
| 539 init_bull{ | |
| 540 name= no_conception | |
| 541 bull.breed_name = NULL | |
| 542 bull.semens_quality = constant 0.0 | |
| 543 bull.female_ratio = constant 0.5 | |
| 544 } | |
| 545 | |
| 546 # For all lines where conception is not 0 | |
| 547 breed{ | |
| 548 breed = NULL #always this line | |
| 549 breed = IA_01 | |
| 550 breed = IA_02 | |
| 551 breed = IA_03 | |
| 552 breed = IA_04 | |
| 553 } | |
| 554 | |
| 555 # From table Insemination: for each line where conception = 1 and calf_sex = 1 (male) | |
| 556 init_bull{ | |
| 557 name= semen_IA_01 | |
| 558 bull.breed_name = IA_01 | |
| 559 bull.semens_quality = constant 1.0 | |
| 560 bull.female_ratio = constant 0.0 | |
| 561 } | |
| 562 | |
| 563 # From table Insemination: for each line where conception = 1 and calf_sex = 0 (female) | |
| 564 init_bull{ | |
| 565 name= semen_IA_02 | |
| 566 bull.breed_name = IA_02 | |
| 567 bull.semens_quality = constant 1.0 | |
| 568 bull.female_ratio = constant 1.0 | |
| 569 | |
| 570 # Genotype sub-block associated with <calf_tag> = cow_03 in table Genotype | |
| 571 garuns_olivier.WM = constant 450 | |
| 572 garuns_olivier.khi_M = constant 0.3 | |
| 573 garuns_olivier.b0 = constant 1.6 | |
| 574 garuns_olivier.nu_X = constant 1 | |
| 575 garuns_olivier.nu_Y = constant 1.1 | |
| 576 garuns_olivier.nu_F = constant 1 | |
| 577 garuns_olivier.nu_P = constant 1 | |
| 578 garuns_olivier.eD_star = constant 10.7 | |
| 579 garuns_olivier.NDF_star = constant 1 | |
| 580 garuns_olivier.psi = constant 1 | |
| 581 rpm_lite.nu_B = constant 0.5 | |
| 582 rpm_lite.nu_Z = constant 0.025 | |
| 583 rpm_lite.nu_I = constant 1.7 | |
| 584 } | |
| 585 init_bull{ | |
| 586 name= semen_IA_03 | |
| 587 bull.breed_name = IA_03 | |
| 588 bull.semens_quality = constant 1.0 | |
| 589 bull.female_ratio = constant 1.0 | |
| 590 | |
| 591 # Genotype sub-block associated with <calf_tag> = cow_05 in table Genotype | |
| 592 garuns_olivier.WM = constant 450 | |
| 593 garuns_olivier.khi_M = constant 0.3 | |
| 594 garuns_olivier.b0 = constant 1.6 | |
| 595 garuns_olivier.nu_X = constant 1 | |
| 596 garuns_olivier.nu_Y = constant 1.1 | |
| 597 garuns_olivier.nu_F = constant 1 | |
| 598 garuns_olivier.nu_P = constant 1 | |
| 599 garuns_olivier.eD_star = constant 10.7 | |
| 600 garuns_olivier.NDF_star = constant 1 | |
| 601 garuns_olivier.psi = constant 1 | |
| 602 rpm_lite.nu_B = constant 0.5 | |
| 603 rpm_lite.nu_Z = constant 0.025 | |
| 604 rpm_lite.nu_I = constant 1.7 | |
| 605 } | |
| 606 init_bull{ | |
| 607 name= semen_IA_04 | |
| 608 bull.breed_name = IA_04 | |
| 609 bull.semens_quality = constant 1.0 | |
| 610 bull.female_ratio = constant 1.0 | |
| 611 | |
| 612 # Genotype sub-block associated with <calf_tag> = cow_04 in table Genotype | |
| 613 garuns_olivier.WM = constant 450 | |
| 614 garuns_olivier.khi_M = constant 0.3 | |
| 615 garuns_olivier.b0 = constant 1.6 | |
| 616 garuns_olivier.nu_X = constant 1 | |
| 617 garuns_olivier.nu_Y = constant 1.1 | |
| 618 garuns_olivier.nu_F = constant 1 | |
| 619 garuns_olivier.nu_P = constant 1 | |
| 620 garuns_olivier.eD_star = constant 10.7 | |
| 621 garuns_olivier.NDF_star = constant 1 | |
| 622 garuns_olivier.psi = constant 1 | |
| 623 rpm_lite.nu_B = constant 0.5 | |
| 624 rpm_lite.nu_Z = constant 0.025 | |
| 625 rpm_lite.nu_I = constant 1.7 | |
| 626 } | |
| 627 | |
| 628 # From table Insemination: for each different <insemination date> | |
| 629 | |
| 630 trigger{ | |
| 631 type = chron | |
| 632 name = trigger_insem_19720221 | |
| 633 scheme = 1972-02-21 12:00:00 | |
| 634 } | |
| 635 trigger{ | |
| 636 type = chron | |
| 637 name = trigger_insem_19730106 | |
| 638 scheme = 1973-01-06 12:00:00 | |
| 639 } | |
| 640 trigger{ | |
| 641 type = chron | |
| 642 name = trigger_insem_19750225 | |
| 643 scheme = 1975-02-25 12:00:00 | |
| 644 } | |
| 645 trigger{ | |
| 646 type = chron | |
| 647 name = trigger_insem_19720321 | |
| 648 scheme = 1972-03-21 12:00:00 | |
| 649 } | |
| 650 trigger{ | |
| 651 type = chron | |
| 652 name = trigger_insem_19730204 | |
| 653 scheme = 1973-02-04 12:00:00 | |
| 654 } | |
| 655 trigger{ | |
| 656 type = chron | |
| 657 name = trigger_insem_19730225 | |
| 658 scheme = 1973-02-25 12:00:00 | |
| 659 } | |
| 660 | |
| 661 # From table Insemination: for each line | |
| 662 | |
| 663 link{ | |
| 664 trigger = trigger_insem_19720221 | |
| 665 action = insemination_IA_01 | |
| 666 } | |
| 667 trigger{ | |
| 668 type = custom | |
| 669 name = trigger_insem_19720221_cow_01 | |
| 670 } | |
| 671 action{ | |
| 672 type = broadcast_now | |
| 673 name = insemination_IA_01 | |
| 674 condition = is_in cow_01 | |
| 675 trigger = trigger_insem_19720221_cow_01 | |
| 676 } | |
| 677 | |
| 678 link{ | |
| 679 trigger = trigger_insem_19730106 | |
| 680 action = insemination_IA_02 | |
| 681 } | |
| 682 trigger{ | |
| 683 type = custom | |
| 684 name = trigger_insem_19730106_cow_01 | |
| 685 } | |
| 686 action{ | |
| 687 type = broadcast_now | |
| 688 name = insemination_IA_02 | |
| 689 condition = is_in cow_01 | |
| 690 trigger = trigger_insem_19730106_cow_01 | |
| 691 } | |
| 692 | |
| 693 link{ | |
| 694 trigger = trigger_insem_19750225 | |
| 695 action = insemination_IA_03 | |
| 696 } | |
| 697 trigger{ | |
| 698 type = custom | |
| 699 name = trigger_insem_19750225_cow_03 | |
| 700 } | |
| 701 action{ | |
| 702 type = broadcast_now | |
| 703 name = insemination_IA_03 | |
| 704 condition = is_in cow_03 | |
| 705 trigger = trigger_insem_19750225_cow_03 | |
| 706 } | |
| 707 | |
| 708 link{ | |
| 709 trigger = trigger_insem_19720321 | |
| 710 action = insemination_IA_04 | |
| 711 } | |
| 712 trigger{ | |
| 713 type = custom | |
| 714 name = trigger_insem_19720321_cow_02 | |
| 715 } | |
| 716 action{ | |
| 717 type = broadcast_now | |
| 718 name = insemination_IA_04 | |
| 719 condition = is_in cow_02 | |
| 720 trigger = trigger_insem_19720321_cow_02 | |
| 721 } | |
| 722 | |
| 723 link{ | |
| 724 trigger = trigger_insem_19730204 | |
| 725 action = insemination_IA_05 | |
| 726 } | |
| 727 trigger{ | |
| 728 type = custom | |
| 729 name = trigger_insem_19730204_cow_02 | |
| 730 } | |
| 731 action{ | |
| 732 type = broadcast_now | |
| 733 name = insemination_IA_05 | |
| 734 condition = is_in cow_02 | |
| 735 trigger = trigger_insem_19730204_cow_02 | |
| 736 } | |
| 737 | |
| 738 link{ | |
| 739 trigger = trigger_insem_19730225 | |
| 740 action = insemination_IA_06 | |
| 741 } | |
| 742 trigger{ | |
| 743 type = custom | |
| 744 name = trigger_insem_19730225_cow_02 | |
| 745 } | |
| 746 action{ | |
| 747 type = broadcast_now | |
| 748 name = insemination_IA_06 | |
| 749 condition = is_in cow_02 | |
| 750 trigger = trigger_insem_19730225_cow_02 | |
| 751 } | |
| 752 | |
| 753 # From table Insemination : for each line WHERE conception = 0 | |
| 754 link{ | |
| 755 trigger = trigger_insem_19730204_cow_02 | |
| 756 action = inseminate no_conception | |
| 757 } | |
| 758 | |
| 759 link{ | |
| 760 trigger = trigger_insem_19730225_cow_02 | |
| 761 action = inseminate no_conception | |
| 762 } | |
| 763 | |
| 764 # From table Insemination : for each line WHERE conception = 1 | |
| 765 | |
| 766 link{ | |
| 767 trigger = trigger_insem_19720221_cow_01 | |
| 768 action = force_conception semen_IA_01 | |
| 769 } | |
| 770 | |
| 771 link{ | |
| 772 trigger = trigger_insem_19730106_cow_01 | |
| 773 action = force_conception semen_IA_02 | |
| 774 } | |
| 775 | |
| 776 link{ | |
| 777 trigger = trigger_insem_19750225_cow_03 | |
| 778 action = force_conception semen_IA_03 | |
| 779 } | |
| 780 | |
| 781 link{ | |
| 782 trigger = trigger_insem_19720321_cow_02 | |
| 783 action = force_conception semen_IA_04 | |
| 784 } | |
| 785 | |
| 786 # From table Insemination : for each line WHERE conception = 1 AND calf_sex = 0 (female) | |
| 787 | |
| 788 link{ | |
| 789 trigger = calving | |
| 790 condition = calf_breed IA_02 | |
| 791 action = state_add cow_03 | |
| 792 action = log_db birth_of_female cow_03 birth_from_dam cow_01 birth_from_sire sire_20 | |
| 793 } | |
| 794 | |
| 795 link{ | |
| 796 trigger = calving | |
| 797 condition = calf_breed IA_03 | |
| 798 action = state_add cow_05 | |
| 799 action = log_db birth_of_female cow_05 birth_from_dam cow_03 birth_from_sire sire_20 | |
| 800 } | |
| 801 | |
| 802 link{ | |
| 803 trigger = calving | |
| 804 condition = calf_breed IA_04 | |
| 805 action = state_add cow_04 | |
| 806 action = log_db birth_of_female cow_04 birth_from_dam cow_02 birth_from_sire sire_20 | |
| 807 } | |
| 808 | |
| 809 # From table Insemination : for each line WHERE conception = 1 AND calf_sex = 0 (male) | |
| 810 | |
| 811 link{ | |
| 812 trigger = calving | |
| 813 condition = calf_breed IA_01 | |
| 814 action = log_db birth_of_male calf_a birth_from_dam cow_01 birth_from_sire sire_10 | |
| 815 } | |
| 816 | |
| 817 #______ MANAGE DEATH of TWIN farm from table Death | |
| 818 | |
| 819 # From table Death: for each different <death_date> | |
| 820 trigger{ | |
| 821 type = chron | |
| 822 name = trigger_death_19741001 | |
| 823 scheme = 1974-10-01 23:59:59 | |
| 824 } | |
| 825 | |
| 826 # From table Death: for each different <cow_tag> | |
| 827 | |
| 828 link{ | |
| 829 trigger = trigger_death_19741001 | |
| 830 action = death_cow_01 | |
| 831 } | |
| 832 trigger{ | |
| 833 type = custom | |
| 834 name = trigger_death_19741001_cow_01 | |
| 835 } | |
| 836 action{ | |
| 837 type = broadcast_now | |
| 838 name = death_cow_01 | |
| 839 condition = is_in cow_01 | |
| 840 trigger = trigger_death_19741001_cow_01 | |
| 841 } | |
| 842 link{ | |
| 843 trigger = trigger_death_19741001_cow_01 | |
| 844 #action = log_db death_of_cow cow_01 | |
| 845 #action = delete_cow death | |
| 846 action = trigger_now om_death | |
| 847 } | |
| 848 | |
| 849 #______ MANAGE CULLING of TWIN farm from table Culling | |
| 850 | |
| 851 # From table Culling: for each different <culling_date> | |
| 852 trigger{ | |
| 853 type = chron | |
| 854 name = trigger_culling_19731025 | |
| 855 scheme = 1973-10-25 06:00:00 | |
| 856 } | |
| 857 | |
| 858 # From table Culling: for each different <cow_tag> | |
| 859 | |
| 860 link{ | |
| 861 trigger = trigger_culling_19731025 | |
| 862 action = culling_cow_02 | |
| 863 } | |
| 864 trigger{ | |
| 865 type = custom | |
| 866 name = trigger_culling_19731025_cow_02 | |
| 867 } | |
| 868 action{ | |
| 869 type = broadcast_now | |
| 870 name = culling_cow_02 | |
| 871 condition = is_in cow_02 | |
| 872 trigger = trigger_culling_19731025_cow_02 | |
| 873 } | |
| 874 link{ | |
| 875 trigger = trigger_culling_19731025_cow_02 | |
| 876 #action = log_db culling_of_cow cow_02 | |
| 877 action = delete_cow culling cow_02 | |
| 878 action = log_db delete_cow: for a reason | |
| 879 } | |
| 880 | |
| 881 | |
| 882 #______ MANAGE DRYING-OFF of TWIN farm from table Drying-off | |
| 883 | |
| 884 # From table Drying-off: for each different <drying_off_date> | |
| 885 trigger{ | |
| 886 type = chron | |
| 887 name = trigger_dryingoff_19730923 | |
| 888 scheme = 1973-09-23 14:00:00 | |
| 889 } | |
| 890 trigger{ | |
| 891 type = chron | |
| 892 name = trigger_dryingoff_19740809 | |
| 893 scheme = 1974-08-09 14:00:00 | |
| 894 } | |
| 895 trigger{ | |
| 896 type = chron | |
| 897 name = trigger_dryingoff_19760927 | |
| 898 scheme = 1976-09-27 14:00:00 | |
| 899 } | |
| 900 trigger{ | |
| 901 type = chron | |
| 902 name = trigger_dryingoff_19731022 | |
| 903 scheme = 1973-10-22 14:00:00 | |
| 904 } | |
| 905 | |
| 906 # From table Drying-off: for each different <cow_tag> | |
| 907 link{ | |
| 908 trigger = trigger_dryingoff_19730923 | |
| 909 action = dryingoff_cow_01_parity_1 | |
| 910 } | |
| 911 trigger{ | |
| 912 type = custom | |
| 913 name = trigger_dryingoff_19730923_cow_01 | |
| 914 } | |
| 915 action{ | |
| 916 type = broadcast_now | |
| 917 name = dryingoff_cow_01_parity_1 | |
| 918 condition = is_in cow_01 | |
| 919 trigger = trigger_dryingoff_19730923_cow_01 | |
| 920 } | |
| 921 link{ | |
| 922 trigger = trigger_dryingoff_19730923_cow_01 | |
| 923 #action = log_db dryingoff_of_cow cow_01 dryingoff_in_parity 1 | |
| 924 action = stop_milking | |
| 925 action = log_db stop_milking: cow_01 in_parity 1 | |
| 926 | |
| 927 } | |
| 928 | |
| 929 link{ | |
| 930 trigger = trigger_dryingoff_19740809 | |
| 931 action = dryingoff_cow_01_parity_2 | |
| 932 } | |
| 933 trigger{ | |
| 934 type = custom | |
| 935 name = trigger_dryingoff_19740809_cow_01 | |
| 936 } | |
| 937 action{ | |
| 938 type = broadcast_now | |
| 939 name = dryingoff_cow_01_parity_2 | |
| 940 condition = is_in cow_01 | |
| 941 trigger = trigger_dryingoff_19740809_cow_01 | |
| 942 } | |
| 943 link{ | |
| 944 trigger = trigger_dryingoff_19740809_cow_01 | |
| 945 #action = log_db dryingoff_of_cow cow_01 dryingoff_in_parity 2 | |
| 946 action = stop_milking | |
| 947 action = log_db stop_milking: cow_01 in_parity 2 | |
| 948 } | |
| 949 | |
| 950 link{ | |
| 951 trigger = trigger_dryingoff_19760927 | |
| 952 action = dryingoff_cow_03_parity_1 | |
| 953 } | |
| 954 trigger{ | |
| 955 type = custom | |
| 956 name = trigger_dryingoff_19760927_cow_03 | |
| 957 } | |
| 958 action{ | |
| 959 type = broadcast_now | |
| 960 name = dryingoff_cow_03_parity_1 | |
| 961 condition = is_in cow_03 | |
| 962 trigger = trigger_dryingoff_19760927_cow_03 | |
| 963 } | |
| 964 link{ | |
| 965 trigger = trigger_dryingoff_19760927_cow_03 | |
| 966 #action = log_db dryingoff_of_cow cow_03 dryingoff_in_parity 1 | |
| 967 action = stop_milking | |
| 968 action = log_db stop_milking: cow_03 in_parity 1 | |
| 969 } | |
| 970 | |
| 971 link{ | |
| 972 trigger = trigger_dryingoff_19731022 | |
| 973 action = dryingoff_cow_02_parity_1 | |
| 974 } | |
| 975 trigger{ | |
| 976 type = custom | |
| 977 name = trigger_dryingoff_19731022_cow_02 | |
| 978 } | |
| 979 action{ | |
| 980 type = broadcast_now | |
| 981 name = dryingoff_cow_02_parity_1 | |
| 982 condition = is_in cow_02 | |
| 983 trigger = trigger_dryingoff_19731022_cow_02 | |
| 984 } | |
| 985 link{ | |
| 986 trigger = trigger_dryingoff_19731022_cow_02 | |
| 987 #action = log_db dryingoff_of_cow cow_02 dryingoff_in_parity 1 | |
| 988 action = stop_milking | |
| 989 action = log_db stop_milking: cow_02 in_parity 1 | |
| 990 } | |
| 991 | |
| 992 | |
| 993 | |
| 994 | |
| 995 ################################################################################################################# | |
| 996 #====== FARM COMPONENTS: semen (genotype-based initialization of semen from individual bulls) # | |
| 997 ################################################################################################################# | |
| 998 | |
| 999 | |
| 1000 ################################################################################################################# | |
| 1001 #====== FARM COMPONENTS: heat detection # | |
| 1002 ################################################################################################################# | |
| 1003 | |
| 1004 | |
| 1005 ################################################################################################################# | |
| 1006 #====== FARM COMPONENTS: feedstuffs # | |
| 1007 ################################################################################################################# | |
| 1008 | |
| 1009 | |
| 1010 ################################################################################################################# | |
| 1011 #====== FARM COMPONENTS: diets # | |
| 1012 ################################################################################################################# | |
| 1013 | |
| 1014 | |
| 1015 ################################################################################################################# | |
| 1016 #====== FARM COMPONENTS: time schemes # | |
| 1017 ################################################################################################################# | |
| 1018 | |
| 1019 | |
| 1020 ################################################################################################################# | |
| 1021 #====== FARM COMPONENTS: groups # | |
| 1022 ################################################################################################################# | |
| 1023 | |
| 1024 | |
| 1025 ################################################################################################################# | |
| 1026 #====== FARM COMPONENTS: operations # | |
| 1027 ################################################################################################################# | |
| 1028 | |
| 1029 | |
| 1030 ################################################################################################################# | |
| 1031 #====== FARM COMPONENTS: transfers # | |
| 1032 ################################################################################################################# | |
| 1033 | |
| 1034 | |
| 1035 ################################################################################################################# | |
| 1036 #====== FARM COMPONENTS: perturbations # | |
| 1037 ################################################################################################################# | |
| 1038 | |
| 1039 | |
| 1040 ################################################################################################################# | |
| 1041 #====== FARM COMPONENTS: parcels # | |
| 1042 ################################################################################################################# | |
| 1043 | |
| 1044 |
