Mercurial > repos > siwaa > insilicow
changeset 3:3fe3e1e6a40b draft default tip
"planemo upload for repository https://forgemia.inra.fr/insilicow/insilicow-tool commit b530a8209615f225696abe3e0ba49093ff3dc4ad"
line wrap: on
line diff
--- a/insilicow.xml Wed May 28 08:37:22 2025 +0000 +++ b/insilicow.xml Mon Aug 25 16:37:43 2025 +0000 @@ -1,7 +1,7 @@ -<tool id="inSiliCow" name="inSiliCow" version="1.0.2"> +<tool id="inSiliCow" name="inSiliCow" version="1.0.3"> <description>to run the inSiliCow simulator</description> <requirements> - <container type="singularity">docker://registry.forgemia.inra.fr/insilicow/insilicow-container:ea8a24d5d56c3d12d53303db6d47ef77382c843f</container> + <container type="singularity">docker://registry.forge.inrae.fr/insilicow/insilicow-container:11033edc7bff96a835e5db00ba5655e4bbf06285</container> </requirements> <command detect_errors="aggressive"> <![CDATA[ @@ -72,7 +72,7 @@ ------- - Wrappedt tool authors: Olivier Martin (MoSAR) <olivier.martin-mosar@inrae.fr>, Pierre Blavy <pierre.blavy@inrae.fr> - Insilicow project site: https://digitbio.hub.inrae.fr/rubriques-verticales2/nos-actions/projets-phares/projet-phare-insilicow-2024-2028 -- Insilicow repository: https://forgemia.inra.fr/insilicow +- Insilicow repository: https://forge.inrae.fr/insilicow - Underlying container maintainer: Eric Casellas <eric.casellas@inrae.fr> - Galaxy tool maintainer: Patrick Chabrier <patrick.chabrier@inrae.fr> - Copyright: INRAE
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/input/ALIEN-demo/explan.txt Mon Aug 25 16:37:43 2025 +0000 @@ -0,0 +1,2 @@ +template_file sim_id farm_tag start_date stop_date now_date latitude longitude +farmer-plan_ALIEN-demo.txt sim_1 ALIEN-demo 1970-01-01 1979-01-01 1970-01-01 4.444444 5.555555
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/input/ALIEN-demo/farmer-plan_ALIEN-demo.txt Mon Aug 25 16:37:43 2025 +0000 @@ -0,0 +1,1032 @@ +################################################################################################################# +# # +# InSiliCow # +# Virtual farm specification # +# # +################################################################################################################# + +################################################################################################################# +#====== GENERAL SETTINGS # +################################################################################################################# + +#______ Include files +@include farmer-log.txt # providing log action and trigger +@include farmer-base.txt # providing basic components + +#______ Models: specify models for individual cows +param_general{ + garuns_type = garuns_olivier + rpm_type = rpm_lite + abortion_type = abortion_olivier +} + +#______ Simulation: provide time range, output database and code name +init{ + begin_date = $start_date$ 00:00:00 + end_date = $stop_date$ 23:59:59 + output_db = db_events.sqlite + output_config = config.txt + name = $sim_id$ +} + +#______ Log Farm information +link{ + trigger = init + action = log_db farm_tag $farm_tag$ + action = log_db start_date $start_date$ + action = log_db stop_date $stop_date$ + action = log_db now_date $now_date$ + action = log_db latitude $latitude$ + action = log_db longitude $longitude$ +} + +#______ End of simulation +trigger{ + type = chron + name = tr_end_simu + scheme = $stop_date$ 23:59:58 +} + +#______ Past and future +condition{ + type = chron_range + name = past + from = $start_date$ 00:00:00 + to = $now_date$ 00:00:01 +} + +condition{ + type = chron_range + name = future + from = $now_date$ 00:00:00 + to = $stop_date$ 23:59:59 +} + +#______ Day one +trigger{ + type = chron + name = day_one_herd + scheme = $start_date$ 23:59:59 +} +trigger{ + type = custom + name = day_one +} +link{ + trigger = day_one_herd + action = broadcast_now day_one +} + +#______ Calving tag +link{ + trigger = calving + condition = calf_sex male + condition = future + action = log_db birth_of_male no_tag +} +link{ + trigger = calving + condition = calf_sex female + condition = future + action = log_db birth_of_female no_tag +} + +#______ Manage initial dam +state{ + state = INITIAL-DAM +} + +link{ + trigger = day_one + action = state_add INITIAL-DAM +} +link{ + trigger = parturition + condition = is_in INITIAL-DAM + condition = not is_in IN_WILD + action = trigger_later tr_delete_cow 1 +} +trigger{ + type = custom + name = tr_delete_cow +} +link{ + trigger = tr_delete_cow + action = delete_cow remove_initial_dam +} + +#______ Stoechio +stoechio{ + +} + +################################################################################################################# +#====== FARMING # +################################################################################################################# + +#______ Keep cows and calves in farm: no natural mating + +link{ + trigger = enter IN_WILD + action = state_move IN_WILD IN_FARM +} + +link{ + trigger = enter WILD_COW + action = state_move WILD_COW DRY_COW +} + +#______ Remove calf from dam: no natural weaning + +link{ + trigger = enter SUCKLING_CALF + action = state_move SUCKLING_CALF NURSED_CALF +} + +#______ Milk cows: no natural drying-off at calf weaning + +link{ + trigger = enter NURSING_COW + action = state_move NURSING_COW LACTATING_COW +} + +#______ Optimal feeding + +link{ + trigger = enter IN_FARM + action = trigger_later tr_optimal_feeding 0 +} +trigger{ + type = custom + name = tr_optimal_feeding +} +link{ + trigger = tr_optimal_feeding + action = change_food optimal +} + + +################################################################################################################# +#====== FARM COMPONENTS: genotype # +################################################################################################################# + +#______ Genetic_sD: provide Mendelian sampling std dev for transmission of Genetic Scaling Parameters (GSP) +# GSP_newborn ~ Normal [ (GSP_mother + GSP_father)/2 , GSP_sd ] | within (min, max) + +genetic_sd{ + garuns_olivier.WM{ + sd = 50 + min = 200 + max = 800 + } + + garuns_olivier.khi_M { + sd = 0.06 + min = 0.1 + max = 0.6 + } + + garuns_olivier.b0{ + sd = 0 + min = 0.80 + max = 2.40 + } + + garuns_olivier.nu_X{ + sd = 0 + min = 0.2 + max = 1.8 + } + + garuns_olivier.nu_Y{ + sd = 0.1 + min = 0.2 + max = 1.8 + } + + garuns_olivier.nu_F{ + sd = 0 + min = 0.50 + max = 1.50 + } + + garuns_olivier.nu_P{ + sd = 0 + min = 0.50 + max = 1.50 + } + + garuns_olivier.eD_star{ + sd = 0 + min = 9.0 + max = 15.0 + } + + garuns_olivier.NDF_star{ + sd = 0 + min = 0.10 + max = 0.90 + } + + garuns_olivier.psi{ + sd = 0 + min = 0 + max = 1 + } + + rpm_lite.nu_I{ + sd = 0.007 + min = 0.00 + max = 0.20 + } + + rpm_lite.nu_B{ + sd = 0.07 + min = 1.20 + max = 2.20 + } + + rpm_lite.nu_Z{ + sd = 0.02 + min = 0.90 + max = 1.10 + } +} + +################################################################################################################# +#====== FARM COMPONENTS: herd (genotype-based initialization of individual cows) # +################################################################################################################# + +#______ INITIALIZATION of ALIEN farm + +#______ Initial dam +init_cow{ + name=initial_dam + + ### ABORTION rules according to days in pregnancy (dip) + abortion_olivier.delta = constant 3.0 + abortion_olivier.enabled = never + abortion_olivier.dip = vector constant 17 ; constant 64 + abortion_olivier.abo = vector constant 0.02 ; constant 0.005 ; constant 0.0004 + garuns_olivier.WM = norm99 450 50 #450 ± 25 + garuns_olivier.khi_M = norm99 0.30 0.03 # 0.33 ± 0.03 + garuns_olivier.b0 = norm99 1.6 0 # 1.6 ± 0.16 + garuns_olivier.nu_X = norm99 1 0 # 1.0 ± 0.10 + garuns_olivier.nu_Y = norm99 1.1 0.1 # 1.0 ± 0.10 + garuns_olivier.nu_F = norm99 1 0 # 1.0 ± 0.02 + garuns_olivier.nu_P = norm99 1 0 # 1.0 ± 0.02 + garuns_olivier.eD_star = norm99 10.7 0 # 10.7 ± 0.5 + garuns_olivier.NDF_star = norm99 0.5 0 # 0.5 ± 0.02 + garuns_olivier.psi = norm99 0.5 0 + rpm_lite.nu_B = norm99 1.7 0.07 # 1.7 ± 0.07 + rpm_lite.nu_Z = norm99 1 0.02 # 1.0 ± 0.02 + rpm_lite.nu_I = norm99 0.025 0.007 # 0.026 ± 0.007 +} + +#______ Initial sire +init_bull{ + name=semen_initial_sire + bull.breed_name = dairy + bull.semens_quality = constant 1.0 + bull.female_ratio = constant 1.0 + garuns_olivier.WM = norm99 450 50 #450 ± 25 + garuns_olivier.khi_M = norm99 0.30 0.03 # 0.33 ± 0.03 + garuns_olivier.b0 = norm99 1.6 0 # 1.6 ± 0.16 + garuns_olivier.nu_X = norm99 1 0 # 1.0 ± 0.10 + garuns_olivier.nu_Y = norm99 1.1 0.1 # 1.0 ± 0.10 + garuns_olivier.nu_F = norm99 1 0 # 1.0 ± 0.02 + garuns_olivier.nu_P = norm99 1 0 # 1.0 ± 0.02 + garuns_olivier.eD_star = norm99 10.7 0 # 10.7 ± 0.5 + garuns_olivier.NDF_star = norm99 0.5 0 # 0.5 ± 0.02 + garuns_olivier.psi = norm99 0.5 0 + rpm_lite.nu_B = norm99 1.7 0.07 # 1.7 ± 0.07 + rpm_lite.nu_Z = norm99 1 0.02 # 1.0 ± 0.02 + rpm_lite.nu_I = norm99 0.025 0.007 # 0.026 ± 0.007 +} + + +#______ Generate dams of each individual cow to create + +action{ + type = buy_cow + name = buy_dam_of_id0001 + init_cow = initial_dam + init_bull = semen_initial_sire + age = 600 + days_after_conception = -1 + number = 1 +} + +action{ + type = buy_cow + name = buy_dam_of_id0002 + init_cow = initial_dam + init_bull = semen_initial_sire + age = 600 + days_after_conception = -30 + number = 1 +} + +action{ + type = buy_cow + name = buy_dam_of_id0003 + init_cow = initial_dam + init_bull = semen_initial_sire + age = 600 + days_after_conception = -600 + number = 1 +} + +link{ + trigger = init + action = buy_dam_of_id0001 + action = buy_dam_of_id0002 + action = buy_dam_of_id0003 +} + + +################################################################################################################# +#====== FARM COMPONENTS: semen (genotype-based initialization of semen from individual bulls) # +################################################################################################################# + +# Only the semen of individual bulls is generated and used for insemination + +breed{ + breed = dairy + breed = beef +} + +init_bull{ + name=semen_dairy_standard + bull.breed_name = dairy + + ### QUALITY & SEX RATIO + bull.semens_quality = norm99 0.95 0.05 # a number between 0.0 (=never works) and 1.0 (=perfect) + bull.female_ratio = constant 0.5 # offspring sex ratio. 1.0 = 100%female, 0.0=0%female + + ### GARUNS & RPM_lite Genetic Scaling Parameters + # Genotype sub-block (see genotype_generic.txt) + + garuns_olivier.WM = constant 450 #450 + garuns_olivier.khi_M = constant 0.30 # 0.33 + garuns_olivier.b0 = constant 1.6 # 1.6 + garuns_olivier.nu_X = constant 1 # 1.0 + garuns_olivier.nu_Y = constant 1.1 # 1.0 + garuns_olivier.nu_F = constant 1 # 1.0 + garuns_olivier.nu_P = constant 1 # 1.0 + garuns_olivier.eD_star = constant 10.7 # 10.7 + garuns_olivier.NDF_star = constant 0.5 # 0.5 + garuns_olivier.psi = constant 0.5 + rpm_lite.nu_B = constant 1.7 # 1.7 + rpm_lite.nu_Z = constant 1 # 1.0 + rpm_lite.nu_I = constant 0.025 # 0.026 +} + + + +################################################################################################################# +#====== FARM COMPONENTS: heat detection # +################################################################################################################# + +#______ Estrous detection method +estrous_detection_method{ + name=estrous_detection_default + + #When do we observe oestruses + time_slice = 06:00:00 18:00:00 #00:00:01 23:59:59 + + #estrogene is transformed to an expression using a Hill function + expression_threshold=0.75 #default 0.75 + expression_stiffness=7 #default 7 + + #the oestrus worth an insemination if the memory function is above this threshold + #THIS threshold is scaled for an observation all the day long + #if you observe half a day multiply this threshold by 0.5 + #1.0 is a reasonable base value for all day observations + detection_threshold=0.05 # 0.1 + + #then, the oestrus is truely detected with a chance of + sensitivity = 0.75 #0.7 + + #then an average of wrong_oestrus_per_day are generated + wrong_oestrus_per_day = 0 #0.00 +} + +################################################################################################################# +#====== FARM COMPONENTS: feedstuffs # +################################################################################################################# + + +################################################################################################################# +#====== FARM COMPONENTS: diets # +################################################################################################################# + +feed{ + name = calf_diet + type = mix + + feed = CPL.MLK + proportion = 1.00 +} + +feed{ + name = heifer_diet + type = mix + + feed = FO.STR + proportion = 0.02 + feed = FO.HAP + proportion = 0.60 + feed = FO.GSI + proportion = 0.32 + feed = CO.CER + proportion = 0.05 + feed = CPL.CMV + proportion = 0.01 +} + +feed{ + name = lactation_diet + type = mix + + feed = FO.STR + proportion = 0.01 + feed = FO.HAP + proportion = 0.03 + feed = FO.GSI + proportion = 0.04 + feed = FO.CSI + proportion = 0.70 + feed = CO.CER + proportion = 0.05 + feed = CO.OSC + proportion = 0.13 + feed = CO.ROO + proportion = 0.03 + feed = CPL.CMV + proportion = 0.01 +} + +feed{ + name = drycow_diet + type = mix + + feed = FO.STR + proportion = 0.02 + feed = FO.HAP + proportion = 0.68 + feed = FO.CSI + proportion = 0.08 + feed = CO.CER + proportion = 0.05 + feed = CO.OSC + proportion = 0.13 + feed = CO.ROO + proportion = 0.03 + feed = CPL.CMV + proportion = 0.01 +} + +feed{ + name = pasture_diet + type = mix + + feed = FO.FGX + proportion = 0.778 + feed = CO.CER + proportion = 0.050 + feed = CO.OSC + proportion = 0.130 + feed = CO.TUB + proportion = 0.002 + feed = CO.ROO + proportion = 0.030 + feed = CPL.CMV + proportion = 0.010 +} + + + + +################################################################################################################# +#====== FARM COMPONENTS: time schemes # +################################################################################################################# + + + +#_______Breeding season: every year from *-03-21 00:00:00 to *-06-21 23:59:59 + +condition{ + type = chron_range + name = breeding_season + from = *-03-21 00:00:00 #date_breeding_start + to = *-06-21 23:59:59 #date_breeding_stop +} + +trigger{ + type = chron + name = breeding_start + scheme = *-03-21 00:00:00 #date_breeding_start +} + +trigger{ + type = chron + name = breeding_stop + scheme = *-06-21 23:59:59 #date_breeding_stop +} + +#_______Outdoor date + +trigger{ + type = chron + name = outdoor_herd + scheme = *-04-01 00:00:00 +} +trigger{ + type = custom + name = outdoor +} +link{ + trigger = outdoor_herd + action = broadcast_now outdoor +} + +#_______Indoor date + +trigger{ + type = chron + name = indoor_herd + scheme = *-10-01 00:00:00 +} +trigger{ + type = custom + name = indoor +} +link{ + trigger = indoor_herd + action = broadcast_now indoor +} + + + + +################################################################################################################# +#====== FARM COMPONENTS: groups # +################################################################################################################# + +state{ + state = REARED_CALF + state = WEANED_HEIFER + state = UNEXPECTED_PREGNANT + state = INSEMINATED + state = EXPECTED_PREGNANT + state = EXPECTED_TO_CALVE + state = CALVED + state = TO_BREED + state = TO_CULL +} + +action{ + type = genericlog + name = log_states_user + + log_type = sqlite + sqlite_path = db_states.sqlite + sqlite_table = user_states + + #log_type = file + #file_path = states-user.txt + #sep_col = \t + #file_line_flush=no + + + #--- from cow and simulator --- + column{ + value = time + name = time + sqlite_type = numeric + } + + column{ + value = state.count.REARED_CALF + name = REARED_CALF + sqlite_type = numeric + } + + column{ + value = state.count.WEANED_HEIFER + name = WEANED_HEIFER + sqlite_type = numeric + } + + column{ + value = state.count.UNEXPECTED_PREGNANT + name = UNEXPECTED_PREGNANT + sqlite_type = numeric + } + + column{ + value = state.count.INSEMINATED + name = INSEMINATED + sqlite_type = numeric + } + + column{ + value = state.count.EXPECTED_PREGNANT + name = EXPECTED_PREGNANT + sqlite_type = numeric + } + + column{ + value = state.count.EXPECTED_TO_CALVE + name = EXPECTED_TO_CALVE + sqlite_type = numeric + } + + column{ + value = state.count.CALVED + name = CALVED + sqlite_type = numeric + } + + column{ + value = state.count.TO_BREED + name = TO_BREED + sqlite_type = numeric + } + + column{ + value = state.count.TO_CULL + name = TO_CULL + sqlite_type = numeric + } + +} + +link{ + trigger = every_day_herd + action = log_states_user +} + +################################################################################################################# +#====== FARM COMPONENTS: operations # +################################################################################################################# + + +#______ Rear calves at 6 d + +trigger{ + type = custom + name = tr_rear_calf +} + +link{ + trigger = enter NURSED_CALF + action = trigger_later tr_rear_calf 6 +} + +link{ + trigger = tr_rear_calf + action = state_add REARED_CALF +} + +#______ Sell calves according to calf pen capacity + +link{ + trigger = every_day + condition = state_size REARED_CALF > 25 #calf_pen_capacity + action = sell_calves +} + +trigger{ + type = custom + name = tr_sell_calves +} + +action{ + type = broadcast_now + name = sell_calves + condition = is_in REARED_CALF + sortby = age + reverse = no + limit = 1 + trigger = tr_sell_calves +} + +link{ + trigger = tr_sell_calves + action = state_delete REARED_CALF + action = delete_cow sale of calves +} + +#______ Wean calves at 100 days + +link{ + trigger = every_day + condition = age >= 100 + action = state_move REARED_CALF WEANED_HEIFER +} + +#______ Open breeding +link{ + trigger = every_day + condition = age > 450 #breeding_age + condition = breeding_season + action = state_move WEANED_HEIFER UNEXPECTED_PREGNANT + action = state_move TO_BREED UNEXPECTED_PREGNANT + action = state_move EXPECTED_TO_CALVE UNEXPECTED_PREGNANT +} + +#______ Start estrous detection + +link{ + trigger = enter UNEXPECTED_PREGNANT + action = estrous_start estrous_detection_default +} + +#______ Detect estrous + +link{ + trigger = estrous + condition = is_in IN_FARM + action = state_move EXPECTED_PREGNANT UNEXPECTED_PREGNANT +} + +#______ Inseminate once a day when estrous is detected + +trigger{ + type = custom + name = tr_move_to_EXPECTED_PREGNANT +} + +link{ + trigger = tr_move_to_EXPECTED_PREGNANT + action = state_move INSEMINATED EXPECTED_PREGNANT +} + +link{ + trigger = estrous + condition = is_in IN_FARM + condition = future + condition = is_in UNEXPECTED_PREGNANT + action = state_move UNEXPECTED_PREGNANT INSEMINATED + action = trigger_later tr_move_to_EXPECTED_PREGNANT 1 + action = log_db 01_INSEMINATION + action = inseminate semen_dairy_standard +} + +#______ Close breeding +link{ + trigger = every_day + condition = is_in IN_FARM + condition = not breeding_season + action = state_move EXPECTED_PREGNANT EXPECTED_TO_CALVE + action = state_move INSEMINATED EXPECTED_TO_CALVE + action = estrous_stop +} + +link{ + trigger = every_day + condition = is_in IN_FARM + condition = is_in UNEXPECTED_PREGNANT + condition = not breeding_season + action = state_move UNEXPECTED_PREGNANT TO_CULL + action = log_db delete_cow: unexpected pregnant at the end of breeding season + action = estrous_stop +} + + + + + + + +#_______ Postpartum management + +trigger{ + type = custom + name = tr_postpartum +} + +link{ + trigger = parturition + action = state_move EXPECTED_TO_CALVE CALVED + action = trigger_later tr_postpartum 40 # VWP + } + +link{ + trigger = tr_postpartum + action = state_move CALVED TO_BREED +} + +#_______ Late abortion management + +#Abortions after 210 days in pregnancy are managed by culling +link{ + trigger = abortion + condition = days_after_conception > 210 + #action = log_db TO_CULL_from_PREGNANT_after_late_fetal_death + action = log_db delete_cow: after fetal death > 210 days + action = state_move EXPECTED_PREGNANT TO_CULL + action = state_move EXPECTED_TO_CALVE TO_CULL +} + +#_______ Drying-off after 305 days in milk if cow is expected to calve + +link{ + trigger = every_day + condition = is_in IN_FARM + condition = is_milking + condition = is_in EXPECTED_TO_CALVE + condition = days_after_calving >= 305 + action = stop_milking + action = log_db stop_milking: pregnant & days_after_calving >= 305 days + +} + +#_______ Drying-off if milk yield < 5 kg/d + +link{ + trigger = every_day + condition = is_in IN_FARM + condition = is_milking + condition = milk_yield < 5 + action = stop_milking + action = log_db stop_milking: milk_yield < 5 kg/d + +} + +#_______ Remove non-milking cows to cull + +link{ + trigger = every_week + condition = is_in TO_CULL + condition = not is_milking +## #condition = not is_pregnant + #action = log_db Remove_ojm + action = delete_cow every week +} + +#_______ Individual pregnancy diagnosis 28 days after insemination + +trigger{ + type = custom + name = tr_cow_pregnancy_diagnosis +} + +link{ + trigger = insemination + condition = is_in IN_FARM + action = trigger_later tr_cow_pregnancy_diagnosis 28 +} + +link{ + trigger = tr_cow_pregnancy_diagnosis + condition = is_in IN_FARM + condition = is_in EXPECTED_PREGNANT + condition = not is_pregnant + action = state_move EXPECTED_PREGNANT UNEXPECTED_PREGNANT +} + +link{ + trigger = tr_cow_pregnancy_diagnosis + condition = is_in IN_FARM + condition = is_in EXPECTED_TO_CALVE + condition = not is_pregnant + action = state_move EXPECTED_TO_CALVE TO_CULL + action = log_db delete_cow: Negative cow pregnancy diagnosis +} + + +#_______ Herd pregnancy diagnosis 45 days after end of breeding season + +trigger{ + type = custom + name = tr_herd_pregnancy_diagnosis +} + +link{ + trigger = breeding_stop + action = trigger_later tr_herd_pregnancy_diagnosis 45 +} + +link{ + trigger = tr_herd_pregnancy_diagnosis +# action = log_db Herd_pregnancy_diagnosis + action = broadcast_now tr_cow_pregnancy_diagnosis +} + +#______ Culling rules during breeding season: Cull unexpected pregnant nulliparous at age > 800 days + +link{ + trigger = enter UNEXPECTED_PREGNANT + condition = parity = 0 + condition = age > 800 #nulliparous_max_breeding_age + #action = log_db TO_CULL_from_CYCLING_because_too_old_heifer + action = state_move UNEXPECTED_PREGNANT TO_CULL + action = log_db delete_cow: heifer of age > 800 days +} + +#______ Culling rules during breeding season: Cull unexpected pregnant 320 days_after_calving +link{ + trigger = enter UNEXPECTED_PREGNANT + condition = days_after_calving > 320 + #action = log_db TO_CULL_from_CYCLING_because_too_late_after_calving + action = log_db delete_cow: days after calving > 320 days + action = state_move UNEXPECTED_PREGNANT TO_CULL +} + +#______ Culling rules during breeding season: Cull unexpected pregnant after 5 inseminations +link{ + trigger = enter UNEXPECTED_PREGNANT + condition = parity > 0 + condition = num_insemination_lactation >= 5 + #action = log_db TO_CULL_from_BREEDING_max_nb_ins + action = log_db delete_cow: nb of insemination >= 5 + action = state_move UNEXPECTED_PREGNANT TO_CULL +} + +#______ Stop estrous detection of cows to cull + +link{ + trigger = enter TO_CULL + action = estrous_stop +} + + +#______ Feeding plan according to groups # > at rearing: on calf diet +link{ + trigger = enter REARED_CALF + action = change_food calf_diet +} + +# > at weaning: on heifer diet +link{ + trigger = enter WEANED_HEIFER + action = change_food heifer_diet +} + +# > at parturition: on lactation diet +link{ + trigger = parturition + action = change_food lactation_diet +} + +# > at drying-off: on drycow_diet +link{ + trigger = stop_milking + action = change_food drycow_diet +} + +# > OUTDOOR: on pasture diet +link{ + trigger = outdoor + condition = not is_in REARED_CALF + action = change_food pasture_diet +} + +# > INDOOR: back to diet according to state + +link{ + trigger = indoor + condition = is_in WEANED_HEIFER + action = change_food heifer_diet +} + +link{ + trigger = indoor + condition = not is_milking + action = change_food drycow_diet +} + +link{ + trigger = indoor + condition = is_milking + action = change_food lactation_diet +} + + +#______ Veal production / use semen from meat breed if expected pregnant > calf_pen_capacity + +#______ Detect high producing cows > use high-grade semen > rear preferentially high-grade calves (=Renewal) + +#______ Use extended lactation + +#______ Cull oldest cow + + +################################################################################################################# +#====== FARM COMPONENTS: transfers # +################################################################################################################# + + +################################################################################################################# +#====== FARM COMPONENTS: perturbations # +################################################################################################################# + + +################################################################################################################# +#====== FARM COMPONENTS: parcels # +################################################################################################################# + +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/input/ALIEN/explan.txt Mon Aug 25 16:37:43 2025 +0000 @@ -0,0 +1,2 @@ +template_file sim_id farm_tag start_date stop_date now_date latitude longitude +farmer-plan_ALIEN.txt sim_1 ALIEN 1970-01-01 1979-01-01 1970-01-01 4.444444 5.555555
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/input/ALIEN/farmer-plan_ALIEN.txt Mon Aug 25 16:37:43 2025 +0000 @@ -0,0 +1,402 @@ +################################################################################################################# +# # +# InSiliCow # +# Virtual farm specification # +# # +################################################################################################################# + +################################################################################################################# +#====== GENERAL SETTINGS # +################################################################################################################# + +#______ Include files +@include farmer-log.txt # providing log action and trigger +@include farmer-base.txt # providing basic components + +#______ Models: specify models for individual cows +param_general{ + garuns_type = garuns_olivier + rpm_type = rpm_lite + abortion_type = abortion_olivier +} + +#______ Simulation: provide time range, output database and code name +init{ + begin_date = $start_date$ 00:00:00 + end_date = $stop_date$ 23:59:59 + output_db = db_events.sqlite + output_config = config.txt + name = $sim_id$ +} + +#______ Log Farm information +link{ + trigger = init + action = log_db farm_tag $farm_tag$ + action = log_db start_date $start_date$ + action = log_db stop_date $stop_date$ + action = log_db now_date $now_date$ + action = log_db latitude $latitude$ + action = log_db longitude $longitude$ +} + +#______ End of simulation +trigger{ + type = chron + name = tr_end_simu + scheme = $stop_date$ 23:59:58 +} + +#______ Past and future +condition{ + type = chron_range + name = past + from = $start_date$ 00:00:00 + to = $now_date$ 00:00:01 +} + +condition{ + type = chron_range + name = future + from = $now_date$ 00:00:00 + to = $stop_date$ 23:59:59 +} + +#______ Day one +trigger{ + type = chron + name = day_one_herd + scheme = $start_date$ 23:59:59 +} +trigger{ + type = custom + name = day_one +} +link{ + trigger = day_one_herd + action = broadcast_now day_one +} + +#______ Calving tag +link{ + trigger = calving + condition = calf_sex male + condition = future + action = log_db birth_of_male no_tag +} +link{ + trigger = calving + condition = calf_sex female + condition = future + action = log_db birth_of_female no_tag +} + +#______ Manage initial dam +state{ + state = INITIAL-DAM +} + +link{ + trigger = day_one + action = state_add INITIAL-DAM +} +link{ + trigger = parturition + condition = is_in INITIAL-DAM + condition = not is_in IN_WILD + action = trigger_later tr_delete_cow 1 +} +trigger{ + type = custom + name = tr_delete_cow +} +link{ + trigger = tr_delete_cow + action = delete_cow remove_initial_dam +} + +#______ Stoechio +stoechio{ + +} + +################################################################################################################# +#====== FARMING # +################################################################################################################# + +#______ Keep cows and calves in farm: no natural mating + +link{ + trigger = enter IN_WILD + action = state_move IN_WILD IN_FARM +} + +link{ + trigger = enter WILD_COW + action = state_move WILD_COW DRY_COW +} + +#______ Remove calf from dam: no natural weaning + +link{ + trigger = enter SUCKLING_CALF + action = state_move SUCKLING_CALF NURSED_CALF +} + +#______ Milk cows: no natural drying-off at calf weaning + +link{ + trigger = enter NURSING_COW + action = state_move NURSING_COW LACTATING_COW +} + +#______ Optimal feeding + +link{ + trigger = enter IN_FARM + action = trigger_later tr_optimal_feeding 0 +} +trigger{ + type = custom + name = tr_optimal_feeding +} +link{ + trigger = tr_optimal_feeding + action = change_food optimal +} + + +################################################################################################################# +#====== FARM COMPONENTS: genotype # +################################################################################################################# + +#______ Genetic_sD: provide Mendelian sampling std dev for transmission of Genetic Scaling Parameters (GSP) +# GSP_newborn ~ Normal [ (GSP_mother + GSP_father)/2 , GSP_sd ] | within (min, max) + +genetic_sd{ + garuns_olivier.WM{ + sd = 50 + min = 200 + max = 800 + } + + garuns_olivier.khi_M { + sd = 0.06 + min = 0.1 + max = 0.6 + } + + garuns_olivier.b0{ + sd = 0 + min = 0.80 + max = 2.40 + } + + garuns_olivier.nu_X{ + sd = 0 + min = 0.2 + max = 1.8 + } + + garuns_olivier.nu_Y{ + sd = 0.1 + min = 0.2 + max = 1.8 + } + + garuns_olivier.nu_F{ + sd = 0 + min = 0.50 + max = 1.50 + } + + garuns_olivier.nu_P{ + sd = 0 + min = 0.50 + max = 1.50 + } + + garuns_olivier.eD_star{ + sd = 0 + min = 9.0 + max = 15.0 + } + + garuns_olivier.NDF_star{ + sd = 0 + min = 0.10 + max = 0.90 + } + + garuns_olivier.psi{ + sd = 0 + min = 0 + max = 1 + } + + rpm_lite.nu_I{ + sd = 0.007 + min = 0.00 + max = 0.20 + } + + rpm_lite.nu_B{ + sd = 0.07 + min = 1.20 + max = 2.20 + } + + rpm_lite.nu_Z{ + sd = 0.02 + min = 0.90 + max = 1.10 + } +} + +################################################################################################################# +#====== FARM COMPONENTS: herd (genotype-based initialization of individual cows) # +################################################################################################################# + +#______ INITIALIZATION of ALIEN farm + +#______ Initial dam +init_cow{ + name=initial_dam + + ### ABORTION rules according to days in pregnancy (dip) + abortion_olivier.delta = constant 3.0 + abortion_olivier.enabled = never + abortion_olivier.dip = vector constant 17 ; constant 64 + abortion_olivier.abo = vector constant 0.02 ; constant 0.005 ; constant 0.0004 + garuns_olivier.WM = norm99 450 50 #450 ± 25 + garuns_olivier.khi_M = norm99 0.30 0.03 # 0.33 ± 0.03 + garuns_olivier.b0 = norm99 1.6 0 # 1.6 ± 0.16 + garuns_olivier.nu_X = norm99 1 0 # 1.0 ± 0.10 + garuns_olivier.nu_Y = norm99 1.1 0.1 # 1.0 ± 0.10 + garuns_olivier.nu_F = norm99 1 0 # 1.0 ± 0.02 + garuns_olivier.nu_P = norm99 1 0 # 1.0 ± 0.02 + garuns_olivier.eD_star = norm99 10.7 0 # 10.7 ± 0.5 + garuns_olivier.NDF_star = norm99 0.5 0 # 0.5 ± 0.02 + garuns_olivier.psi = norm99 0.5 0 + rpm_lite.nu_B = norm99 1.7 0.07 # 1.7 ± 0.07 + rpm_lite.nu_Z = norm99 1 0.02 # 1.0 ± 0.02 + rpm_lite.nu_I = norm99 0.025 0.007 # 0.026 ± 0.007 +} + +#______ Initial sire + +breed{ + breed = initial +} + +init_bull{ + name=semen_initial_sire + bull.breed_name = initial + bull.semens_quality = constant 1.0 + bull.female_ratio = constant 1.0 + garuns_olivier.WM = norm99 450 50 #450 ± 25 + garuns_olivier.khi_M = norm99 0.30 0.03 # 0.33 ± 0.03 + garuns_olivier.b0 = norm99 1.6 0 # 1.6 ± 0.16 + garuns_olivier.nu_X = norm99 1 0 # 1.0 ± 0.10 + garuns_olivier.nu_Y = norm99 1.1 0.1 # 1.0 ± 0.10 + garuns_olivier.nu_F = norm99 1 0 # 1.0 ± 0.02 + garuns_olivier.nu_P = norm99 1 0 # 1.0 ± 0.02 + garuns_olivier.eD_star = norm99 10.7 0 # 10.7 ± 0.5 + garuns_olivier.NDF_star = norm99 0.5 0 # 0.5 ± 0.02 + garuns_olivier.psi = norm99 0.5 0 + rpm_lite.nu_B = norm99 1.7 0.07 # 1.7 ± 0.07 + rpm_lite.nu_Z = norm99 1 0.02 # 1.0 ± 0.02 + rpm_lite.nu_I = norm99 0.025 0.007 # 0.026 ± 0.007 +} + + +#______ Generate dams of each individual cow to create + +action{ + type = buy_cow + name = buy_dam_of_id0001 + init_cow = initial_dam + init_bull = semen_initial_sire + age = 600 + days_after_conception = -1 + number = 1 +} + +action{ + type = buy_cow + name = buy_dam_of_id0002 + init_cow = initial_dam + init_bull = semen_initial_sire + age = 600 + days_after_conception = -30 + number = 1 +} + +action{ + type = buy_cow + name = buy_dam_of_id0003 + init_cow = initial_dam + init_bull = semen_initial_sire + age = 600 + days_after_conception = -60 + number = 1 +} + +link{ + trigger = init + action = buy_dam_of_id0001 + action = buy_dam_of_id0002 + action = buy_dam_of_id0003 +} + + +################################################################################################################# +#====== FARM COMPONENTS: semen (genotype-based initialization of semen from individual bulls) # +################################################################################################################# + + +################################################################################################################# +#====== FARM COMPONENTS: heat detection # +################################################################################################################# + + +################################################################################################################# +#====== FARM COMPONENTS: feedstuffs # +################################################################################################################# + + +################################################################################################################# +#====== FARM COMPONENTS: diets # +################################################################################################################# + + +################################################################################################################# +#====== FARM COMPONENTS: time schemes # +################################################################################################################# + + +################################################################################################################# +#====== FARM COMPONENTS: groups # +################################################################################################################# + + +################################################################################################################# +#====== FARM COMPONENTS: operations # +################################################################################################################# + + +################################################################################################################# +#====== FARM COMPONENTS: transfers # +################################################################################################################# + + +################################################################################################################# +#====== FARM COMPONENTS: perturbations # +################################################################################################################# + + +################################################################################################################# +#====== FARM COMPONENTS: parcels # +################################################################################################################# + +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/input/CRASH-TEST/explan.txt Mon Aug 25 16:37:43 2025 +0000 @@ -0,0 +1,2 @@ +template_file sim_id farm_tag start_date stop_date now_date latitude longitude nb_cow +farmer-plan_CRASH-TEST.txt sim_1 WILD 1970-01-01 1979-12-31 1970-01-01 4.444444 5.555555 10
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/input/CRASH-TEST/farmer-plan_CRASH-TEST.txt Mon Aug 25 16:37:43 2025 +0000 @@ -0,0 +1,271 @@ +################################################################################################################# +# # +# InSiliCow # +# Virtual farm specification # +# # +################################################################################################################# + +################################################################################################################# +#====== GENERAL SETTINGS # +################################################################################################################# + +#______ Include files +@include farmer-log.txt # providing log action and trigger +@include farmer-base.txt # providing basic components + +#______ Models: specify models for individual cows +param_general{ + garuns_type = garuns_olivier + rpm_type = rpm_lite + abortion_type = abortion_olivier +} + +#______ Simulation: provide time range, output database and code name +init{ + begin_date = $start_date$ 00:00:00 + end_date = $stop_date$ 23:59:59 + output_db = db_events.sqlite + output_config = config.txt + name = $sim_id$ +} + +#______ Log Farm information +link{ + trigger = init + action = log_db farm_tag $farm_tag$ + action = log_db start_date $start_date$ + action = log_db stop_date $stop_date$ + action = log_db now_date $now_date$ + action = log_db latitude $latitude$ + action = log_db longitude $longitude$ +} + +#______ End of simulation +trigger{ + type = chron + name = tr_end_simu + scheme = $stop_date$ 23:59:58 +} + +#______ Past and future +condition{ + type = chron_range + name = past + from = $start_date$ 00:00:00 + to = $now_date$ 00:00:01 +} + +condition{ + type = chron_range + name = future + from = $now_date$ 00:00:00 + to = $stop_date$ 23:59:59 +} + +#______ Day one +trigger{ + type = chron + name = day_one_herd + scheme = $start_date$ 23:59:59 +} +trigger{ + type = custom + name = day_one +} +link{ + trigger = day_one_herd + action = broadcast_now day_one +} + +#______ Calving tag +link{ + trigger = calving + condition = calf_sex male + condition = future + action = log_db birth_of_male no_tag +} +link{ + trigger = calving + condition = calf_sex female + condition = future + action = log_db birth_of_female no_tag +} + +#______ Manage initial dam +state{ + state = INITIAL-DAM +} + +link{ + trigger = day_one + action = state_add INITIAL-DAM +} +link{ + trigger = parturition + condition = is_in INITIAL-DAM + condition = not is_in IN_WILD + action = trigger_later tr_delete_cow 1 +} +trigger{ + type = custom + name = tr_delete_cow +} +link{ + trigger = tr_delete_cow + action = delete_cow remove_initial_dam +} + +#______ Stoechio +stoechio{ + +} + +################################################################################################################# +#====== FARM COMPONENTS: genotype # +################################################################################################################# + +#______ Genetic_sD: provide Mendelian sampling std dev for transmission of Genetic Scaling Parameters (GSP) +# GSP_newborn ~ Normal [ (GSP_mother + GSP_father)/2 , GSP_sd ] | within (min, max) + +genetic_sd{ + garuns_olivier.WM{ + sd = 50 + min = 200 + max = 800 + } + + garuns_olivier.khi_M { + sd = 0.06 + min = 0.1 + max = 0.6 + } + + garuns_olivier.b0{ + sd = 0 + min = 0.80 + max = 2.40 + } + + garuns_olivier.nu_X{ + sd = 0 + min = 0.2 + max = 1.8 + } + + garuns_olivier.nu_Y{ + sd = 0.1 + min = 0.2 + max = 1.8 + } + + garuns_olivier.nu_F{ + sd = 0 + min = 0.50 + max = 1.50 + } + + garuns_olivier.nu_P{ + sd = 0 + min = 0.50 + max = 1.50 + } + + garuns_olivier.eD_star{ + sd = 0 + min = 9.0 + max = 15.0 + } + + garuns_olivier.NDF_star{ + sd = 0 + min = 0.10 + max = 0.90 + } + + garuns_olivier.psi{ + sd = 0 + min = 0 + max = 1 + } + + rpm_lite.nu_I{ + sd = 0.007 + min = 0.00 + max = 0.20 + } + + rpm_lite.nu_B{ + sd = 0.07 + min = 1.20 + max = 2.20 + } + + rpm_lite.nu_Z{ + sd = 0.02 + min = 0.90 + max = 1.10 + } +} + +################################################################################################################# +#====== FARM COMPONENTS: herd (genotype-based initialization of individual cows) # +################################################################################################################# + +#______ INITIALIZATION of WILD herd + +link{ + trigger = init + action = buy_calf genotype_cow_wild $nb_cow$ +} + + +################################################################################################################# +#====== FARM COMPONENTS: semen (genotype-based initialization of semen from individual bulls) # +################################################################################################################# + + +################################################################################################################# +#====== FARM COMPONENTS: heat detection # +################################################################################################################# + + +################################################################################################################# +#====== FARM COMPONENTS: feedstuffs # +################################################################################################################# + + +################################################################################################################# +#====== FARM COMPONENTS: diets # +################################################################################################################# + + +################################################################################################################# +#====== FARM COMPONENTS: time schemes # +################################################################################################################# + + +################################################################################################################# +#====== FARM COMPONENTS: groups # +################################################################################################################# + + +################################################################################################################# +#====== FARM COMPONENTS: operations # +################################################################################################################# + + +################################################################################################################# +#====== FARM COMPONENTS: transfers # +################################################################################################################# + + +################################################################################################################# +#====== FARM COMPONENTS: perturbations # +################################################################################################################# + + +################################################################################################################# +#====== FARM COMPONENTS: parcels # +################################################################################################################# + +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/input/CRASH-TEST/readme.txt Mon Aug 25 16:37:43 2025 +0000 @@ -0,0 +1,12 @@ + +Increase <stop_date> and <nb_cow> to test computaion time and output file size + +Suggested tests + +Test <stop_date> <nb_cow> + 10cows- 10yr 1979-12-31 10 +100cows- 10yr 1979-12-31 100 + 10cows-100yr 2069-12-31 10 +100cows-100yr 2069-12-31 100 + +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/input/MISTEA/explan.txt Mon Aug 25 16:37:43 2025 +0000 @@ -0,0 +1,4 @@ +template_file sim_id farm_tag start_date stop_date now_date latitude longitude nb_cow WM khi_M b0 nu_X nu_Y nu_F nu_P eD_star NDF_star psi nu_B nu_Z nu_I +farmer-plan_MISTEA.txt constant MISTEA 1970-01-01 1979-12-31 1970-01-01 43.617145 3.854765 10 constant 450 constant 0.33 constant 1.6 constant 1 constant 1 constant 1 constant 1 constant 10.7 constant 0.5 constant 1 constant 1.7 constant 1 constant 0.000 +farmer-plan_MISTEA.txt norm99 MISTEA 1970-01-01 1979-12-31 1970-01-01 43.617145 3.854765 10 norm99 450 45 norm99 0.33 0.033 norm99 1.6 0.08 norm99 1 0.1 norm99 1 0.1 norm99 1 0.05 norm99 1 0.05 constant 10.7 constant 0.5 constant 1 constant 1.7 constant 1 constant 0.000 +farmer-plan_MISTEA.txt uniform MISTEA 1970-01-01 1979-12-31 1970-01-01 43.617145 3.854765 10 uniform 200 700 uniform 0.13 0.53 uniform 1.1 2.1 uniform 0.4 1.6 uniform 0.4 1.6 uniform 0.7 1.3 uniform 0.7 1.3 constant 10.7 constant 0.5 constant 1 constant 1.7 constant 1 constant 0.000
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/input/MISTEA/farmer-plan_MISTEA.txt Mon Aug 25 16:37:43 2025 +0000 @@ -0,0 +1,428 @@ +################################################################################################################# +# # +# InSiliCow # +# Virtual farm specification # +# # +################################################################################################################# + +################################################################################################################# +#====== GENERAL SETTINGS # +################################################################################################################# + +#______ Include files +@include farmer-log.txt # providing log action and trigger +@include farmer-base.txt # providing basic components + +#______ Models: specify models for individual cows +param_general{ + garuns_type = garuns_olivier + rpm_type = rpm_lite + abortion_type = abortion_olivier +} + +#______ Simulation: provide time range, output database and code name +init{ + begin_date = $start_date$ 00:00:00 + end_date = $stop_date$ 23:59:59 + output_db = db_events.sqlite + output_config = config.txt + name = $sim_id$ +} + +#______ Log Farm information +link{ + trigger = init + action = log_db farm_tag $farm_tag$ + action = log_db start_date $start_date$ + action = log_db stop_date $stop_date$ + action = log_db now_date $now_date$ + action = log_db latitude $latitude$ + action = log_db longitude $longitude$ +} + +#______ End of simulation +trigger{ + type = chron + name = tr_end_simu + scheme = $stop_date$ 23:59:58 +} + +#______ Past and future +condition{ + type = chron_range + name = past + from = $start_date$ 00:00:00 + to = $now_date$ 00:00:01 +} + +condition{ + type = chron_range + name = future + from = $now_date$ 00:00:00 + to = $stop_date$ 23:59:59 +} + +#______ Day one +trigger{ + type = chron + name = day_one_herd + scheme = $start_date$ 23:59:59 +} +trigger{ + type = custom + name = day_one +} +link{ + trigger = day_one_herd + action = broadcast_now day_one +} + +#______ Calving tag +link{ + trigger = calving + condition = calf_sex male + condition = future + action = log_db birth_of_male no_tag +} +link{ + trigger = calving + condition = calf_sex female + condition = future + action = log_db birth_of_female no_tag +} + +#______ Manage initial dam +state{ + state = INITIAL-DAM +} + +link{ + trigger = day_one + action = state_add INITIAL-DAM +} +link{ + trigger = parturition + condition = is_in INITIAL-DAM + condition = not is_in IN_WILD + action = trigger_later tr_delete_cow 1 +} +trigger{ + type = custom + name = tr_delete_cow +} +link{ + trigger = tr_delete_cow + action = delete_cow remove_initial_dam +} + +#______ Stoechio +stoechio{ + +} + +################################################################################################################# +#====== FARMING # +################################################################################################################# + +#______ Keep cows and calves in farm: no natural mating + +link{ + trigger = enter IN_WILD + action = state_move IN_WILD IN_FARM +} + +link{ + trigger = enter WILD_COW + action = state_move WILD_COW DRY_COW +} + +#______ Remove calf from dam: no natural weaning + +link{ + trigger = enter SUCKLING_CALF + action = state_move SUCKLING_CALF NURSED_CALF +} + +#______ Milk cows: no natural drying-off at calf weaning + +link{ + trigger = enter NURSING_COW + action = state_move NURSING_COW LACTATING_COW +} + +#______ Optimal feeding + +link{ + trigger = enter IN_FARM + action = trigger_later tr_optimal_feeding 0 +} +trigger{ + type = custom + name = tr_optimal_feeding +} +link{ + trigger = tr_optimal_feeding + action = change_food optimal +} + + +################################################################################################################# +#====== FARM COMPONENTS: genotype # +################################################################################################################# + +#______ Genetic_sD: provide Mendelian sampling std dev for transmission of Genetic Scaling Parameters (GSP) +# GSP_newborn ~ Normal [ (GSP_mother + GSP_father)/2 , GSP_sd ] | within (min, max) + +genetic_sd{ + garuns_olivier.WM{ + sd = 0 + min = 200 + max = 800 + } + + garuns_olivier.khi_M { + sd = 0 + min = 0.1 + max = 0.6 + } + + garuns_olivier.b0{ + sd = 0 + min = 0.80 + max = 2.40 + } + + garuns_olivier.nu_X{ + sd = 0 + min = 0.2 + max = 1.8 + } + + garuns_olivier.nu_Y{ + sd = 0 + min = 0.2 + max = 1.8 + } + + garuns_olivier.nu_F{ + sd = 0 + min = 0.50 + max = 1.50 + } + + garuns_olivier.nu_P{ + sd = 0 + min = 0.50 + max = 1.50 + } + + garuns_olivier.eD_star{ + sd = 0 + min = 9.0 + max = 15.0 + } + + garuns_olivier.NDF_star{ + sd = 0 + min = 0.10 + max = 0.90 + } + + garuns_olivier.psi{ + sd = 0 + min = 0.10 + max = 0.90 + } + + rpm_lite.nu_I{ + sd = 0 + min = 0.00 + max = 0.20 + } + + rpm_lite.nu_B{ + sd = 0 + min = 1.20 + max = 2.20 + } + + rpm_lite.nu_Z{ + sd = 0 + min = 0.90 + max = 1.10 + } +} + +################################################################################################################# +#====== FARM COMPONENTS: herd (genotype-based initialization of individual cows) # +################################################################################################################# + + +init_cow{ + name=genotype_cow_random + abortion_olivier.delta = constant 3.0 + abortion_olivier.enabled = never + abortion_olivier.dip = vector constant 17 ; constant 64 + abortion_olivier.abo = vector constant 0.02 ; constant 0.005 ; constant 0.0004 + garuns_olivier.WM = $WM$ + garuns_olivier.khi_M = $khi_M$ + garuns_olivier.b0 = $b0$ + garuns_olivier.nu_X = $nu_X$ + garuns_olivier.nu_Y = $nu_Y$ + garuns_olivier.nu_F = $nu_F$ + garuns_olivier.nu_P = $nu_P$ + garuns_olivier.eD_star = $eD_star$ + garuns_olivier.NDF_star = $NDF_star$ + garuns_olivier.psi = $psi$ + rpm_lite.nu_B = $nu_B$ + rpm_lite.nu_Z = $nu_Z$ + rpm_lite.nu_I = $nu_I$ +} + +#______ INITIALIZATION of herd + +link{ + trigger = init + action = buy_calf genotype_cow_random $nb_cow$ +} + + +################################################################################################################# +#====== FARM COMPONENTS: semen (genotype-based initialization of semen from individual bulls) # +################################################################################################################# + +breed{ + breed = random +} + +init_bull{ + name=semen_bull_random + bull.breed_name = random + bull.semens_quality = constant 1 #100% fertilization + bull.female_ratio = constant 0 #100% male calf + garuns_olivier.WM = $WM$ + garuns_olivier.khi_M = $khi_M$ + garuns_olivier.b0 = $b0$ + garuns_olivier.nu_X = $nu_X$ + garuns_olivier.nu_Y = $nu_Y$ + garuns_olivier.nu_F = $nu_F$ + garuns_olivier.nu_P = $nu_P$ + garuns_olivier.eD_star = $eD_star$ + garuns_olivier.NDF_star = $NDF_star$ + garuns_olivier.psi = $psi$ + rpm_lite.nu_B = $nu_B$ + rpm_lite.nu_Z = $nu_Z$ + rpm_lite.nu_I = $nu_I$ +} + + +################################################################################################################# +#====== FARM COMPONENTS: heat detection # +################################################################################################################# + +estrous_detection_method{ + name=perfect + #time_slice = 06:00:00 18:00:00 + time_slice = 00:00:00 23:59:59 + expression_threshold=0.75 + expression_stiffness=7 + detection_threshold=0.05 + sensitivity = 1 + wrong_oestrus_per_day = 0 +} + +################################################################################################################# +#====== FARM COMPONENTS: feedstuffs # +################################################################################################################# + + +################################################################################################################# +#====== FARM COMPONENTS: diets # +################################################################################################################# + + +################################################################################################################# +#====== FARM COMPONENTS: time schemes # +################################################################################################################# + + +################################################################################################################# +#====== FARM COMPONENTS: groups # +################################################################################################################# + + +################################################################################################################# +#====== FARM COMPONENTS: operations # +################################################################################################################# + +link{ + trigger = enter IN_FARM + action = state_add IMMORTAL +} + +link{ + trigger = enter INITIAL-DAM + action = state_delete INITIAL-DAM +} + +link{ + trigger = ovulation + condition = is_in mature + condition = future + action = estrous_start perfect +} + +link{ + trigger = estrous + condition = is_in mature + condition = not is_pregnant + condition = future + condition = not days_after_calving < 50 + action = inseminate semen_bull_random +} + +link{ + trigger = conception + condition = future + action = estrous_stop +} + +link{ + trigger = abortion + condition = future + action = estrous_start perfect +} + +link{ + trigger = parturition + #action = trigger_later stop_milking 305 + action = trigger_later tr_drying_off 305 + } + +trigger{ + type = custom + name = tr_drying_off +} + +link{ + trigger = tr_drying_off + action = stop_milking + action = log_db stop_milking: 305 days after calving +} + + +################################################################################################################# +#====== FARM COMPONENTS: transfers # +################################################################################################################# + + +################################################################################################################# +#====== FARM COMPONENTS: perturbations # +################################################################################################################# + + +################################################################################################################# +#====== FARM COMPONENTS: parcels # +################################################################################################################# + +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/input/ONE-COW/explan.txt Mon Aug 25 16:37:43 2025 +0000 @@ -0,0 +1,2 @@ +template_file sim_id farm_tag start_date stop_date now_date latitude longitude nb_cow WM khi_M b0 nu_X nu_Y nu_F nu_P eD_star NDF_star psi nu_B nu_Z nu_I +farmer-plan_ONE-COW.txt constant ONE-COW 1970-01-01 1979-12-31 1970-01-01 43.617145 3.854765 1 constant 450 constant 0.33 constant 1.6 constant 1 constant 1 constant 1 constant 1 constant 10.7 constant 0.5 constant 1 constant 1.7 constant 1 constant 0.000
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/input/ONE-COW/farmer-plan_ONE-COW.txt Mon Aug 25 16:37:43 2025 +0000 @@ -0,0 +1,428 @@ +################################################################################################################# +# # +# InSiliCow # +# Virtual farm specification # +# # +################################################################################################################# + +################################################################################################################# +#====== GENERAL SETTINGS # +################################################################################################################# + +#______ Include files +@include farmer-log.txt # providing log action and trigger +@include farmer-base.txt # providing basic components + +#______ Models: specify models for individual cows +param_general{ + garuns_type = garuns_olivier + rpm_type = rpm_lite + abortion_type = abortion_olivier +} + +#______ Simulation: provide time range, output database and code name +init{ + begin_date = $start_date$ 00:00:00 + end_date = $stop_date$ 23:59:59 + output_db = db_events.sqlite + output_config = config.txt + name = $sim_id$ +} + +#______ Log Farm information +link{ + trigger = init + action = log_db farm_tag $farm_tag$ + action = log_db start_date $start_date$ + action = log_db stop_date $stop_date$ + action = log_db now_date $now_date$ + action = log_db latitude $latitude$ + action = log_db longitude $longitude$ +} + +#______ End of simulation +trigger{ + type = chron + name = tr_end_simu + scheme = $stop_date$ 23:59:58 +} + +#______ Past and future +condition{ + type = chron_range + name = past + from = $start_date$ 00:00:00 + to = $now_date$ 00:00:01 +} + +condition{ + type = chron_range + name = future + from = $now_date$ 00:00:00 + to = $stop_date$ 23:59:59 +} + +#______ Day one +trigger{ + type = chron + name = day_one_herd + scheme = $start_date$ 23:59:59 +} +trigger{ + type = custom + name = day_one +} +link{ + trigger = day_one_herd + action = broadcast_now day_one +} + +#______ Calving tag +link{ + trigger = calving + condition = calf_sex male + condition = future + action = log_db birth_of_male no_tag +} +link{ + trigger = calving + condition = calf_sex female + condition = future + action = log_db birth_of_female no_tag +} + +#______ Manage initial dam +state{ + state = INITIAL-DAM +} + +link{ + trigger = day_one + action = state_add INITIAL-DAM +} +link{ + trigger = parturition + condition = is_in INITIAL-DAM + condition = not is_in IN_WILD + action = trigger_later tr_delete_cow 1 +} +trigger{ + type = custom + name = tr_delete_cow +} +link{ + trigger = tr_delete_cow + action = delete_cow remove_initial_dam +} + +#______ Stoechio +stoechio{ + +} + +################################################################################################################# +#====== FARMING # +################################################################################################################# + +#______ Keep cows and calves in farm: no natural mating + +link{ + trigger = enter IN_WILD + action = state_move IN_WILD IN_FARM +} + +link{ + trigger = enter WILD_COW + action = state_move WILD_COW DRY_COW +} + +#______ Remove calf from dam: no natural weaning + +link{ + trigger = enter SUCKLING_CALF + action = state_move SUCKLING_CALF NURSED_CALF +} + +#______ Milk cows: no natural drying-off at calf weaning + +link{ + trigger = enter NURSING_COW + action = state_move NURSING_COW LACTATING_COW +} + +#______ Optimal feeding + +link{ + trigger = enter IN_FARM + action = trigger_later tr_optimal_feeding 0 +} +trigger{ + type = custom + name = tr_optimal_feeding +} +link{ + trigger = tr_optimal_feeding + action = change_food optimal +} + + +################################################################################################################# +#====== FARM COMPONENTS: genotype # +################################################################################################################# + +#______ Genetic_sD: provide Mendelian sampling std dev for transmission of Genetic Scaling Parameters (GSP) +# GSP_newborn ~ Normal [ (GSP_mother + GSP_father)/2 , GSP_sd ] | within (min, max) + +genetic_sd{ + garuns_olivier.WM{ + sd = 0 + min = 200 + max = 800 + } + + garuns_olivier.khi_M { + sd = 0 + min = 0.1 + max = 0.6 + } + + garuns_olivier.b0{ + sd = 0 + min = 0.80 + max = 2.40 + } + + garuns_olivier.nu_X{ + sd = 0 + min = 0.2 + max = 1.8 + } + + garuns_olivier.nu_Y{ + sd = 0 + min = 0.2 + max = 1.8 + } + + garuns_olivier.nu_F{ + sd = 0 + min = 0.50 + max = 1.50 + } + + garuns_olivier.nu_P{ + sd = 0 + min = 0.50 + max = 1.50 + } + + garuns_olivier.eD_star{ + sd = 0 + min = 9.0 + max = 15.0 + } + + garuns_olivier.NDF_star{ + sd = 0 + min = 0.10 + max = 0.90 + } + + garuns_olivier.psi{ + sd = 0 + min = 0.10 + max = 0.90 + } + + rpm_lite.nu_I{ + sd = 0 + min = 0.00 + max = 0.20 + } + + rpm_lite.nu_B{ + sd = 0 + min = 1.20 + max = 2.20 + } + + rpm_lite.nu_Z{ + sd = 0 + min = 0.90 + max = 1.10 + } +} + +################################################################################################################# +#====== FARM COMPONENTS: herd (genotype-based initialization of individual cows) # +################################################################################################################# + + +init_cow{ + name=genotype_cow_random + abortion_olivier.delta = constant 3.0 + abortion_olivier.enabled = never + abortion_olivier.dip = vector constant 17 ; constant 64 + abortion_olivier.abo = vector constant 0.02 ; constant 0.005 ; constant 0.0004 + garuns_olivier.WM = $WM$ + garuns_olivier.khi_M = $khi_M$ + garuns_olivier.b0 = $b0$ + garuns_olivier.nu_X = $nu_X$ + garuns_olivier.nu_Y = $nu_Y$ + garuns_olivier.nu_F = $nu_F$ + garuns_olivier.nu_P = $nu_P$ + garuns_olivier.eD_star = $eD_star$ + garuns_olivier.NDF_star = $NDF_star$ + garuns_olivier.psi = $psi$ + rpm_lite.nu_B = $nu_B$ + rpm_lite.nu_Z = $nu_Z$ + rpm_lite.nu_I = $nu_I$ +} + +#______ INITIALIZATION of herd + +link{ + trigger = init + action = buy_calf genotype_cow_random $nb_cow$ +} + + +################################################################################################################# +#====== FARM COMPONENTS: semen (genotype-based initialization of semen from individual bulls) # +################################################################################################################# + +breed{ + breed = random +} + +init_bull{ + name=semen_bull_random + bull.breed_name = random + bull.semens_quality = constant 1 #100% fertilization + bull.female_ratio = constant 0 #100% male calf + garuns_olivier.WM = $WM$ + garuns_olivier.khi_M = $khi_M$ + garuns_olivier.b0 = $b0$ + garuns_olivier.nu_X = $nu_X$ + garuns_olivier.nu_Y = $nu_Y$ + garuns_olivier.nu_F = $nu_F$ + garuns_olivier.nu_P = $nu_P$ + garuns_olivier.eD_star = $eD_star$ + garuns_olivier.NDF_star = $NDF_star$ + garuns_olivier.psi = $psi$ + rpm_lite.nu_B = $nu_B$ + rpm_lite.nu_Z = $nu_Z$ + rpm_lite.nu_I = $nu_I$ +} + + +################################################################################################################# +#====== FARM COMPONENTS: heat detection # +################################################################################################################# + +estrous_detection_method{ + name=perfect + #time_slice = 06:00:00 18:00:00 + time_slice = 00:00:00 23:59:59 + expression_threshold=0.75 + expression_stiffness=7 + detection_threshold=0.05 + sensitivity = 1 + wrong_oestrus_per_day = 0 +} + +################################################################################################################# +#====== FARM COMPONENTS: feedstuffs # +################################################################################################################# + + +################################################################################################################# +#====== FARM COMPONENTS: diets # +################################################################################################################# + + +################################################################################################################# +#====== FARM COMPONENTS: time schemes # +################################################################################################################# + + +################################################################################################################# +#====== FARM COMPONENTS: groups # +################################################################################################################# + + +################################################################################################################# +#====== FARM COMPONENTS: operations # +################################################################################################################# + +link{ + trigger = enter IN_FARM + action = state_add IMMORTAL +} + +link{ + trigger = enter INITIAL-DAM + action = state_delete INITIAL-DAM +} + +link{ + trigger = ovulation + condition = is_in mature + condition = future + action = estrous_start perfect +} + +link{ + trigger = estrous + condition = is_in mature + condition = not is_pregnant + condition = future + condition = not days_after_calving < 50 + action = inseminate semen_bull_random +} + +link{ + trigger = conception + condition = future + action = estrous_stop +} + +link{ + trigger = abortion + condition = future + action = estrous_start perfect +} + +link{ + trigger = parturition + #action = trigger_later stop_milking 305 + action = trigger_later tr_drying_off 305 + } + +trigger{ + type = custom + name = tr_drying_off +} + +link{ + trigger = tr_drying_off + action = stop_milking + action = log_db stop_milking: 305 days after calving +} + + +################################################################################################################# +#====== FARM COMPONENTS: transfers # +################################################################################################################# + + +################################################################################################################# +#====== FARM COMPONENTS: perturbations # +################################################################################################################# + + +################################################################################################################# +#====== FARM COMPONENTS: parcels # +################################################################################################################# + +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/input/SENSITIVITY/explan.txt Mon Aug 25 16:37:43 2025 +0000 @@ -0,0 +1,5 @@ +template_file sim_id farm_tag start_date stop_date now_date latitude longitude nb_cow WM khi_M b0 nu_X nu_Y nu_F nu_P eD_star NDF_star psi nu_B nu_Z nu_I +farmer-plan_SENSITIVITY.txt constant SENSITIVITY 1970-01-01 1979-12-31 1970-01-01 43.617145 3.854765 1 constant 450 constant 0.33 constant 1.6 constant 1 constant 1 constant 1 constant 1 constant 10.7 constant 0.5 constant 1 constant 1.7 constant 1 constant 0.025 +farmer-plan_SENSITIVITY.txt norm99 SENSITIVITY 1970-01-01 1979-12-31 1970-01-01 43.617145 3.854765 1 norm99 450 45 norm99 0.33 0.033 norm99 1.6 0.08 norm99 1 0.1 norm99 1 0.1 norm99 1 0.05 norm99 1 0.05 constant 10.7 constant 0.5 norm99 1 0.1 norm99 1.7 0.085 norm99 1 0.05 norm99 0.025 0.001 +farmer-plan_SENSITIVITY.txt uniform SENSITIVITY 1970-01-01 1979-12-31 1970-01-01 43.617145 3.854765 1 uniform 200 700 uniform 0.13 0.53 uniform 1.1 2.1 uniform 0.4 1.6 uniform 0.4 1.6 uniform 0.7 1.3 uniform 0.7 1.3 constant 10.7 constant 0.5 constant 1 constant 1.7 constant 1 uniform 0.000 0.06 +farmer-plan_SENSITIVITY.txt GSP_RFM SENSITIVITY 1970-01-01 1979-12-31 1970-01-01 43.617145 3.854765 10 constant 450 constant 0.33 constant 1.6 constant 1 constant 1 constant 1 constant 1 constant 10.7 constant 0.5 constant 1 uniform 1.2 2.2 uniform 0.7 1.3 constant 0.025
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/input/SENSITIVITY/farmer-plan_SENSITIVITY.txt Mon Aug 25 16:37:43 2025 +0000 @@ -0,0 +1,428 @@ +################################################################################################################# +# # +# InSiliCow # +# Virtual farm specification # +# # +################################################################################################################# + +################################################################################################################# +#====== GENERAL SETTINGS # +################################################################################################################# + +#______ Include files +@include farmer-log.txt # providing log action and trigger +@include farmer-base.txt # providing basic components + +#______ Models: specify models for individual cows +param_general{ + garuns_type = garuns_olivier + rpm_type = rpm_lite + abortion_type = abortion_olivier +} + +#______ Simulation: provide time range, output database and code name +init{ + begin_date = $start_date$ 00:00:00 + end_date = $stop_date$ 23:59:59 + output_db = db_events.sqlite + output_config = config.txt + name = $sim_id$ +} + +#______ Log Farm information +link{ + trigger = init + action = log_db farm_tag $farm_tag$ + action = log_db start_date $start_date$ + action = log_db stop_date $stop_date$ + action = log_db now_date $now_date$ + action = log_db latitude $latitude$ + action = log_db longitude $longitude$ +} + +#______ End of simulation +trigger{ + type = chron + name = tr_end_simu + scheme = $stop_date$ 23:59:58 +} + +#______ Past and future +condition{ + type = chron_range + name = past + from = $start_date$ 00:00:00 + to = $now_date$ 00:00:01 +} + +condition{ + type = chron_range + name = future + from = $now_date$ 00:00:00 + to = $stop_date$ 23:59:59 +} + +#______ Day one +trigger{ + type = chron + name = day_one_herd + scheme = $start_date$ 23:59:59 +} +trigger{ + type = custom + name = day_one +} +link{ + trigger = day_one_herd + action = broadcast_now day_one +} + +#______ Calving tag +link{ + trigger = calving + condition = calf_sex male + condition = future + action = log_db birth_of_male no_tag +} +link{ + trigger = calving + condition = calf_sex female + condition = future + action = log_db birth_of_female no_tag +} + +#______ Manage initial dam +state{ + state = INITIAL-DAM +} + +link{ + trigger = day_one + action = state_add INITIAL-DAM +} +link{ + trigger = parturition + condition = is_in INITIAL-DAM + condition = not is_in IN_WILD + action = trigger_later tr_delete_cow 1 +} +trigger{ + type = custom + name = tr_delete_cow +} +link{ + trigger = tr_delete_cow + action = delete_cow remove_initial_dam +} + +#______ Stoechio +stoechio{ + +} + +################################################################################################################# +#====== FARMING # +################################################################################################################# + +#______ Keep cows and calves in farm: no natural mating + +link{ + trigger = enter IN_WILD + action = state_move IN_WILD IN_FARM +} + +link{ + trigger = enter WILD_COW + action = state_move WILD_COW DRY_COW +} + +#______ Remove calf from dam: no natural weaning + +link{ + trigger = enter SUCKLING_CALF + action = state_move SUCKLING_CALF NURSED_CALF +} + +#______ Milk cows: no natural drying-off at calf weaning + +link{ + trigger = enter NURSING_COW + action = state_move NURSING_COW LACTATING_COW +} + +#______ Optimal feeding + +link{ + trigger = enter IN_FARM + action = trigger_later tr_optimal_feeding 0 +} +trigger{ + type = custom + name = tr_optimal_feeding +} +link{ + trigger = tr_optimal_feeding + action = change_food optimal +} + + +################################################################################################################# +#====== FARM COMPONENTS: genotype # +################################################################################################################# + +#______ Genetic_sD: provide Mendelian sampling std dev for transmission of Genetic Scaling Parameters (GSP) +# GSP_newborn ~ Normal [ (GSP_mother + GSP_father)/2 , GSP_sd ] | within (min, max) + +genetic_sd{ + garuns_olivier.WM{ + sd = 0 + min = 200 + max = 800 + } + + garuns_olivier.khi_M { + sd = 0 + min = 0.1 + max = 0.6 + } + + garuns_olivier.b0{ + sd = 0 + min = 0.80 + max = 2.40 + } + + garuns_olivier.nu_X{ + sd = 0 + min = 0.2 + max = 1.8 + } + + garuns_olivier.nu_Y{ + sd = 0 + min = 0.2 + max = 1.8 + } + + garuns_olivier.nu_F{ + sd = 0 + min = 0.50 + max = 1.50 + } + + garuns_olivier.nu_P{ + sd = 0 + min = 0.50 + max = 1.50 + } + + garuns_olivier.eD_star{ + sd = 0 + min = 9.0 + max = 15.0 + } + + garuns_olivier.NDF_star{ + sd = 0 + min = 0.10 + max = 0.90 + } + + garuns_olivier.psi{ + sd = 0 + min = 0.10 + max = 0.90 + } + + rpm_lite.nu_I{ + sd = 0 + min = 0.00 + max = 0.20 + } + + rpm_lite.nu_B{ + sd = 0 + min = 1.20 + max = 2.20 + } + + rpm_lite.nu_Z{ + sd = 0 + min = 0.90 + max = 1.10 + } +} + +################################################################################################################# +#====== FARM COMPONENTS: herd (genotype-based initialization of individual cows) # +################################################################################################################# + + +init_cow{ + name=genotype_cow_random + abortion_olivier.delta = constant 3.0 + abortion_olivier.enabled = never + abortion_olivier.dip = vector constant 17 ; constant 64 + abortion_olivier.abo = vector constant 0.02 ; constant 0.005 ; constant 0.0004 + garuns_olivier.WM = $WM$ + garuns_olivier.khi_M = $khi_M$ + garuns_olivier.b0 = $b0$ + garuns_olivier.nu_X = $nu_X$ + garuns_olivier.nu_Y = $nu_Y$ + garuns_olivier.nu_F = $nu_F$ + garuns_olivier.nu_P = $nu_P$ + garuns_olivier.eD_star = $eD_star$ + garuns_olivier.NDF_star = $NDF_star$ + garuns_olivier.psi = $psi$ + rpm_lite.nu_B = $nu_B$ + rpm_lite.nu_Z = $nu_Z$ + rpm_lite.nu_I = $nu_I$ +} + +#______ INITIALIZATION of herd + +link{ + trigger = init + action = buy_calf genotype_cow_random $nb_cow$ +} + + +################################################################################################################# +#====== FARM COMPONENTS: semen (genotype-based initialization of semen from individual bulls) # +################################################################################################################# + +breed{ + breed = random +} + +init_bull{ + name=semen_bull_random + bull.breed_name = random + bull.semens_quality = constant 1 #100% fertilization + bull.female_ratio = constant 0 #100% male calf + garuns_olivier.WM = $WM$ + garuns_olivier.khi_M = $khi_M$ + garuns_olivier.b0 = $b0$ + garuns_olivier.nu_X = $nu_X$ + garuns_olivier.nu_Y = $nu_Y$ + garuns_olivier.nu_F = $nu_F$ + garuns_olivier.nu_P = $nu_P$ + garuns_olivier.eD_star = $eD_star$ + garuns_olivier.NDF_star = $NDF_star$ + garuns_olivier.psi = $psi$ + rpm_lite.nu_B = $nu_B$ + rpm_lite.nu_Z = $nu_Z$ + rpm_lite.nu_I = $nu_I$ +} + + +################################################################################################################# +#====== FARM COMPONENTS: heat detection # +################################################################################################################# + +estrous_detection_method{ + name=perfect + #time_slice = 06:00:00 18:00:00 + time_slice = 00:00:00 23:59:59 + expression_threshold=0.75 + expression_stiffness=7 + detection_threshold=0.05 + sensitivity = 1 + wrong_oestrus_per_day = 0 +} + +################################################################################################################# +#====== FARM COMPONENTS: feedstuffs # +################################################################################################################# + + +################################################################################################################# +#====== FARM COMPONENTS: diets # +################################################################################################################# + + +################################################################################################################# +#====== FARM COMPONENTS: time schemes # +################################################################################################################# + + +################################################################################################################# +#====== FARM COMPONENTS: groups # +################################################################################################################# + + +################################################################################################################# +#====== FARM COMPONENTS: operations # +################################################################################################################# + +link{ + trigger = enter IN_FARM + action = state_add IMMORTAL +} + +link{ + trigger = enter INITIAL-DAM + action = state_delete INITIAL-DAM +} + +link{ + trigger = ovulation + condition = is_in mature + condition = future + action = estrous_start perfect +} + +link{ + trigger = estrous + condition = is_in mature + condition = not is_pregnant + condition = future + condition = not days_after_calving < 50 + action = inseminate semen_bull_random +} + +link{ + trigger = conception + condition = future + action = estrous_stop +} + +link{ + trigger = abortion + condition = future + action = estrous_start perfect +} + +link{ + trigger = parturition + #action = trigger_later stop_milking 305 + action = trigger_later tr_drying_off 305 + } + +trigger{ + type = custom + name = tr_drying_off +} + +link{ + trigger = tr_drying_off + action = stop_milking + action = log_db stop_milking: 305 days after calving +} + + +################################################################################################################# +#====== FARM COMPONENTS: transfers # +################################################################################################################# + + +################################################################################################################# +#====== FARM COMPONENTS: perturbations # +################################################################################################################# + + +################################################################################################################# +#====== FARM COMPONENTS: parcels # +################################################################################################################# + +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/input/TWIN/explan.txt Mon Aug 25 16:37:43 2025 +0000 @@ -0,0 +1,2 @@ +template_file sim_id farm_tag start_date stop_date now_date latitude longitude +farmer-plan_TWIN.txt sim_1 TWIN 1970-01-01 1979-01-01 1979-01-01 4.444444 5.555555
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/input/TWIN/farmer-plan_TWIN.txt Mon Aug 25 16:37:43 2025 +0000 @@ -0,0 +1,1044 @@ +################################################################################################################# +# # +# InSiliCow # +# Virtual farm specification # +# # +################################################################################################################# + +################################################################################################################# +#====== GENERAL SETTINGS # +################################################################################################################# + +#______ Include files +@include farmer-log.txt # providing log action and trigger +@include farmer-base.txt # providing basic components + +#______ Models: specify models for individual cows +param_general{ + garuns_type = garuns_olivier + rpm_type = rpm_lite + abortion_type = abortion_olivier +} + +#______ Simulation: provide time range, output database and code name +init{ + begin_date = $start_date$ 00:00:00 + end_date = $stop_date$ 23:59:59 + output_db = db_events.sqlite + output_config = config.txt + name = $sim_id$ +} + +#______ Log Farm information +link{ + trigger = init + action = log_db farm_tag $farm_tag$ + action = log_db start_date $start_date$ + action = log_db stop_date $stop_date$ + action = log_db now_date $now_date$ + action = log_db latitude $latitude$ + action = log_db longitude $longitude$ +} + +#______ End of simulation +trigger{ + type = chron + name = tr_end_simu + scheme = $stop_date$ 23:59:58 +} + +#______ Past and future +condition{ + type = chron_range + name = past + from = $start_date$ 00:00:00 + to = $now_date$ 00:00:01 +} + +condition{ + type = chron_range + name = future + from = $now_date$ 00:00:00 + to = $stop_date$ 23:59:59 +} + +#______ Day one +trigger{ + type = chron + name = day_one_herd + scheme = $start_date$ 23:59:59 +} +trigger{ + type = custom + name = day_one +} +link{ + trigger = day_one_herd + action = broadcast_now day_one +} + +#______ Calving tag +link{ + trigger = calving + condition = calf_sex male + condition = future + action = log_db birth_of_male no_tag +} +link{ + trigger = calving + condition = calf_sex female + condition = future + action = log_db birth_of_female no_tag +} + +#______ Manage initial dam +state{ + state = INITIAL-DAM +} + +link{ + trigger = day_one + action = state_add INITIAL-DAM +} +link{ + trigger = parturition + condition = is_in INITIAL-DAM + condition = not is_in IN_WILD + action = trigger_later tr_delete_cow 1 +} +trigger{ + type = custom + name = tr_delete_cow +} +link{ + trigger = tr_delete_cow + action = delete_cow remove_initial_dam +} + +#______ Stoechio +stoechio{ + +} + +################################################################################################################# +#====== FARMING # +################################################################################################################# + +#______ Keep cows and calves in farm: no natural mating + +link{ + trigger = enter IN_WILD + action = state_move IN_WILD IN_FARM +} + +link{ + trigger = enter WILD_COW + action = state_move WILD_COW DRY_COW +} + +#______ Remove calf from dam: no natural weaning + +link{ + trigger = enter SUCKLING_CALF + action = state_move SUCKLING_CALF NURSED_CALF +} + +#______ Milk cows: no natural drying-off at calf weaning + +link{ + trigger = enter NURSING_COW + action = state_move NURSING_COW LACTATING_COW +} + +#______ Optimal feeding + +link{ + trigger = enter IN_FARM + action = trigger_later tr_optimal_feeding 0 +} +trigger{ + type = custom + name = tr_optimal_feeding +} +link{ + trigger = tr_optimal_feeding + action = change_food optimal +} + + +################################################################################################################# +#====== FARM COMPONENTS: genotype # +################################################################################################################# + +#______ Genetic_sD: provide Mendelian sampling std dev for transmission of Genetic Scaling Parameters (GSP) +# GSP_newborn ~ Normal [ (GSP_mother + GSP_father)/2 , GSP_sd ] | within (min, max) + +#TWIN CASE : all sd = 0 + +genetic_sd{ + garuns_olivier.WM{ + sd = 0 + min = 200 + max = 800 + } + + garuns_olivier.khi_M { + sd = 0 + min = 0.1 + max = 0.6 + } + + garuns_olivier.b0{ + sd = 0 + min = 0.80 + max = 2.40 + } + + garuns_olivier.nu_X{ + sd = 0 + min = 0.2 + max = 1.8 + } + + garuns_olivier.nu_Y{ + sd = 0 + min = 0.2 + max = 1.8 + } + + garuns_olivier.nu_F{ + sd = 0 + min = 0.50 + max = 1.50 + } + + garuns_olivier.nu_P{ + sd = 0 + min = 0.50 + max = 1.50 + } + + garuns_olivier.eD_star{ + sd = 0 + min = 9.0 + max = 15.0 + } + + garuns_olivier.NDF_star{ + sd = 0 + min = 0.10 + max = 0.90 + } + + garuns_olivier.psi{ + sd = 0 + min = 0 + max = 1 + } + + rpm_lite.nu_I{ + sd = 0 + min = 0.00 + max = 0.20 + } + + rpm_lite.nu_B{ + sd = 0 + min = 1.20 + max = 2.20 + } + + rpm_lite.nu_Z{ + sd = 0 + min = 0.90 + max = 1.10 + } +} + +################################################################################################################# +#====== FARM COMPONENTS: herd (genotype-based initialization of individual cows) # +################################################################################################################# + +#______ INITIALIZATION of TWIN farm from tables Genotype and Initialization + +# From table Genotype: for all <cow_tag> (all lines) +state{ + state = cow_01 + state = cow_02 + state = cow_03 + state = cow_04 + state = cow_05 +} + +action{ + type = genericlog + name = log_states_cows + + log_type = sqlite + sqlite_path = db_states.sqlite + sqlite_table = user_states + + #log_type = file + #file_path = states-user.txt + #sep_col = \t + #file_line_flush=no + + column{ + value = time + name = time + sqlite_type = numeric + } + column{ + value = state.count.INITIAL-DAM + name = INITIAL-DAM + sqlite_type = numeric + } + column{ + value = state.count.cow_01 + name = cow_01 + sqlite_type = numeric + } + column{ + value = state.count.cow_02 + name = cow_02 + sqlite_type = numeric + } + column{ + value = state.count.cow_03 + name = cow_03 + sqlite_type = numeric + } + column{ + value = state.count.cow_04 + name = cow_04 + sqlite_type = numeric + } + column{ + value = state.count.cow_05 + name = cow_05 + sqlite_type = numeric + } +} + +link{ + trigger = every_day_herd + action = log_states_cows +} + +# From table Genotype: for each <cow_tag> not in table Initialization +init_cow{ + name=cow_03 + + abortion_olivier.delta = constant 3.0 + abortion_olivier.enabled = never + abortion_olivier.dip = vector constant 17 ; constant 64 + abortion_olivier.abo = vector constant 0.02 ; constant 0.005 ; constant 0.0004 + + garuns_olivier.WM = constant 450 + garuns_olivier.khi_M = constant 0.3 + garuns_olivier.b0 = constant 1.6 + garuns_olivier.nu_X = constant 1 + garuns_olivier.nu_Y = constant 1.1 + garuns_olivier.nu_F = constant 1 + garuns_olivier.nu_P = constant 1 + garuns_olivier.eD_star = constant 10.7 + garuns_olivier.NDF_star = constant 1 + garuns_olivier.psi = constant 1 + rpm_lite.nu_B = constant 0.5 + rpm_lite.nu_Z = constant 0.025 + rpm_lite.nu_I = constant 1.7 +} +init_cow{ + name=cow_04 + + abortion_olivier.delta = constant 3.0 + abortion_olivier.enabled = never + abortion_olivier.dip = vector constant 17 ; constant 64 + abortion_olivier.abo = vector constant 0.02 ; constant 0.005 ; constant 0.0004 + + garuns_olivier.WM = constant 450 + garuns_olivier.khi_M = constant 0.3 + garuns_olivier.b0 = constant 1.6 + garuns_olivier.nu_X = constant 1 + garuns_olivier.nu_Y = constant 1.1 + garuns_olivier.nu_F = constant 1 + garuns_olivier.nu_P = constant 1 + garuns_olivier.eD_star = constant 10.7 + garuns_olivier.NDF_star = constant 1 + garuns_olivier.psi = constant 1 + rpm_lite.nu_B = constant 0.5 + rpm_lite.nu_Z = constant 0.025 + rpm_lite.nu_I = constant 1.7 +} +init_cow{ + name=cow_05 + + abortion_olivier.delta = constant 3.0 + abortion_olivier.enabled = never + abortion_olivier.dip = vector constant 17 ; constant 64 + abortion_olivier.abo = vector constant 0.02 ; constant 0.005 ; constant 0.0004 + + garuns_olivier.WM = constant 450 + garuns_olivier.khi_M = constant 0.3 + garuns_olivier.b0 = constant 1.6 + garuns_olivier.nu_X = constant 1 + garuns_olivier.nu_Y = constant 1.1 + garuns_olivier.nu_F = constant 1 + garuns_olivier.nu_P = constant 1 + garuns_olivier.eD_star = constant 10.7 + garuns_olivier.NDF_star = constant 1 + garuns_olivier.psi = constant 1 + rpm_lite.nu_B = constant 0.5 + rpm_lite.nu_Z = constant 0.025 + rpm_lite.nu_I = constant 1.7 +} + +# From table Initialization: for each <dam_tag> (each line) +breed{ + breed = dam_cow_01 + breed = dam_cow_02 +} + +# From table Initialization: for each <sire_tag> (each line) +init_bull{ + name= sire_cow_01 + bull.breed_name = dam_cow_01 + bull.semens_quality = constant 1.0 + bull.female_ratio = constant 1.0 + + # Genotype sub-block associated with cow_01 in table Genotype + garuns_olivier.WM = constant 450 + garuns_olivier.khi_M = constant 0.3 + garuns_olivier.b0 = constant 1.6 + garuns_olivier.nu_X = constant 1 + garuns_olivier.nu_Y = constant 1.1 + garuns_olivier.nu_F = constant 1 + garuns_olivier.nu_P = constant 1 + garuns_olivier.eD_star = constant 10.7 + garuns_olivier.NDF_star = constant 1 + garuns_olivier.psi = constant 1 + rpm_lite.nu_B = constant 0.5 + rpm_lite.nu_Z = constant 0.025 + rpm_lite.nu_I = constant 1.7 +} +init_bull{ + name= sire_cow_02 + bull.breed_name = dam_cow_02 + bull.semens_quality = constant 1.0 + bull.female_ratio = constant 1.0 + + # Genotype sub-block associated with cow_02 in table Genotype + garuns_olivier.WM = constant 450 + garuns_olivier.khi_M = constant 0.3 + garuns_olivier.b0 = constant 1.6 + garuns_olivier.nu_X = constant 1 + garuns_olivier.nu_Y = constant 1.1 + garuns_olivier.nu_F = constant 1 + garuns_olivier.nu_P = constant 1 + garuns_olivier.eD_star = constant 10.7 + garuns_olivier.NDF_star = constant 1 + garuns_olivier.psi = constant 1 + rpm_lite.nu_B = constant 0.5 + rpm_lite.nu_Z = constant 0.025 + rpm_lite.nu_I = constant 1.7 +} + +# From table Initialization: for each <dam_tag> (each line) +init_cow{ + name=dam_cow_01 + #______ Abortion sub-block + abortion_olivier.delta = constant 3.0 + abortion_olivier.enabled = never + abortion_olivier.dip = vector constant 17 ; constant 64 + abortion_olivier.abo = vector constant 0.02 ; constant 0.005 ; constant 0.0004 + + # Genotype sub-block associated with cow_01 in table Genotype + garuns_olivier.WM = constant 450 + garuns_olivier.khi_M = constant 0.3 + garuns_olivier.b0 = constant 1.6 + garuns_olivier.nu_X = constant 1 + garuns_olivier.nu_Y = constant 1.1 + garuns_olivier.nu_F = constant 1 + garuns_olivier.nu_P = constant 1 + garuns_olivier.eD_star = constant 10.7 + garuns_olivier.NDF_star = constant 1 + garuns_olivier.psi = constant 1 + rpm_lite.nu_B = constant 0.5 + rpm_lite.nu_Z = constant 0.025 + rpm_lite.nu_I = constant 1.7 +} +init_cow{ + name=dam_cow_02 + #______ Abortion sub-block + abortion_olivier.delta = constant 3.0 + abortion_olivier.enabled = never + abortion_olivier.dip = vector constant 17 ; constant 64 + abortion_olivier.abo = vector constant 0.02 ; constant 0.005 ; constant 0.0004 + + # Genotype sub-block associated with cow_02 in table Genotype + garuns_olivier.WM = constant 450 + garuns_olivier.khi_M = constant 0.3 + garuns_olivier.b0 = constant 1.6 + garuns_olivier.nu_X = constant 1 + garuns_olivier.nu_Y = constant 1.1 + garuns_olivier.nu_F = constant 1 + garuns_olivier.nu_P = constant 1 + garuns_olivier.eD_star = constant 10.7 + garuns_olivier.NDF_star = constant 1 + garuns_olivier.psi = constant 1 + rpm_lite.nu_B = constant 0.5 + rpm_lite.nu_Z = constant 0.025 + rpm_lite.nu_I = constant 1.7 +} + +# From table Initialization: for each line +# The value of days_after_conception is set such as N = - (birth_date – 280 – start_date) +action{ + type = buy_cow + name = buy_dam_cow_01 + init_cow = dam_cow_01 + init_bull = sire_cow_01 + age = 600 + days_after_conception = -1 + number = 1 +} +action{ + type = buy_cow + name = buy_dam_cow_02 + init_cow = dam_cow_02 + init_bull = sire_cow_02 + age = 600 + days_after_conception = -30 + number = 1 +} + +# From table Initialization: for all lines +link{ + trigger = init + action = buy_dam_cow_01 + action = buy_dam_cow_02 +} + +# From table Initialization: for each line +link{ + trigger = calving + condition = calf_breed dam_cow_01 + action = state_add cow_01 + action = log_db birth_of_female cow_01 birth_from_dam dam_cow_01 birth_from_sire sire_cow_01 +} +link{ + trigger = calving + condition = calf_breed dam_cow_02 + action = state_add cow_02 + action = log_db birth_of_female cow_02 birth_from_dam dam_cow_02 birth_from_sire sire_cow_02 +} + +#______ MANAGE BREEDING of TWIN farm from tables Genotype & Insemination + +# Define once +init_bull{ + name= no_conception + bull.breed_name = NULL + bull.semens_quality = constant 0.0 + bull.female_ratio = constant 0.5 +} + +# For all lines where conception is not 0 +breed{ + breed = NULL #always this line + breed = IA_01 + breed = IA_02 + breed = IA_03 + breed = IA_04 +} + +# From table Insemination: for each line where conception = 1 and calf_sex = 1 (male) +init_bull{ + name= semen_IA_01 + bull.breed_name = IA_01 + bull.semens_quality = constant 1.0 + bull.female_ratio = constant 0.0 +} + +# From table Insemination: for each line where conception = 1 and calf_sex = 0 (female) +init_bull{ + name= semen_IA_02 + bull.breed_name = IA_02 + bull.semens_quality = constant 1.0 + bull.female_ratio = constant 1.0 + + # Genotype sub-block associated with <calf_tag> = cow_03 in table Genotype + garuns_olivier.WM = constant 450 + garuns_olivier.khi_M = constant 0.3 + garuns_olivier.b0 = constant 1.6 + garuns_olivier.nu_X = constant 1 + garuns_olivier.nu_Y = constant 1.1 + garuns_olivier.nu_F = constant 1 + garuns_olivier.nu_P = constant 1 + garuns_olivier.eD_star = constant 10.7 + garuns_olivier.NDF_star = constant 1 + garuns_olivier.psi = constant 1 + rpm_lite.nu_B = constant 0.5 + rpm_lite.nu_Z = constant 0.025 + rpm_lite.nu_I = constant 1.7 +} +init_bull{ + name= semen_IA_03 + bull.breed_name = IA_03 + bull.semens_quality = constant 1.0 + bull.female_ratio = constant 1.0 + + # Genotype sub-block associated with <calf_tag> = cow_05 in table Genotype + garuns_olivier.WM = constant 450 + garuns_olivier.khi_M = constant 0.3 + garuns_olivier.b0 = constant 1.6 + garuns_olivier.nu_X = constant 1 + garuns_olivier.nu_Y = constant 1.1 + garuns_olivier.nu_F = constant 1 + garuns_olivier.nu_P = constant 1 + garuns_olivier.eD_star = constant 10.7 + garuns_olivier.NDF_star = constant 1 + garuns_olivier.psi = constant 1 + rpm_lite.nu_B = constant 0.5 + rpm_lite.nu_Z = constant 0.025 + rpm_lite.nu_I = constant 1.7 +} +init_bull{ + name= semen_IA_04 + bull.breed_name = IA_04 + bull.semens_quality = constant 1.0 + bull.female_ratio = constant 1.0 + + # Genotype sub-block associated with <calf_tag> = cow_04 in table Genotype + garuns_olivier.WM = constant 450 + garuns_olivier.khi_M = constant 0.3 + garuns_olivier.b0 = constant 1.6 + garuns_olivier.nu_X = constant 1 + garuns_olivier.nu_Y = constant 1.1 + garuns_olivier.nu_F = constant 1 + garuns_olivier.nu_P = constant 1 + garuns_olivier.eD_star = constant 10.7 + garuns_olivier.NDF_star = constant 1 + garuns_olivier.psi = constant 1 + rpm_lite.nu_B = constant 0.5 + rpm_lite.nu_Z = constant 0.025 + rpm_lite.nu_I = constant 1.7 +} + +# From table Insemination: for each different <insemination date> + +trigger{ + type = chron + name = trigger_insem_19720221 + scheme = 1972-02-21 12:00:00 +} +trigger{ + type = chron + name = trigger_insem_19730106 + scheme = 1973-01-06 12:00:00 +} +trigger{ + type = chron + name = trigger_insem_19750225 + scheme = 1975-02-25 12:00:00 +} +trigger{ + type = chron + name = trigger_insem_19720321 + scheme = 1972-03-21 12:00:00 +} +trigger{ + type = chron + name = trigger_insem_19730204 + scheme = 1973-02-04 12:00:00 +} +trigger{ + type = chron + name = trigger_insem_19730225 + scheme = 1973-02-25 12:00:00 +} + +# From table Insemination: for each line + +link{ + trigger = trigger_insem_19720221 + action = insemination_IA_01 +} +trigger{ + type = custom + name = trigger_insem_19720221_cow_01 +} +action{ + type = broadcast_now + name = insemination_IA_01 + condition = is_in cow_01 + trigger = trigger_insem_19720221_cow_01 +} + +link{ + trigger = trigger_insem_19730106 + action = insemination_IA_02 +} +trigger{ + type = custom + name = trigger_insem_19730106_cow_01 +} +action{ + type = broadcast_now + name = insemination_IA_02 + condition = is_in cow_01 + trigger = trigger_insem_19730106_cow_01 +} + +link{ + trigger = trigger_insem_19750225 + action = insemination_IA_03 +} +trigger{ + type = custom + name = trigger_insem_19750225_cow_03 +} +action{ + type = broadcast_now + name = insemination_IA_03 + condition = is_in cow_03 + trigger = trigger_insem_19750225_cow_03 +} + +link{ + trigger = trigger_insem_19720321 + action = insemination_IA_04 +} +trigger{ + type = custom + name = trigger_insem_19720321_cow_02 +} +action{ + type = broadcast_now + name = insemination_IA_04 + condition = is_in cow_02 + trigger = trigger_insem_19720321_cow_02 +} + +link{ + trigger = trigger_insem_19730204 + action = insemination_IA_05 +} +trigger{ + type = custom + name = trigger_insem_19730204_cow_02 +} +action{ + type = broadcast_now + name = insemination_IA_05 + condition = is_in cow_02 + trigger = trigger_insem_19730204_cow_02 +} + +link{ + trigger = trigger_insem_19730225 + action = insemination_IA_06 +} +trigger{ + type = custom + name = trigger_insem_19730225_cow_02 +} +action{ + type = broadcast_now + name = insemination_IA_06 + condition = is_in cow_02 + trigger = trigger_insem_19730225_cow_02 +} + +# From table Insemination : for each line WHERE conception = 0 +link{ + trigger = trigger_insem_19730204_cow_02 + action = inseminate no_conception +} + +link{ + trigger = trigger_insem_19730225_cow_02 + action = inseminate no_conception +} + +# From table Insemination : for each line WHERE conception = 1 + +link{ + trigger = trigger_insem_19720221_cow_01 + action = force_conception semen_IA_01 +} + +link{ + trigger = trigger_insem_19730106_cow_01 + action = force_conception semen_IA_02 +} + +link{ + trigger = trigger_insem_19750225_cow_03 + action = force_conception semen_IA_03 +} + +link{ + trigger = trigger_insem_19720321_cow_02 + action = force_conception semen_IA_04 +} + +# From table Insemination : for each line WHERE conception = 1 AND calf_sex = 0 (female) + +link{ + trigger = calving + condition = calf_breed IA_02 + action = state_add cow_03 + action = log_db birth_of_female cow_03 birth_from_dam cow_01 birth_from_sire sire_20 +} + +link{ + trigger = calving + condition = calf_breed IA_03 + action = state_add cow_05 + action = log_db birth_of_female cow_05 birth_from_dam cow_03 birth_from_sire sire_20 +} + +link{ + trigger = calving + condition = calf_breed IA_04 + action = state_add cow_04 + action = log_db birth_of_female cow_04 birth_from_dam cow_02 birth_from_sire sire_20 +} + +# From table Insemination : for each line WHERE conception = 1 AND calf_sex = 0 (male) + +link{ + trigger = calving + condition = calf_breed IA_01 + action = log_db birth_of_male calf_a birth_from_dam cow_01 birth_from_sire sire_10 +} + +#______ MANAGE DEATH of TWIN farm from table Death + +# From table Death: for each different <death_date> +trigger{ + type = chron + name = trigger_death_19741001 + scheme = 1974-10-01 23:59:59 +} + +# From table Death: for each different <cow_tag> + +link{ + trigger = trigger_death_19741001 + action = death_cow_01 +} +trigger{ + type = custom + name = trigger_death_19741001_cow_01 +} +action{ + type = broadcast_now + name = death_cow_01 + condition = is_in cow_01 + trigger = trigger_death_19741001_cow_01 +} +link{ + trigger = trigger_death_19741001_cow_01 + #action = log_db death_of_cow cow_01 + #action = delete_cow death + action = trigger_now om_death +} + +#______ MANAGE CULLING of TWIN farm from table Culling + +# From table Culling: for each different <culling_date> +trigger{ + type = chron + name = trigger_culling_19731025 + scheme = 1973-10-25 06:00:00 +} + +# From table Culling: for each different <cow_tag> + +link{ + trigger = trigger_culling_19731025 + action = culling_cow_02 +} +trigger{ + type = custom + name = trigger_culling_19731025_cow_02 +} +action{ + type = broadcast_now + name = culling_cow_02 + condition = is_in cow_02 + trigger = trigger_culling_19731025_cow_02 +} +link{ + trigger = trigger_culling_19731025_cow_02 + #action = log_db culling_of_cow cow_02 + action = delete_cow culling cow_02 + action = log_db delete_cow: for a reason +} + + +#______ MANAGE DRYING-OFF of TWIN farm from table Drying-off + +# From table Drying-off: for each different <drying_off_date> +trigger{ + type = chron + name = trigger_dryingoff_19730923 + scheme = 1973-09-23 14:00:00 +} +trigger{ + type = chron + name = trigger_dryingoff_19740809 + scheme = 1974-08-09 14:00:00 +} +trigger{ + type = chron + name = trigger_dryingoff_19760927 + scheme = 1976-09-27 14:00:00 +} +trigger{ + type = chron + name = trigger_dryingoff_19731022 + scheme = 1973-10-22 14:00:00 +} + +# From table Drying-off: for each different <cow_tag> +link{ + trigger = trigger_dryingoff_19730923 + action = dryingoff_cow_01_parity_1 +} +trigger{ + type = custom + name = trigger_dryingoff_19730923_cow_01 +} +action{ + type = broadcast_now + name = dryingoff_cow_01_parity_1 + condition = is_in cow_01 + trigger = trigger_dryingoff_19730923_cow_01 +} +link{ + trigger = trigger_dryingoff_19730923_cow_01 + #action = log_db dryingoff_of_cow cow_01 dryingoff_in_parity 1 + action = stop_milking + action = log_db stop_milking: cow_01 in_parity 1 + +} + +link{ + trigger = trigger_dryingoff_19740809 + action = dryingoff_cow_01_parity_2 +} +trigger{ + type = custom + name = trigger_dryingoff_19740809_cow_01 +} +action{ + type = broadcast_now + name = dryingoff_cow_01_parity_2 + condition = is_in cow_01 + trigger = trigger_dryingoff_19740809_cow_01 +} +link{ + trigger = trigger_dryingoff_19740809_cow_01 + #action = log_db dryingoff_of_cow cow_01 dryingoff_in_parity 2 + action = stop_milking + action = log_db stop_milking: cow_01 in_parity 2 +} + +link{ + trigger = trigger_dryingoff_19760927 + action = dryingoff_cow_03_parity_1 +} +trigger{ + type = custom + name = trigger_dryingoff_19760927_cow_03 +} +action{ + type = broadcast_now + name = dryingoff_cow_03_parity_1 + condition = is_in cow_03 + trigger = trigger_dryingoff_19760927_cow_03 +} +link{ + trigger = trigger_dryingoff_19760927_cow_03 + #action = log_db dryingoff_of_cow cow_03 dryingoff_in_parity 1 + action = stop_milking + action = log_db stop_milking: cow_03 in_parity 1 +} + +link{ + trigger = trigger_dryingoff_19731022 + action = dryingoff_cow_02_parity_1 +} +trigger{ + type = custom + name = trigger_dryingoff_19731022_cow_02 +} +action{ + type = broadcast_now + name = dryingoff_cow_02_parity_1 + condition = is_in cow_02 + trigger = trigger_dryingoff_19731022_cow_02 +} +link{ + trigger = trigger_dryingoff_19731022_cow_02 + #action = log_db dryingoff_of_cow cow_02 dryingoff_in_parity 1 + action = stop_milking + action = log_db stop_milking: cow_02 in_parity 1 +} + + + + +################################################################################################################# +#====== FARM COMPONENTS: semen (genotype-based initialization of semen from individual bulls) # +################################################################################################################# + + +################################################################################################################# +#====== FARM COMPONENTS: heat detection # +################################################################################################################# + + +################################################################################################################# +#====== FARM COMPONENTS: feedstuffs # +################################################################################################################# + + +################################################################################################################# +#====== FARM COMPONENTS: diets # +################################################################################################################# + + +################################################################################################################# +#====== FARM COMPONENTS: time schemes # +################################################################################################################# + + +################################################################################################################# +#====== FARM COMPONENTS: groups # +################################################################################################################# + + +################################################################################################################# +#====== FARM COMPONENTS: operations # +################################################################################################################# + + +################################################################################################################# +#====== FARM COMPONENTS: transfers # +################################################################################################################# + + +################################################################################################################# +#====== FARM COMPONENTS: perturbations # +################################################################################################################# + + +################################################################################################################# +#====== FARM COMPONENTS: parcels # +################################################################################################################# + +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/input/WILD/explan.txt Mon Aug 25 16:37:43 2025 +0000 @@ -0,0 +1,2 @@ +template_file sim_id farm_tag start_date stop_date now_date latitude longitude nb_cow +farmer-plan_WILD.txt sim_1 WILD 1970-01-01 1979-01-01 1970-01-01 4.444444 5.555555 10
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/input/WILD/farmer-plan_WILD.txt Mon Aug 25 16:37:43 2025 +0000 @@ -0,0 +1,271 @@ +################################################################################################################# +# # +# InSiliCow # +# Virtual farm specification # +# # +################################################################################################################# + +################################################################################################################# +#====== GENERAL SETTINGS # +################################################################################################################# + +#______ Include files +@include farmer-log.txt # providing log action and trigger +@include farmer-base.txt # providing basic components + +#______ Models: specify models for individual cows +param_general{ + garuns_type = garuns_olivier + rpm_type = rpm_lite + abortion_type = abortion_olivier +} + +#______ Simulation: provide time range, output database and code name +init{ + begin_date = $start_date$ 00:00:00 + end_date = $stop_date$ 23:59:59 + output_db = db_events.sqlite + output_config = config.txt + name = $sim_id$ +} + +#______ Log Farm information +link{ + trigger = init + action = log_db farm_tag $farm_tag$ + action = log_db start_date $start_date$ + action = log_db stop_date $stop_date$ + action = log_db now_date $now_date$ + action = log_db latitude $latitude$ + action = log_db longitude $longitude$ +} + +#______ End of simulation +trigger{ + type = chron + name = tr_end_simu + scheme = $stop_date$ 23:59:58 +} + +#______ Past and future +condition{ + type = chron_range + name = past + from = $start_date$ 00:00:00 + to = $now_date$ 00:00:01 +} + +condition{ + type = chron_range + name = future + from = $now_date$ 00:00:00 + to = $stop_date$ 23:59:59 +} + +#______ Day one +trigger{ + type = chron + name = day_one_herd + scheme = $start_date$ 23:59:59 +} +trigger{ + type = custom + name = day_one +} +link{ + trigger = day_one_herd + action = broadcast_now day_one +} + +#______ Calving tag +link{ + trigger = calving + condition = calf_sex male + condition = future + action = log_db birth_of_male no_tag +} +link{ + trigger = calving + condition = calf_sex female + condition = future + action = log_db birth_of_female no_tag +} + +#______ Manage initial dam +state{ + state = INITIAL-DAM +} + +link{ + trigger = day_one + action = state_add INITIAL-DAM +} +link{ + trigger = parturition + condition = is_in INITIAL-DAM + condition = not is_in IN_WILD + action = trigger_later tr_delete_cow 1 +} +trigger{ + type = custom + name = tr_delete_cow +} +link{ + trigger = tr_delete_cow + action = delete_cow remove_initial_dam +} + +#______ Stoechio +stoechio{ + +} + +################################################################################################################# +#====== FARM COMPONENTS: genotype # +################################################################################################################# + +#______ Genetic_sD: provide Mendelian sampling std dev for transmission of Genetic Scaling Parameters (GSP) +# GSP_newborn ~ Normal [ (GSP_mother + GSP_father)/2 , GSP_sd ] | within (min, max) + +genetic_sd{ + garuns_olivier.WM{ + sd = 50 + min = 200 + max = 800 + } + + garuns_olivier.khi_M { + sd = 0.06 + min = 0.1 + max = 0.6 + } + + garuns_olivier.b0{ + sd = 0 + min = 0.80 + max = 2.40 + } + + garuns_olivier.nu_X{ + sd = 0 + min = 0.2 + max = 1.8 + } + + garuns_olivier.nu_Y{ + sd = 0.1 + min = 0.2 + max = 1.8 + } + + garuns_olivier.nu_F{ + sd = 0 + min = 0.50 + max = 1.50 + } + + garuns_olivier.nu_P{ + sd = 0 + min = 0.50 + max = 1.50 + } + + garuns_olivier.eD_star{ + sd = 0 + min = 9.0 + max = 15.0 + } + + garuns_olivier.NDF_star{ + sd = 0 + min = 0.10 + max = 0.90 + } + + garuns_olivier.psi{ + sd = 0 + min = 0 + max = 1 + } + + rpm_lite.nu_I{ + sd = 0.007 + min = 0.00 + max = 0.20 + } + + rpm_lite.nu_B{ + sd = 0.07 + min = 1.20 + max = 2.20 + } + + rpm_lite.nu_Z{ + sd = 0.02 + min = 0.90 + max = 1.10 + } +} + +################################################################################################################# +#====== FARM COMPONENTS: herd (genotype-based initialization of individual cows) # +################################################################################################################# + +#______ INITIALIZATION of WILD herd + +link{ + trigger = init + action = buy_calf genotype_cow_wild $nb_cow$ +} + + +################################################################################################################# +#====== FARM COMPONENTS: semen (genotype-based initialization of semen from individual bulls) # +################################################################################################################# + + +################################################################################################################# +#====== FARM COMPONENTS: heat detection # +################################################################################################################# + + +################################################################################################################# +#====== FARM COMPONENTS: feedstuffs # +################################################################################################################# + + +################################################################################################################# +#====== FARM COMPONENTS: diets # +################################################################################################################# + + +################################################################################################################# +#====== FARM COMPONENTS: time schemes # +################################################################################################################# + + +################################################################################################################# +#====== FARM COMPONENTS: groups # +################################################################################################################# + + +################################################################################################################# +#====== FARM COMPONENTS: operations # +################################################################################################################# + + +################################################################################################################# +#====== FARM COMPONENTS: transfers # +################################################################################################################# + + +################################################################################################################# +#====== FARM COMPONENTS: perturbations # +################################################################################################################# + + +################################################################################################################# +#====== FARM COMPONENTS: parcels # +################################################################################################################# + +
--- a/test-data/input/example_00/explan.txt Wed May 28 08:37:22 2025 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2 +0,0 @@ -template_file sim_id end_year -farmer-pl.txt sim_1 1971
--- a/test-data/input/example_00/farmer-pl.txt Wed May 28 08:37:22 2025 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2360 +0,0 @@ -################################################################################################################# -# # -# InSiliCow: Farm Management # -# # -################################################################################################################# - -################################################################################################################# -#====== Preprocessor: specification of included files # -################################################################################################################# - -@include farmer-log.txt -# provides the action log_olivier -# call the action log_olivier every hour - - - - -################################################################################################################# -#====== Initialization of simulation # -################################################################################################################# - -#______ Simulation time range - -init{ - begin_date = 1970-01-01 00:00:00 # 1970-01-01 00:00:00 - end_date = $end_year$-12-31 23:59:59 # 1975-02-20 23:59:59 - output_db = events.sqlite - name = $sim_id$ -} - -#______ Models - -param_general{ - garuns_type = garuns_olivier - rpm_type = rpm_lite - abortion_type = abortion_olivier -} - - -#______ Stoechio -stoechio{ - -} - - - - -################################################################################################################# -#====== Genetic Scaling Parameters (GSP): defines individual cow performance # -# # -#======> in GARUNS model # -#GSP (unit) : Name Default | Proxy for # -#WM (Kg) : Mature non labile body mass 450 ± 25 | Format # -#khi_M (%) : Target labile:non-labile mass ratio 0.33 ± 0.03 | Body fatness # -#b0 (1/d) : Reserves storage rate 1.6 ± 0.16 | Reserve lability # -#nu_X (-) : Labile body mass mobilization index 1.0 ± 0.1 | Maternal investment # -#nu_Y (-) : Milk yield index 1.0 ± 0.1 | Milk potential # -#nu_F (-) : Milk fat secretion index 1.00 ± 0.02 | Milk fat content # -#nu_P (-) : Milk protein secretion index 1.00 ± 0.02 | Milk protein content # -#eD_star (MJ ME/Kg DM) : Optimal diet energy content 12.3 ± 0.5 | Energy intake capacity # -#NDF_star (Kg NDF/Kg DM): Optimal fiber energy content 0.5 ± 0.02 | Fiber intake capacity # -# # -#======> in RPM model # -#nu_I (-) : Conception probability threshold 0.026 ± 0.007 | Fertility # -#nu_B (-) : Puberty index 1.70 ± 0.07 | Age at 1st ovulation # -#nu_Z (-) : Follicular dynamics rate 1.00 ± 0.02 | Estrous duration # -################################################################################################################# - -################################################################################################################# -#====== Transmission of Genetic Scaling Parameters (GSP) # -# > genetic_sd defines the Mendelian sampling standard deviation for the calculation of the GSP of # -# a newborn calf : GSP_newborn ~ Normal [ (GSP_mother + GSP_father)/2 , GSP_sd ] # -################################################################################################################# - -genetic_sd{ - - garuns_olivier.WM{ - sd = 50 - min = 200 - max = 800 - } - - garuns_olivier.khi_M { - sd = 0.06 - min = 0.1 - max = 0.6 - } - - garuns_olivier.b0{ - sd = 0 - min = 0.80 - max = 2.40 - } - - garuns_olivier.nu_X{ - sd = 0 - min = 0.2 - max = 1.8 - } - - garuns_olivier.nu_Y{ - sd = 0.1 - min = 0.2 - max = 1.8 - } - - garuns_olivier.nu_F{ - sd = 0 - min = 0.50 - max = 1.50 - } - - garuns_olivier.nu_P{ - sd = 0 - min = 0.50 - max = 1.50 - } - - garuns_olivier.eD_star{ - sd = 0 - min = 9.0 - max = 15.0 - } - - garuns_olivier.NDF_star{ - sd = 0 - min = 0.10 - max = 0.90 - } - - rpm_lite.nu_I{ - sd = 0.007 - min = 0.00 - max = 0.20 - } - - rpm_lite.nu_B{ - sd = 0.07 - min = 1.20 - max = 2.20 - } - - rpm_lite.nu_Z{ - sd = 0.02 - min = 0.90 - max = 1.10 - } -} - -################################################################################################################# -#====== Initialization of cows # -################################################################################################################# - -####### DEFAULT COW ############################################################################################# -init_cow{ - name=cow_default - - ### ABORTION rules acording to days in pregnancy (dip) - abortion_olivier.delta = constant 3.0 # days (compute every delta) - abortion_olivier.enabled = sometime - # never : no abortion, - # always : always abort, - # sometime : abort according to abortion_olivier.abo - # and abortion_olivier.dip - - ### Days in pregnancy (dip) cutoffs (to cut gestation in early embryo, late embryo and fetal stages) - # Default intervals: Early embryo [0;17] Late embryo [17;64] Fetal [64;+inf] - abortion_olivier.dip = vector constant 17 ; constant 64 - - ### Daily probability of abortion for each intervals - # Default probabiliies : E: 0.0230 L: 0.0096 F: 0.0004 - abortion_olivier.abo = vector constant 0.02 ; constant 0.005 ; constant 0.0004 - - ### GARUNS & RPM_lite Genetic Scaling Parameters - # Default constant values - garuns_olivier.WM = constant 450 #450 - garuns_olivier.khi_M = constant 0.30 # 0.33 - garuns_olivier.b0 = constant 1.6 # 1.6 - garuns_olivier.nu_X = constant 1 # 1.0 - garuns_olivier.nu_Y = constant 1.1 # 1.0 - garuns_olivier.nu_F = constant 1 # 1.0 - garuns_olivier.nu_P = constant 1 # 1.0 - garuns_olivier.eD_star = constant 10.7 # 10.7 - garuns_olivier.NDF_star = constant 0.5 # 0.5 - rpm_lite.nu_B = constant 1.7 # 1.7 - rpm_lite.nu_Z = constant 1 # 1.0 - rpm_lite.nu_I = constant 0.025 # 0.026 -} - -####### RANDOM COW ############################################################################################## -init_cow{ - name=cow_random - - ### ABORTION rules acording to days in pregnancy (dip) - abortion_olivier.delta = constant 3.0 # days (compute every delta) - abortion_olivier.enabled = sometime - # never : no abortion, - # always : always abort, - # sometime : abort according to abortion_olivier.abo - # and abortion_olivier.dip - - ### Days in pregnancy (dip) cutoffs (to cut gestation in early embryo, late embryo and fetal stages) - # Default intervals: Early embryo [0;17] Late embryo [17;64] Fetal [64;+inf] - abortion_olivier.dip = vector constant 17 ; constant 64 - - ### Daily probability of abortion for each intervals - # Default probabiliies : E: 0.0230 L: 0.0096 F: 0.0004 - abortion_olivier.abo = vector constant 0.02 ; constant 0.005 ; constant 0.0004 - - ### GARUNS & RPM_lite Genetic Scaling Parameters - # Random values - garuns_olivier.WM = norm99 450 50 #450 ± 25 - garuns_olivier.khi_M = norm99 0.30 0.06 # 0.33 ± 0.03 - garuns_olivier.b0 = norm99 1.6 0 # 1.6 ± 0.16 - garuns_olivier.nu_X = norm99 1 0 # 1.0 ± 0.10 - garuns_olivier.nu_Y = norm99 1.1 0.1 # 1.0 ± 0.10 - garuns_olivier.nu_F = norm99 1 0 # 1.0 ± 0.02 - garuns_olivier.nu_P = norm99 1 0 # 1.0 ± 0.02 - garuns_olivier.eD_star = norm99 10.7 0 # 10.7 ± 0.5 - garuns_olivier.NDF_star = norm99 0.5 0 # 0.5 ± 0.02 - rpm_lite.nu_B = norm99 1.7 0.07 # 1.7 ± 0.07 - rpm_lite.nu_Z = norm99 1 0.02 # 1.0 ± 0.02 - rpm_lite.nu_I = norm99 0.025 0.007 # 0.026 ± 0.007 -} - -################################################################################################################# -#====== Breeding # -################################################################################################################# - -#______ Bull semen: quality = 0.95 ± 0.05 ; sexratio = 0 % female - -breed{ - breed = bull_default -} - -init_bull{ - name=semen_default - bull.breed_name = bull_default - bull.semens_quality = norm99 0.95 0.05 # a number between 0.0 (=never works) and 1.0 (=perfect) - bull.female_ratio = constant 0 # offspring sex ratio. 1.0 = 100%female, 0.0=0%female -} - -#_______Breeding season: every year from *-03-21 00:00:00 to *-06-21 23:59:59 - -condition{ - type = chron_range - name = breeding_season - from = *-03-21 00:00:00 #*-03-21 00:00:00 - to = *-06-21 23:59:59 #*-06-21 23:59:59 -} - -trigger{ - type = chron - name = breeding_start - scheme = *-03-21 00:00:00 -} - -# link{ -# trigger = breeding_start -# action = log_db Start_breeding_season -#} - -trigger{ - type = chron - name = breeding_end - scheme = *-06-21 23:59:59 -} - -#link{ -# trigger = breeding_end -# action = log_db Stop_breeding_season -#} - -#______ Estrous detection method ________________________________________________________________________________ - -estrous_detection_method{ - name=estrous_detection_default - - #When do we observe oestruses - time_slice = 06:00:00 18:00:00 #00:00:01 23:59:59 - - #estrogene is transformed to an expression using a Hill function - expression_threshold=0.75 #default 0.75 - expression_stiffness=7 #default 7 - - - #the oestrus worth an insemination if the memory function is above this threshold - #THIS threshold is scaled for an observation all the day long - #if you observe half a day multiply this threshold by 0.5 - #1.0 is a reasonable base value for all day observations - detection_threshold=0.05 # 0.1 - - #then, the oestrus is truely detected with a chance of - sensitivity = 0.75 #0.7 - - #then an average of wrong_oestrus_per_day are generated - wrong_oestrus_per_day = 0 #0.00 -} - - -#______ Insemination _________________________________________________________________________________ - -# Insemination is performed once a day when estrous is detected - -state{ - state = ALREADY_INSEMINATED -} - -trigger{ - type=custom - name=tr_delete_ALREADY_INSEMINATED -} - -link{ - trigger = tr_delete_ALREADY_INSEMINATED - action = state_delete ALREADY_INSEMINATED -} - -link{ - trigger = estrous - condition = is_in BREEDING - condition = not is_pregnant - condition = not is_in ALREADY_INSEMINATED - action = state_add ALREADY_INSEMINATED - action = trigger_later tr_delete_ALREADY_INSEMINATED 1 - action = log_db 01_INSEMINATION - action = inseminate semen_default -} - -################################################################################################################# -#====== Initialization of herd # -################################################################################################################# - -trigger{ - type = custom - name = init_day_01 -} -trigger{ - type = custom - name = init_day_02 -} -trigger{ - type = custom - name = init_day_03 -} -trigger{ - type = custom - name = init_day_04 -} -trigger{ - type = custom - name = init_day_05 -} -trigger{ - type = custom - name = init_day_06 -} -trigger{ - type = custom - name = init_day_07 -} -trigger{ - type = custom - name = init_day_08 -} -trigger{ - type = custom - name = init_day_09 -} -trigger{ - type = custom - name = init_day_10 -} -trigger{ - type = custom - name = init_day_11 -} -trigger{ - type = custom - name = init_day_12 -} -trigger{ - type = custom - name = init_day_13 -} -trigger{ - type = custom - name = init_day_14 -} -trigger{ - type = custom - name = init_day_15 -} -trigger{ - type = custom - name = init_day_16 -} -trigger{ - type = custom - name = init_day_17 -} -trigger{ - type = custom - name = init_day_18 -} -trigger{ - type = custom - name = init_day_19 -} -trigger{ - type = custom - name = init_day_20 -} -trigger{ - type = custom - name = init_day_21 -} -trigger{ - type = custom - name = init_day_22 -} -trigger{ - type = custom - name = init_day_23 -} -trigger{ - type = custom - name = init_day_24 -} -trigger{ - type = custom - name = init_day_25 -} -trigger{ - type = custom - name = init_day_26 -} -trigger{ - type = custom - name = init_day_27 -} -trigger{ - type = custom - name = init_day_28 -} -trigger{ - type = custom - name = init_day_29 -} -trigger{ - type = custom - name = init_day_30 -} -trigger{ - type = custom - name = init_day_31 -} -trigger{ - type = custom - name = init_day_32 -} -trigger{ - type = custom - name = init_day_33 -} -trigger{ - type = custom - name = init_day_34 -} -trigger{ - type = custom - name = init_day_35 -} -trigger{ - type = custom - name = init_day_36 -} -trigger{ - type = custom - name = init_day_37 -} -trigger{ - type = custom - name = init_day_38 -} -trigger{ - type = custom - name = init_day_39 -} -trigger{ - type = custom - name = init_day_40 -} -trigger{ - type = custom - name = init_day_41 -} -trigger{ - type = custom - name = init_day_42 -} -trigger{ - type = custom - name = init_day_43 -} -trigger{ - type = custom - name = init_day_44 -} -trigger{ - type = custom - name = init_day_45 -} -trigger{ - type = custom - name = init_day_46 -} -trigger{ - type = custom - name = init_day_47 -} -trigger{ - type = custom - name = init_day_48 -} -trigger{ - type = custom - name = init_day_49 -} -trigger{ - type = custom - name = init_day_50 -} -trigger{ - type = custom - name = init_day_51 -} -trigger{ - type = custom - name = init_day_52 -} -trigger{ - type = custom - name = init_day_53 -} -trigger{ - type = custom - name = init_day_54 -} -trigger{ - type = custom - name = init_day_55 -} -trigger{ - type = custom - name = init_day_56 -} -trigger{ - type = custom - name = init_day_57 -} -trigger{ - type = custom - name = init_day_58 -} -trigger{ - type = custom - name = init_day_59 -} - -link{ - trigger = init - action = buy_calf cow_random 1 - action = log_db BUY_CALF_N=1 - action = trigger_later init_day_01 1 -} -link{ - trigger = init_day_01 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_02 1 -} -link{ - trigger = init_day_02 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_03 1 -} -link{ - trigger = init_day_03 - action = buy_calf cow_random 8 - action = log_db BUY_CALF_N=8 - action = trigger_later init_day_04 1 -} -link{ - trigger = init_day_04 - action = buy_calf cow_random 8 - action = log_db BUY_CALF_N=8 - action = trigger_later init_day_05 1 -} -link{ - trigger = init_day_05 - action = buy_calf cow_random 4 - action = log_db BUY_CALF_N=4 - action = trigger_later init_day_06 1 -} -link{ - trigger = init_day_06 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_07 1 -} -link{ - trigger = init_day_07 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_08 1 -} -link{ - trigger = init_day_08 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_09 1 -} -link{ - trigger = init_day_09 - action = buy_calf cow_random 4 - action = log_db BUY_CALF_N=4 - action = trigger_later init_day_10 1 -} -link{ - trigger = init_day_10 - action = buy_calf cow_random 4 - action = log_db BUY_CALF_N=4 - action = trigger_later init_day_11 1 -} -link{ - trigger = init_day_11 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_12 1 -} -link{ - trigger = init_day_12 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_13 1 -} -link{ - trigger = init_day_13 - action = buy_calf cow_random 4 - action = log_db BUY_CALF_N=4 - action = trigger_later init_day_14 1 -} -link{ - trigger = init_day_14 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_15 1 -} -link{ - trigger = init_day_15 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_16 1 -} -link{ - trigger = init_day_16 - action = buy_calf cow_random 4 - action = log_db BUY_CALF_N=4 - action = trigger_later init_day_17 1 -} -link{ - trigger = init_day_17 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_18 1 -} -link{ - trigger = init_day_18 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_19 1 -} -link{ - trigger = init_day_19 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_20 1 -} -link{ - trigger = init_day_20 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_21 1 -} -link{ - trigger = init_day_21 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_22 1 -} -link{ - trigger = init_day_22 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_23 1 -} -link{ - trigger = init_day_23 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_24 1 -} -link{ - trigger = init_day_24 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_25 1 -} -link{ - trigger = init_day_25 - action = buy_calf cow_random 4 - action = log_db BUY_CALF_N=4 - action = trigger_later init_day_26 1 -} -link{ - trigger = init_day_26 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_27 1 -} -link{ - trigger = init_day_27 - action = buy_calf cow_random 12 - action = log_db BUY_CALF_N=12 - action = trigger_later init_day_28 1 -} -link{ - trigger = init_day_28 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_29 1 -} -link{ - trigger = init_day_29 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_30 1 -} -link{ - trigger = init_day_30 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_31 1 -} -link{ - trigger = init_day_31 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_32 1 -} -link{ - trigger = init_day_32 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_33 1 -} -link{ - trigger = init_day_33 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_34 1 -} -link{ - trigger = init_day_34 - action = buy_calf cow_random 4 - action = log_db BUY_CALF_N=4 - action = trigger_later init_day_35 1 -} -link{ - trigger = init_day_35 - action = buy_calf cow_random 4 - action = log_db BUY_CALF_N=4 - action = trigger_later init_day_36 1 -} -link{ - trigger = init_day_36 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_37 1 -} -link{ - trigger = init_day_37 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_38 1 -} -link{ - trigger = init_day_38 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_39 1 -} -link{ - trigger = init_day_39 - action = buy_calf cow_random 4 - action = log_db BUY_CALF_N=4 - action = trigger_later init_day_40 1 -} -link{ - trigger = init_day_40 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_41 1 -} -link{ - trigger = init_day_41 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_42 1 -} -link{ - trigger = init_day_42 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_43 1 -} -link{ - trigger = init_day_43 - action = buy_calf cow_random 4 - action = log_db BUY_CALF_N=4 - action = trigger_later init_day_44 1 -} -link{ - trigger = init_day_44 - action = buy_calf cow_random 4 - action = log_db BUY_CALF_N=4 - action = trigger_later init_day_45 1 -} -link{ - trigger = init_day_45 - action = buy_calf cow_random 4 - action = log_db BUY_CALF_N=4 - action = trigger_later init_day_46 1 -} -link{ - trigger = init_day_46 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_47 1 -} -link{ - trigger = init_day_47 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_48 1 -} -link{ - trigger = init_day_48 - action = buy_calf cow_random 4 - action = log_db BUY_CALF_N=4 - action = trigger_later init_day_49 1 -} -link{ - trigger = init_day_49 - action = buy_calf cow_random 4 - action = log_db BUY_CALF_N=4 - action = trigger_later init_day_50 1 -} -link{ - trigger = init_day_50 - action = buy_calf cow_random 4 - action = log_db BUY_CALF_N=4 - action = trigger_later init_day_51 1 -} -link{ - trigger = init_day_51 - action = buy_calf cow_random 8 - action = log_db BUY_CALF_N=8 - action = trigger_later init_day_52 1 -} -link{ - trigger = init_day_52 - action = buy_calf cow_random 4 - action = log_db BUY_CALF_N=4 - action = trigger_later init_day_53 1 -} -link{ - trigger = init_day_53 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_54 1 -} -link{ - trigger = init_day_54 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_55 1 -} -link{ - trigger = init_day_55 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_56 1 -} -link{ - trigger = init_day_56 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_57 1 -} -link{ - trigger = init_day_57 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_58 1 -} -link{ - trigger = init_day_58 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_59 1 -} -link{ - trigger = init_day_59 - action = buy_calf cow_random 25 - action = log_db BUY_CALF_N=25 -} - -################################################################################################################# -#====== Management of herd # -################################################################################################################# - -#_______Predefined states : herd, heifers & mature ______________________________________________________________ -# -# herd : Every animal that enters the herd is added to this state. Male calves are never added. -# heifers : Newborn female calves enter the herd as heifers, and are moved to not_heifers at 1st calving. -# mature : Cows enter mature state when non-labile body mass W > 0.5 WM (GSP for mature format). - - -################################################################################################################# -#====== Remove cows @ end of simulation # -################################################################################################################# - -trigger{ - type = chron - name = tr_end_simu - scheme = 1985-12-31 23:59:58 -} - -link{ - trigger = tr_end_simu - action = log_db action_remove_herd - action = remove_herd -} - -action{ - type = broadcast_now - name = remove_herd - trigger = tr_remove_herd -} - -trigger{ - type = custom - name = tr_remove_herd -} - -link{ - trigger = tr_remove_herd - action = log_db delete_cow - action = delete_cow -} - -################################################################################################################# -#====== Rearing # -################################################################################################################# - -#_______CALF: heifers of age < 100 days - -state{ - state = CALF -} - -link{ - trigger = enter heifers - condition = age < 100 - # action = log_db heifers_to_CALF - action = state_move heifers CALF -} - -link{ - trigger = calving - condition = state_size CALF > 333 - action = log_db REMOVE_CALF_to_limit_size - action = delete_calf - } - -#_______HEIFER: heifers of age >= 100 days - -state{ - state = HEIFER -} - -link{ - trigger = enter heifers - condition = age >= 100 - # action = log_db heifers_to_HEIFER - action = state_move heifers HEIFER -} - -link{ - trigger = every_day - condition = age >= 100 - condition = is_in CALF - # action = log_db CALF_to_HEIFER_@WEANING - action = state_move CALF HEIFER -} - - -################################################################################################################# -#====== Reproduction # -################################################################################################################# - -#_______CYCLING: non-pregnant heifers at 1st ovulation or postabortive/postpartum recycling cows _____________ - -state{ - state = CYCLING -} - -link{ - trigger = ovulation - condition = is_in HEIFER - # action = log_db HEIFER_to_CYCLING_@PUBERTY - action = log_db 00_PUBERTY - action = state_move HEIFER CYCLING -} - -link{ - trigger = ovulation - action = log_db 00_OVULATION -} - -#_______BREEDING: cycling heifers and cows during breeding season ______________________________________________ - -state{ - state = BREEDING -} - -#During breeding season, not TO_CULL and CYCLING cows are moved to BREEDING -link{ - trigger = every_day - condition = breeding_season - condition = not is_in TO_CULL - condition = is_in CYCLING - condition = is_in mature - # action = log_db CYCLING_to_BREEDING - action = state_move CYCLING BREEDING -} - -link{ - trigger = enter BREEDING - # action = log_db Start_estrous_detection - action = estrous_start estrous_detection_default -} - -link{ - trigger = every_day - condition = not breeding_season - condition = is_in BREEDING - # action = log_db BREEDING_to_CYCLING - action = state_move BREEDING CYCLING -} - -link{ - trigger = quit BREEDING - # action = log_db Stop_estrous_detection - action = estrous_stop -} - - -#_______PREGNANT: at conception _________________________________________________________________________________ - -state{ - state = PREGNANT -} - -link{ - trigger = conception - action = log_db 02_CONCEPTION - action = state_move BREEDING PREGNANT -} - -#_______POST-ABORTIVE: triggered at abortion ____________________________________________________________________ - -state{ - state = POST-ABORTIVE -} - -link{ - trigger = abortion - condition = days_after_conception <= 17 - action = log_db 03_EARLY_EMBRYO_DEATH - action = state_move PREGNANT CYCLING -} - -link{ - trigger = abortion - condition = days_after_conception > 17 - condition = days_after_conception <= 64 - action = log_db 04_LATE_EMBRYO_DEATH - action = state_move PREGNANT CYCLING -} - -trigger{ - type = custom - name = post_abortive_recycling -} - -#Abortions after ] 64 - 210 days] days in pregnancy are managed with a voluntary period of 40 days -link{ - trigger = abortion - condition = days_after_conception > 64 - condition = days_after_conception <= 210 - action = log_db 05_FETAL_DEATH - action = state_move PREGNANT POST-ABORTIVE - action = trigger_later post_abortive_recycling 40 -} - -link{ - trigger = post_abortive_recycling - # action = log_db POST-ABORTIVE_to_CYCLING - action = state_move POST-ABORTIVE CYCLING -} - -#Abortions after 210 days in pregnancy are managed by culling -link{ - trigger = abortion - condition = days_after_conception > 210 - action = log_db 05_FETAL_DEATH - action = log_db TO_CULL_from_PREGNANT_after_late_fetal_death - action = state_move PREGNANT TO_CULL -} - - -#_______POSTPARTAL: triggered at parturition ____________________________________________________________________ - -state{ - state = POSTPARTAL -} - -trigger{ - type = custom - name = postpartal_recycling -} - -link{ - trigger = parturition - action = log_db 06_PARTURITION - # action = log_db PREGNANT_to_POSTPARTAL - action = state_move PREGNANT POSTPARTAL - action = trigger_later postpartal_recycling 40 - action = log_db start_milking - action = start_milking - } - -link{ - trigger = postpartal_recycling - # action = log_db POSTPARTAL_to_CYCLING - action = state_move POSTPARTAL CYCLING -} - -################################################################################################################# -#====== Drying-off # -################################################################################################################# - -#_______EXTENDED_LACTATION: CYCLING and is_milking after 305 days after calving - -state{ - state = EXTENDED_LACTATION -} - -link{ - trigger = every_day - condition = is_milking - condition = not is_in PREGNANT - condition = not is_in EXTENDED_LACTATION - condition = days_after_calving >= 305 - # action = log_db Extended lactation - action = state_add EXTENDED_LACTATION -} - -#stop 300 days_after_calving if milk_yield <= 5 kg/d and not in EXTENDED_LACTATION -link{ - trigger = every_day - condition = is_milking - condition = not is_in EXTENDED_LACTATION - condition = days_after_calving >= 300 - condition = milk_yield <= 5 - action = log_db stop_milking - action = stop_milking -} - -#stop 300 days_after_calving if milk_yield <= 5 kg/d and in EXTENDED_LACTATION -link{ - trigger = every_day - condition = is_milking - condition = is_in EXTENDED_LACTATION - condition = days_after_calving >= 300 - condition = milk_yield <= 5 - action = log_db stop_milking_extended - action = stop_milking -} - -#stop 300 days_after_calving and 219 days_in_pregnancy -link{ - trigger = every_day - condition = is_milking - condition = is_pregnant - condition = days_after_calving >= 300 - condition = days_in_pregnancy >= 219 - action = log_db stop_milking_pregnant - action = stop_milking -} - -link{ - trigger = stop_milking - trigger = enter PREGNANT - condition = is_in EXTENDED_LACTATION - action = state_delete EXTENDED_LACTATION -} - -################################################################################################################# -#====== Culling # -################################################################################################################# - -#_______TO_CULL: ____________________________________________________________________ - -state{ - state = TO_CULL -} - -#______culling not pregnant nulliparous at age > 800 days -link{ - trigger = every_day - condition = is_in CYCLING - condition = not is_in PREGNANT - condition = parity = 0 - condition = age > 800 - action = log_db TO_CULL_from_CYCLING_because_too_old_heifer - action = state_move CYCLING TO_CULL -} - - -#______culling not pregnant 320 days_after_calving -link{ - trigger = every_day - condition = days_after_calving > 320 - condition = is_in CYCLING - action = log_db TO_CULL_from_CYCLING_because_too_late_after_calving - action = state_move CYCLING TO_CULL -} - -#______culling not pregnant after 7 insemination -link{ - trigger = every_day - condition = is_in BREEDING - condition = not is_in ALREADY_INSEMINATED - condition = parity > 0 - condition = num_insemination_lactation >= 7 - action = log_db TO_CULL_from_BREEDING_max_nb_ins - action = state_move BREEDING TO_CULL -} - -link{ - trigger = enter PREGNANT - condition = is_in TO_CULL - action = state_move TO_CULL PREGNANT -} - - -#______culling oldest cow - -link{ - trigger = culling_day - condition = state_size TO_CULL = 999999 - condition = state_size PREGNANT > 666 - #individual conditions, like not is_milking cannot be mixed wirh herd level triggers - action = log_db Seek_for_oldest_to_cull - action = cull_oldest -} - -trigger{ - type = custom - name = tr_cull_oldest -} - -action{ - type = broadcast_now - name = cull_oldest - condition = not is_pregnant - condition = not is_milking - condition = not is_in HEIFER - condition = not is_in CALF - sortby = age - reverse = yes - limit = 1 - trigger = tr_cull_oldest -} - -link{ - trigger = tr_cull_oldest - action = log_db remove_oldest - action = delete_cow -} - - -#______remove cows TO_CULL once a month on day 15th - -trigger{ - type = custom - name = tr_remove_cows_to_cull -} - -link{ - trigger = tr_remove_cows_to_cull - condition = is_in TO_CULL - condition = not is_milking - condition = not is_pregnant - action = log_db Remove - action = delete_cow -} - -trigger{ - type = chron - name = culling_day - scheme = *-*-15 14:00:00 -} - -action{ - type = broadcast_now - name = broadcast_TO_CULL - condition = is_in TO_CULL - trigger = tr_remove_cows_to_cull -} - -link{ - trigger = culling_day - action = broadcast_TO_CULL -} - - -################################################################################################################# -#====== Feeding # -################################################################################################################# -#______optimal feeding for 999 - -state{ - state = CONTROL -} - -link{ - trigger = enter herd - condition = state_size herd <= 999 #nb_control 0 - 999 - action = change_food optimal - action = state_add CONTROL #Cows are fed on optimal diet as a control -} - -#______Default feeding rules - -#################### > at birth: on calf diet -link{ - trigger = enter CALF - condition = not is_in CONTROL - action = change_food calf_diet -} - -#################### > at weaning: on heifer diet -link{ - trigger = enter HEIFER - condition = not is_in CONTROL - action = change_food heifer_diet -} - -#################### > at parturition: on lactation diet -link{ - trigger = parturition - condition = not is_in CONTROL - action = change_food lactation_diet -} - - -#################### > at drying-off: on drycow_diet -link{ - trigger = stop_milking - condition = not is_in CONTROL - action = change_food drycow_diet -} - -#################### > OUTDOOR: on pasture diet -trigger{ - type = chron - name = outdoor - scheme = *-04-01 00:00:00 -} - -link{ - trigger = outdoor - action = broadcast_outdoor -} - -action{ - type = broadcast_now - name = broadcast_outdoor - trigger = outdoor_feeding -} - -trigger{ - type = custom - name = outdoor_feeding -} - -link{ - trigger = outdoor_feeding - condition = not is_in CALF - condition = not is_in CONTROL - action = change_food pasture_diet -} - - -#################### > INDOOR: back to diet according to state -trigger{ - type = chron - name = indoor - scheme = *-10-01 00:00:00 -} - -link{ - trigger = indoor - action = broadcast_indoor -} - -action{ - type = broadcast_now - name = broadcast_indoor - trigger = indoor_feeding -} - -trigger{ - type = custom - name = indoor_feeding -} - -link{ - trigger = indoor_feeding - condition = is_in HEIFER - condition = not is_in CONTROL - action = change_food heifer_diet -} - -link{ - trigger = indoor_feeding - condition = is_in CYCLING - condition = not is_in CONTROL - action = change_food heifer_diet -} - -link{ - trigger = indoor_feeding - condition = is_in BREEDING - condition = not is_milking - condition = not is_in CONTROL - action = change_food heifer_diet -} - -link{ - trigger = indoor_feeding - condition = not is_in BREEDING - condition = not is_milking - condition = not is_in CONTROL - action = change_food drycow_diet -} - -link{ - trigger = indoor_feeding - condition = is_milking - condition = not is_in CONTROL - action = change_food lactation_diet -} - - - - -################################################################################################################# -#====== Generic stuff # -################################################################################################################# - -trigger{ - type = chron - name = every_day_herd - scheme = *-*-* 12:00:00 -} - -trigger{ - type = custom - name = every_day -} - -link{ - trigger = every_day_herd - action = broadcast_now every_day -} - -trigger{ - type = custom - name = first_day_sub -} - -trigger{ - type = custom - name = first_day -} - -link{ - trigger = init - action = trigger_later first_day_sub 0.001 -} -link{ - trigger = first_day_sub - action = broadcast_now first_day -} - -################################################################################################################# -#====== Log # -################################################################################################################# - -log{ - - #farmer level - insemination = yes - change_food = yes - - #herd level - conception = yes - parturition = yes - death = yes - estrous_observed = yes - estrous_missed = yes - estrous_environment= yes - insemination_result= yes - mature = yes - ovulation = yes - new_cow = yes - delete_cow = yes - abortion = yes - - #cow level - animal_performance = no -} - -################################################################################################################# -#====== Log states # -################################################################################################################# - -action{ - type = genericlog_herd - - name = log_states - log_type = file - file_path = states.txt - sep_col = \t - file_line_flush=no - - #sqlite_path = states.sqlite - #sqlite_table = states - - - #--- from cow and simulator --- - column{ - value = time - name = time - sqlite_type = numeric - } - - column{ - value = state.CONTROL - name = CONTROL - sqlite_type = numeric - } - - column{ - value = state.CALF - name = CALF - sqlite_type = numeric - } - - column{ - value = state.HEIFER - name = HEIFER - sqlite_type = numeric - } - - column{ - value = state.CYCLING - name = CYCLING - sqlite_type = numeric - } - - column{ - value = state.BREEDING - name = BREEDING - sqlite_type = numeric - } - - column{ - value = state.PREGNANT - name = PREGNANT - sqlite_type = numeric - } - - column{ - value = state.POST-ABORTIVE - name = POST-ABORTIVE - sqlite_type = numeric - } - - column{ - value = state.POSTPARTAL - name = POSTPARTAL - sqlite_type = numeric - } - - column{ - value = state.EXTENDED_LACTATION - name = EXTENDED_LACTATION - sqlite_type = numeric - } - - column{ - value = state.TO_CULL - name = TO_CULL - sqlite_type = numeric - } - - - # column{ - # value = state.not.mature - # name = not_mature - # sqlite_type = numeric - # } - -} - -link{ - trigger = every_day_herd - action = log_states -} - - - -###s######## Default diets - -feed{ - name = calf_diet - type = mix - - feed = CPL.MLK - proportion = 1.00 -} - -feed{ - name = heifer_diet - type = mix - - feed = FO.STR - proportion = 0.02 - feed = FO.HAP - proportion = 0.60 - feed = FO.GSI - proportion = 0.32 - feed = CO.CER - proportion = 0.05 - feed = CPL.CMV - proportion = 0.01 -} - -feed{ - name = lactation_diet - type = mix - - feed = FO.STR - proportion = 0.01 - feed = FO.HAP - proportion = 0.03 - feed = FO.GSI - proportion = 0.04 - feed = FO.CSI - proportion = 0.70 - feed = CO.CER - proportion = 0.05 - feed = CO.OSC - proportion = 0.13 - feed = CO.ROO - proportion = 0.03 - feed = CPL.CMV - proportion = 0.01 -} - -feed{ - name = drycow_diet - type = mix - - feed = FO.STR - proportion = 0.02 - feed = FO.HAP - proportion = 0.68 - feed = FO.CSI - proportion = 0.08 - feed = CO.CER - proportion = 0.05 - feed = CO.OSC - proportion = 0.13 - feed = CO.ROO - proportion = 0.03 - feed = CPL.CMV - proportion = 0.01 -} - -feed{ - name = pasture_diet - type = mix - - feed = FO.FGX - proportion = 0.778 - feed = CO.CER - proportion = 0.050 - feed = CO.OSC - proportion = 0.130 - feed = CO.TUB - proportion = 0.002 - feed = CO.ROO - proportion = 0.030 - feed = CPL.CMV - proportion = 0.010 -} - - - - - -######################################################## -# # -#List of available feed (derived from INRA tables) # -# # -######################################################## - -########### FORAGES #################################### -# FO.STR Straw -# FO.STN Straw treated with ammonia -# FO.MSH Maize stover & husks -# FO.HAL Legume hay -# FO.HAG Gramineae hay -# FO.HAP Permanent grassland hay -# FO.DHA Dehydrated alfalfa -# FO.DHF Dehydrated forage -# FO.FGC Fresh cereal grass -# FO.FGO Fresh oleaginous grass -# FO.FGG Fresh gramineae grass -# FO.FGX Fresh mixed grass (meadow) -# FO.FGL Fresh legume grass -# FO.GSI50 Grass silage > 50% DM -# FO.GSI Grass silage -# FO.CSI Corn silage -# FO.FPF Faba & pea forage -# FO.VEG Vegetable fodder - -########### CONCENTRATES ############################### -# CO.CER Cereal seed & by-products -# CO.OSC5 Oilseed cake <5% oil -# CO.OSC Oilseed cake -# CO.TUB Starchy tubers -# CO.ROO Vegetable roots -# CO.FPB Faba & pea bean -# CO.LUP Lupin -# CO.SDO Oilseed - -########### COMPLEMENTS ################################ -# CPL.CMV Compl. Minerals & Vitamins -# CPL.AMA Amino acids -# CPL.URE Urea -# CPL.MOL Molasses -# CPL.PLP Beet pulp -# CPL.MLK Milk -# CPL.OIL Oil - - -feed{ # Straw - # Type of feed: FORAGE - # Maximum incorporation in diet: 80 %FM - # Representative INRA feed: FP0090 Oat straw - name = FO.STR - type = ingredient - feed_eD = 5.9512 # MJ_ME/kg_DM - feed_DMC = 0.8825 # kg_DM/kg_FM - feed_OM = 0.9100 # kg/kg_DM - feed_OMd = 0.4500 # % - feed_CP = 0.0360 # kg/kg_DM - feed_CPd = 0.0296 # % - feed_NDF = 0.7910 # kg/kg_DM - feed_ST = 0.0000 # kg/kg_DM - feed_STd = 0.0000 # % - feed_EE = 0.0150 # kg/kg_DM -} -feed{ # Straw treated with ammonia - # Type of feed: FORAGE - # Maximum incorporation in diet: 80 %FM - # Representative INRA feed: FP0080 Barley straw, NH3-treated 5%DM - name = FO.STN - type = ingredient - feed_eD = 7.6484 # MJ_ME/kg_DM - feed_DMC = 0.8867 # kg_DM/kg_FM - feed_OM = 0.8970 # kg/kg_DM - feed_OMd = 0.5567 # % - feed_CP = 0.1000 # kg/kg_DM - feed_CPd = 0.3933 # % - feed_NDF = 0.7603 # kg/kg_DM - feed_ST = 0.0000 # kg/kg_DM - feed_STd = 0.0000 # % - feed_EE = 0.0150 # kg/kg_DM -} -feed{ # Maize stover & husks - # Type of feed: FORAGE - # Maximum incorporation in diet: 80 %FM - # Representative INRA feed: FP0180 Maize stover, ensiled - name = FO.MSH - type = ingredient - feed_eD = 8.5847 # MJ_ME/kg_DM - feed_DMC = 0.5022 # kg_DM/kg_FM - feed_OM = 0.9332 # kg/kg_DM - feed_OMd = 0.6220 # % - feed_CP = 0.0888 # kg/kg_DM - feed_CPd = 0.3432 # % - feed_NDF = 0.6580 # kg/kg_DM - feed_ST = 0.0000 # kg/kg_DM - feed_STd = 0.0000 # % - feed_EE = 0.0150 # kg/kg_DM -} -feed{ # Legume hay - # Type of feed: FORAGE - # Maximum incorporation in diet: 100 %FM - # Representative INRA feed: FF3370 Lucerne hay - name = FO.HAL - type = ingredient - feed_eD = 8.4626 # MJ_ME/kg_DM - feed_DMC = 0.8500 # kg_DM/kg_FM - feed_OM = 0.8956 # kg/kg_DM - feed_OMd = 0.5987 # % - feed_CP = 0.1791 # kg/kg_DM - feed_CPd = 0.6818 # % - feed_NDF = 0.5326 # kg/kg_DM - feed_ST = 0.0000 # kg/kg_DM - feed_STd = 0.0000 # % - feed_EE = 0.0259 # kg/kg_DM -} -feed{ # Gramineae hay - # Type of feed: FORAGE - # Maximum incorporation in diet: 100 %FM - # Representative INRA feed: FF1190 Italian ryegrass hay - name = FO.HAG - type = ingredient - feed_eD = 8.8553 # MJ_ME/kg_DM - feed_DMC = 0.8500 # kg_DM/kg_FM - feed_OM = 0.9011 # kg/kg_DM - feed_OMd = 0.6294 # % - feed_CP = 0.1169 # kg/kg_DM - feed_CPd = 0.5447 # % - feed_NDF = 0.6421 # kg/kg_DM - feed_ST = 0.0000 # kg/kg_DM - feed_STd = 0.0000 # % - feed_EE = 0.0300 # kg/kg_DM -} -feed{ # Permanent grassland hay - # Type of feed: FORAGE - # Maximum incorporation in diet: 100 %FM - # Representative INRA feed: FF0750 Mountain permanent grassland hay - name = FO.HAP - type = ingredient - feed_eD = 9.0294 # MJ_ME/kg_DM - feed_DMC = 0.8500 # kg_DM/kg_FM - feed_OM = 0.9133 # kg/kg_DM - feed_OMd = 0.6196 # % - feed_CP = 0.1270 # kg/kg_DM - feed_CPd = 0.5679 # % - feed_NDF = 0.6090 # kg/kg_DM - feed_ST = 0.0000 # kg/kg_DM - feed_STd = 0.0000 # % - feed_EE = 0.0223 # kg/kg_DM -} -feed{ # Dehydrated alfalfa - # Type of feed: FORAGE - # Maximum incorporation in diet: 60 %FM - # Representative INRA feed: CD0040 Dehydrated alfalfa - name = FO.DHA - type = ingredient - feed_eD = 9.2187 # MJ_ME/kg_DM - feed_DMC = 0.9070 # kg_DM/kg_FM - feed_OM = 0.8752 # kg/kg_DM - feed_OMd = 0.6317 # % - feed_CP = 0.2002 # kg/kg_DM - feed_CPd = 0.7017 # % - feed_NDF = 0.4375 # kg/kg_DM - feed_ST = 0.0297 # kg/kg_DM - feed_STd = 0.8200 # % - feed_EE = 0.0292 # kg/kg_DM -} -feed{ # Dehydrated forage - # Type of feed: FORAGE - # Maximum incorporation in diet: 60 %FM - # Representative INRA feed: CD0120 Dehydrated Italian ryegrass - name = FO.DHF - type = ingredient - feed_eD = 9.9954 # MJ_ME/kg_DM - feed_DMC = 0.9080 # kg_DM/kg_FM - feed_OM = 0.8898 # kg/kg_DM - feed_OMd = 0.7010 # % - feed_CP = 0.1436 # kg/kg_DM - feed_CPd = 0.6182 # % - feed_NDF = 0.5450 # kg/kg_DM - feed_ST = 0.0024 # kg/kg_DM - feed_STd = 0.1640 # % - feed_EE = 0.0268 # kg/kg_DM -} -feed{ # Fresh cereal grass - # Type of feed: FORAGE - # Maximum incorporation in diet: 100 %FM - # Representative INRA feed: FV2020 Fresh whole crop sorghum - name = FO.FGC - type = ingredient - feed_eD = 9.4748 # MJ_ME/kg_DM - feed_DMC = 0.2504 # kg_DM/kg_FM - feed_OM = 0.9148 # kg/kg_DM - feed_OMd = 0.6585 # % - feed_CP = 0.1044 # kg/kg_DM - feed_CPd = 0.6330 # % - feed_NDF = 0.5710 # kg/kg_DM - feed_ST = 0.0983 # kg/kg_DM - feed_STd = 0.8652 # % - feed_EE = 0.0304 # kg/kg_DM -} -feed{ # Fresh oleaginous grass - # Type of feed: FORAGE - # Maximum incorporation in diet: 100 %FM - # Representative INRA feed: FV2830 Fresh silphium - name = FO.FGO - type = ingredient - feed_eD = 9.8974 # MJ_ME/kg_DM - feed_DMC = 0.1170 # kg_DM/kg_FM - feed_OM = 0.8494 # kg/kg_DM - feed_OMd = 0.7323 # % - feed_CP = 0.1535 # kg/kg_DM - feed_CPd = 0.7491 # % - feed_NDF = 0.4212 # kg/kg_DM - feed_ST = 0.0000 # kg/kg_DM - feed_STd = 0.0000 # % - feed_EE = 0.0248 # kg/kg_DM -} -feed{ # Fresh gramineae grass - # Type of feed: FORAGE - # Maximum incorporation in diet: 100 %FM - # Representative INRA feed: FV0490 Fresh italian ryegrass - name = FO.FGG - type = ingredient - feed_eD = 10.2129 # MJ_ME/kg_DM - feed_DMC = 0.1885 # kg_DM/kg_FM - feed_OM = 0.8893 # kg/kg_DM - feed_OMd = 0.7150 # % - feed_CP = 0.1452 # kg/kg_DM - feed_CPd = 0.6756 # % - feed_NDF = 0.5690 # kg/kg_DM - feed_ST = 0.0000 # kg/kg_DM - feed_STd = 0.0000 # % - feed_EE = 0.0367 # kg/kg_DM -} -feed{ # Fresh mixed grass (meadow) - # Type of feed: FORAGE - # Maximum incorporation in diet: 100 %FM - # Representative INRA feed: FV0120 Fresh lowland grassland - name = FO.FGX - type = ingredient - feed_eD = 10.2424 # MJ_ME/kg_DM - feed_DMC = 0.1946 # kg_DM/kg_FM - feed_OM = 0.9057 # kg/kg_DM - feed_OMd = 0.6896 # % - feed_CP = 0.1444 # kg/kg_DM - feed_CPd = 0.6595 # % - feed_NDF = 0.5498 # kg/kg_DM - feed_ST = 0.0000 # kg/kg_DM - feed_STd = 0.0000 # % - feed_EE = 0.0265 # kg/kg_DM -} -feed{ # Fresh legume grass - # Type of feed: FORAGE - # Maximum incorporation in diet: 100 %FM - # Representative INRA feed: FV2370 Fresh red clover - name = FO.FGL - type = ingredient - feed_eD = 10.3243 # MJ_ME/kg_DM - feed_DMC = 0.1749 # kg_DM/kg_FM - feed_OM = 0.8844 # kg/kg_DM - feed_OMd = 0.7014 # % - feed_CP = 0.2046 # kg/kg_DM - feed_CPd = 0.7671 # % - feed_NDF = 0.4603 # kg/kg_DM - feed_ST = 0.0000 # kg/kg_DM - feed_STd = 0.0000 # % - feed_EE = 0.0287 # kg/kg_DM -} -feed{ # Grass silage > 50% DM - # Type of feed: FORAGE - # Maximum incorporation in diet: 100 %FM - # Representative INRA feed: FE2790 Wilted perennial ryegrass silage - name = FO.GSI50 - type = ingredient - feed_eD = 9.3078 # MJ_ME/kg_DM - feed_DMC = 0.5502 # kg_DM/kg_FM - feed_OM = 0.9056 # kg/kg_DM - feed_OMd = 0.6545 # % - feed_CP = 0.1351 # kg/kg_DM - feed_CPd = 0.6395 # % - feed_NDF = 0.5744 # kg/kg_DM - feed_ST = 0.0000 # kg/kg_DM - feed_STd = 0.0000 # % - feed_EE = 0.0337 # kg/kg_DM -} -feed{ # Grass silage - # Type of feed: FORAGE - # Maximum incorporation in diet: 100 %FM - # Representative INRA feed: FE2220 Perennial ryegrass silage - name = FO.GSI - type = ingredient - feed_eD = 10.3090 # MJ_ME/kg_DM - feed_DMC = 0.2234 # kg_DM/kg_FM - feed_OM = 0.8950 # kg/kg_DM - feed_OMd = 0.6952 # % - feed_CP = 0.1406 # kg/kg_DM - feed_CPd = 0.6469 # % - feed_NDF = 0.5425 # kg/kg_DM - feed_ST = 0.0000 # kg/kg_DM - feed_STd = 0.0000 # % - feed_EE = 0.0374 # kg/kg_DM -} -feed{ # Corn silage - # Type of feed: FORAGE - # Maximum incorporation in diet: 100 %FM - # Representative INRA feed: FE4710 Fine chop 30% DM corn silage - name = FO.CSI - type = ingredient - feed_eD = 10.6995 # MJ_ME/kg_DM - feed_DMC = 0.3109 # kg_DM/kg_FM - feed_OM = 0.9484 # kg/kg_DM - feed_OMd = 0.7061 # % - feed_CP = 0.0848 # kg/kg_DM - feed_CPd = 0.5300 # % - feed_NDF = 0.4415 # kg/kg_DM - feed_ST = 0.2754 # kg/kg_DM - feed_STd = 0.7660 # % - feed_EE = 0.0310 # kg/kg_DM -} -feed{ # Faba & pea forage - # Type of feed: FORAGE - # Maximum incorporation in diet: 100 %FM - # Representative INRA feed: FV2700 Fresh faba bean forage - name = FO.FPF - type = ingredient - feed_eD = 10.8203 # MJ_ME/kg_DM - feed_DMC = 0.2546 # kg_DM/kg_FM - feed_OM = 0.9115 # kg/kg_DM - feed_OMd = 0.7188 # % - feed_CP = 0.1578 # kg/kg_DM - feed_CPd = 0.7156 # % - feed_NDF = 0.4160 # kg/kg_DM - feed_ST = 0.0913 # kg/kg_DM - feed_STd = 0.7650 # % - feed_EE = 0.0288 # kg/kg_DM -} -feed{ # Vegetable fodder - # Type of feed: FORAGE - # Maximum incorporation in diet: 100 %FM - # Representative INRA feed: FV2840 Fresh kale - name = FO.VEG - type = ingredient - feed_eD = 12.0901 # MJ_ME/kg_DM - feed_DMC = 0.1348 # kg_DM/kg_FM - feed_OM = 0.8674 # kg/kg_DM - feed_OMd = 0.8260 # % - feed_CP = 0.1684 # kg/kg_DM - feed_CPd = 0.7794 # % - feed_NDF = 0.3382 # kg/kg_DM - feed_ST = 0.0000 # kg/kg_DM - feed_STd = 0.0000 # % - feed_EE = 0.0080 # kg/kg_DM -} -feed{ # Cereal seed & by-products - # Type of feed: CONCENTRATE - # Maximum incorporation in diet: 60 %FM - # Representative INRA feed: CS0160 Wheat middlings, starch 30-40% - name = CO.CER - type = ingredient - feed_eD = 12.3262 # MJ_ME/kg_DM - feed_DMC = 0.8835 # kg_DM/kg_FM - feed_OM = 0.9541 # kg/kg_DM - feed_OMd = 0.7712 # % - feed_CP = 0.1642 # kg/kg_DM - feed_CPd = 0.6629 # % - feed_NDF = 0.2909 # kg/kg_DM - feed_ST = 0.4008 # kg/kg_DM - feed_STd = 0.8041 # % - feed_EE = 0.0584 # kg/kg_DM -} -feed{ # Oilseed cake <5% oil - # Type of feed: CONCENTRATE - # Maximum incorporation in diet: 60 %FM - # Representative INRA feed: CX0050 Cottonseed meal, cr. fibre 15-20% - name = CO.OSC5 - type = ingredient - feed_eD = 12.0555 # MJ_ME/kg_DM - feed_DMC = 0.8907 # kg_DM/kg_FM - feed_OM = 0.9309 # kg/kg_DM - feed_OMd = 0.7747 # % - feed_CP = 0.4309 # kg/kg_DM - feed_CPd = 0.7740 # % - feed_NDF = 0.2931 # kg/kg_DM - feed_ST = 0.0527 # kg/kg_DM - feed_STd = 0.8200 # % - feed_EE = 0.0236 # kg/kg_DM -} -feed{ # Oilseed cake - # Type of feed: CONCENTRATE - # Maximum incorporation in diet: 60 %FM - # Representative INRA feed: CX0310 Sunflower meal, oil 5-20% - name = CO.OSC - type = ingredient - feed_eD = 12.6524 # MJ_ME/kg_DM - feed_DMC = 0.9207 # kg_DM/kg_FM - feed_OM = 0.9368 # kg/kg_DM - feed_OMd = 0.7350 # % - feed_CP = 0.3499 # kg/kg_DM - feed_CPd = 0.7570 # % - feed_NDF = 0.3477 # kg/kg_DM - feed_ST = 0.0444 # kg/kg_DM - feed_STd = 0.8200 # % - feed_EE = 0.1015 # kg/kg_DM -} -feed{ # Starchy tubers - # Type of feed: CONCENTRATE - # Maximum incorporation in diet: 60 %FM - # Representative INRA feed: CP0030 Cassava - name = CO.TUB - type = ingredient - feed_eD = 11.6622 # MJ_ME/kg_DM - feed_DMC = 0.6480 # kg_DM/kg_FM - feed_OM = 0.9510 # kg/kg_DM - feed_OMd = 0.8367 # % - feed_CP = 0.0750 # kg/kg_DM - feed_CPd = 0.4888 # % - feed_NDF = 0.1192 # kg/kg_DM - feed_ST = 0.6447 # kg/kg_DM - feed_STd = 0.7900 # % - feed_EE = 0.0062 # kg/kg_DM -} -feed{ # Vegetable roots - # Type of feed: CONCENTRATE - # Maximum incorporation in diet: 60 %FM - # Representative INRA feed: FR0040 Carrot - name = CO.ROO - type = ingredient - feed_eD = 12.8261 # MJ_ME/kg_DM - feed_DMC = 0.1568 # kg_DM/kg_FM - feed_OM = 0.9311 # kg/kg_DM - feed_OMd = 0.8900 # % - feed_CP = 0.0896 # kg/kg_DM - feed_CPd = 0.5710 # % - feed_NDF = 0.1295 # kg/kg_DM - feed_ST = 0.0050 # kg/kg_DM - feed_STd = 0.2000 # % - feed_EE = 0.0110 # kg/kg_DM -} -feed{ # Faba & pea bean - # Type of feed: CONCENTRATE - # Maximum incorporation in diet: 60 %FM - # Representative INRA feed: CN0060 Faba bean seeds - name = CO.FPB - type = ingredient - feed_eD = 13.6219 # MJ_ME/kg_DM - feed_DMC = 0.8721 # kg_DM/kg_FM - feed_OM = 0.9610 # kg/kg_DM - feed_OMd = 0.9057 # % - feed_CP = 0.2689 # kg/kg_DM - feed_CPd = 0.7843 # % - feed_NDF = 0.1550 # kg/kg_DM - feed_ST = 0.4601 # kg/kg_DM - feed_STd = 0.7586 # % - feed_EE = 0.0146 # kg/kg_DM -} -feed{ # Lupin - # Type of feed: CONCENTRATE - # Maximum incorporation in diet: 60 %FM - # Representative INRA feed: CN0130 White lupin seeds - name = CO.LUP - type = ingredient - feed_eD = 15.2995 # MJ_ME/kg_DM - feed_DMC = 0.8880 # kg_DM/kg_FM - feed_OM = 0.9617 # kg/kg_DM - feed_OMd = 0.8800 # % - feed_CP = 0.3657 # kg/kg_DM - feed_CPd = 0.8000 # % - feed_NDF = 0.2257 # kg/kg_DM - feed_ST = 0.0700 # kg/kg_DM - feed_STd = 0.8200 # % - feed_EE = 0.0850 # kg/kg_DM -} -feed{ # Oilseed - # Type of feed: CONCENTRATE - # Maximum incorporation in diet: 60 %FM - # Representative INRA feed: CN0110 Linseeds - name = CO.SDO - type = ingredient - feed_eD = 17.6063 # MJ_ME/kg_DM - feed_DMC = 0.9143 # kg_DM/kg_FM - feed_OM = 0.9539 # kg/kg_DM - feed_OMd = 0.7650 # % - feed_CP = 0.2647 # kg/kg_DM - feed_CPd = 0.7380 # % - feed_NDF = 0.2515 # kg/kg_DM - feed_ST = 0.0461 # kg/kg_DM - feed_STd = 0.8200 # % - feed_EE = 0.3208 # kg/kg_DM -} -feed{ # Compl. Minerals & Vitamins - # Type of feed: COMPLEMENT - # Maximum incorporation in diet: 5 %FM - # Representative INRA feed: MC0010 Crushed chalk - name = CPL.CMV - type = ingredient - feed_eD = 0.0000 # MJ_ME/kg_DM - feed_DMC = 0.9500 # kg_DM/kg_FM - feed_OM = 0.0000 # kg/kg_DM - feed_OMd = 0.0000 # % - feed_CP = 0.0000 # kg/kg_DM - feed_CPd = 0.0000 # % - feed_NDF = 0.0000 # kg/kg_DM - feed_ST = 0.0000 # kg/kg_DM - feed_STd = 0.0000 # % - feed_EE = 0.0000 # kg/kg_DM -} -feed{ # Amino acids - # Type of feed: COMPLEMENT - # Maximum incorporation in diet: 5 %FM - # Representative INRA feed: CAA020 L-threonin - name = CPL.AMA - type = ingredient - feed_eD = 0.0000 # MJ_ME/kg_DM - feed_DMC = 1.0000 # kg_DM/kg_FM - feed_OM = 0.9960 # kg/kg_DM - feed_OMd = 1.0000 # % - feed_CP = 0.7450 # kg/kg_DM - feed_CPd = 1.0000 # % - feed_NDF = 0.0000 # kg/kg_DM - feed_ST = 0.0000 # kg/kg_DM - feed_STd = 0.0000 # % - feed_EE = 0.0000 # kg/kg_DM -} -feed{ # Urea - # Type of feed: COMPLEMENT - # Maximum incorporation in diet: 5 %FM - # Representative INRA feed: CV0020 Urea - name = CPL.URE - type = ingredient - feed_eD = 3.3890 # MJ_ME/kg_DM - feed_DMC = 0.9940 # kg_DM/kg_FM - feed_OM = 1.0000 # kg/kg_DM - feed_OMd = 0.9900 # % - feed_CP = 2.8700 # kg/kg_DM - feed_CPd = 1.0000 # % - feed_NDF = 0.0000 # kg/kg_DM - feed_ST = 0.0000 # kg/kg_DM - feed_STd = 0.0000 # % - feed_EE = 0.0000 # kg/kg_DM -} -feed{ # Molasses - # Type of feed: COMPLEMENT - # Maximum incorporation in diet: 10 %FM - # Representative INRA feed: CP0170 Beet molasses - name = CPL.MOL - type = ingredient - feed_eD = 9.7906 # MJ_ME/kg_DM - feed_DMC = 0.7390 # kg_DM/kg_FM - feed_OM = 0.8660 # kg/kg_DM - feed_OMd = 0.8250 # % - feed_CP = 0.1000 # kg/kg_DM - feed_CPd = 0.5800 # % - feed_NDF = 0.0015 # kg/kg_DM - feed_ST = 0.0000 # kg/kg_DM - feed_STd = 0.0000 # % - feed_EE = 0.0070 # kg/kg_DM -} -feed{ # Beet pulp - # Type of feed: COMPLEMENT - # Maximum incorporation in diet: 10 %FM - # Representative INRA feed: CP0020 Pressed beet pulp - name = CPL.PLP - type = ingredient - feed_eD = 11.5046 # MJ_ME/kg_DM - feed_DMC = 0.4503 # kg_DM/kg_FM - feed_OM = 0.9243 # kg/kg_DM - feed_OMd = 0.8367 # % - feed_CP = 0.0913 # kg/kg_DM - feed_CPd = 0.6470 # % - feed_NDF = 0.4827 # kg/kg_DM - feed_ST = 0.0047 # kg/kg_DM - feed_STd = 0.5467 # % - feed_EE = 0.0097 # kg/kg_DM -} -feed{ # Milk - # Type of feed: COMPLEMENT - # Maximum incorporation in diet: 100 %FM - # Representative INRA feed: CL0020 Whole milk powder - name = CPL.MLK - type = ingredient - feed_eD = 18.8280 # MJ_ME/kg_DM - feed_DMC = 0.9600 # kg_DM/kg_FM - feed_OM = 0.9350 # kg/kg_DM - feed_OMd = 0.9400 # % - feed_CP = 0.2540 # kg/kg_DM - feed_CPd = 0.7800 # % - feed_NDF = 0.0000 # kg/kg_DM - feed_ST = 0.0000 # kg/kg_DM - feed_STd = 0.0000 # % - feed_EE = 0.2510 # kg/kg_DM -} -feed{ # Oil - # Type of feed: COMPLEMENT - # Maximum incorporation in diet: 5 %FM - # Representative INRA feed: CG0050 Soybean oil - name = CPL.OIL - type = ingredient - feed_eD = 36.6937 # MJ_ME/kg_DM - feed_DMC = 0.9980 # kg_DM/kg_FM - feed_OM = 0.9995 # kg/kg_DM - feed_OMd = 0.8900 # % - feed_CP = 0.0000 # kg/kg_DM - feed_CPd = 0.0000 # % - feed_NDF = 0.0000 # kg/kg_DM - feed_ST = 0.0000 # kg/kg_DM - feed_STd = 0.0000 # % - feed_EE = 0.9992 # kg/kg_DM -} - - -
--- a/test-data/input/example_01/explan.txt Wed May 28 08:37:22 2025 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3 +0,0 @@ -template_file sim_id end_year -farmer-pl.txt sim_1 1972 -farmer-pl.txt sim_2 1975
--- a/test-data/input/example_01/farmer-pl.txt Wed May 28 08:37:22 2025 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2353 +0,0 @@ -################################################################################################################# -# # -# InSiliCow: Farm Management # -# # -################################################################################################################# - -################################################################################################################# -#====== Preprocessor: specification of included files # -################################################################################################################# - -@include farmer-log.txt -# provides the action log_olivier -# call the action log_olivier every hour - -################################################################################################################# -#====== Initialization of simulation # -################################################################################################################# - -#______ Simulation time range - -init{ - begin_date = 1970-01-01 00:00:00 # 1970-01-01 00:00:00 - end_date = $end_year$-12-31 23:59:59 # 1975-02-20 23:59:59 - output_db = events.sqlite - name = $sim_id$ -} - -#______ Models - -param_general{ - garuns_type = garuns_olivier - rpm_type = rpm_lite - abortion_type = abortion_olivier -} - -#______ Stoechio -stoechio{ - -} - -################################################################################################################# -#====== Genetic Scaling Parameters (GSP): defines individual cow performance # -# # -#======> in GARUNS model # -#GSP (unit) : Name Default | Proxy for # -#WM (Kg) : Mature non labile body mass 450 ± 25 | Format # -#khi_M (%) : Target labile:non-labile mass ratio 0.33 ± 0.03 | Body fatness # -#b0 (1/d) : Reserves storage rate 1.6 ± 0.16 | Reserve lability # -#nu_X (-) : Labile body mass mobilization index 1.0 ± 0.1 | Maternal investment # -#nu_Y (-) : Milk yield index 1.0 ± 0.1 | Milk potential # -#nu_F (-) : Milk fat secretion index 1.00 ± 0.02 | Milk fat content # -#nu_P (-) : Milk protein secretion index 1.00 ± 0.02 | Milk protein content # -#eD_star (MJ ME/Kg DM) : Optimal diet energy content 12.3 ± 0.5 | Energy intake capacity # -#NDF_star (Kg NDF/Kg DM): Optimal fiber energy content 0.5 ± 0.02 | Fiber intake capacity # -# # -#======> in RPM model # -#nu_I (-) : Conception probability threshold 0.026 ± 0.007 | Fertility # -#nu_B (-) : Puberty index 1.70 ± 0.07 | Age at 1st ovulation # -#nu_Z (-) : Follicular dynamics rate 1.00 ± 0.02 | Estrous duration # -################################################################################################################# - -################################################################################################################# -#====== Transmission of Genetic Scaling Parameters (GSP) # -# > genetic_sd defines the Mendelian sampling standard deviation for the calculation of the GSP of # -# a newborn calf : GSP_newborn ~ Normal [ (GSP_mother + GSP_father)/2 , GSP_sd ] # -################################################################################################################# - -genetic_sd{ - - garuns_olivier.WM{ - sd = 50 - min = 200 - max = 800 - } - - garuns_olivier.khi_M { - sd = 0.06 - min = 0.1 - max = 0.6 - } - - garuns_olivier.b0{ - sd = 0 - min = 0.80 - max = 2.40 - } - - garuns_olivier.nu_X{ - sd = 0 - min = 0.2 - max = 1.8 - } - - garuns_olivier.nu_Y{ - sd = 0.1 - min = 0.2 - max = 1.8 - } - - garuns_olivier.nu_F{ - sd = 0 - min = 0.50 - max = 1.50 - } - - garuns_olivier.nu_P{ - sd = 0 - min = 0.50 - max = 1.50 - } - - garuns_olivier.eD_star{ - sd = 0 - min = 9.0 - max = 15.0 - } - - garuns_olivier.NDF_star{ - sd = 0 - min = 0.10 - max = 0.90 - } - - rpm_lite.nu_I{ - sd = 0.007 - min = 0.00 - max = 0.20 - } - - rpm_lite.nu_B{ - sd = 0.07 - min = 1.20 - max = 2.20 - } - - rpm_lite.nu_Z{ - sd = 0.02 - min = 0.90 - max = 1.10 - } -} - -################################################################################################################# -#====== Initialization of cows # -################################################################################################################# - -####### DEFAULT COW ############################################################################################# -init_cow{ - name=cow_default - - ### ABORTION rules acording to days in pregnancy (dip) - abortion_olivier.delta = constant 3.0 # days (compute every delta) - abortion_olivier.enabled = sometime - # never : no abortion, - # always : always abort, - # sometime : abort according to abortion_olivier.abo - # and abortion_olivier.dip - - ### Days in pregnancy (dip) cutoffs (to cut gestation in early embryo, late embryo and fetal stages) - # Default intervals: Early embryo [0;17] Late embryo [17;64] Fetal [64;+inf] - abortion_olivier.dip = vector constant 17 ; constant 64 - - ### Daily probability of abortion for each intervals - # Default probabiliies : E: 0.0230 L: 0.0096 F: 0.0004 - abortion_olivier.abo = vector constant 0.02 ; constant 0.005 ; constant 0.0004 - - ### GARUNS & RPM_lite Genetic Scaling Parameters - # Default constant values - garuns_olivier.WM = constant 450 #450 - garuns_olivier.khi_M = constant 0.30 # 0.33 - garuns_olivier.b0 = constant 1.6 # 1.6 - garuns_olivier.nu_X = constant 1 # 1.0 - garuns_olivier.nu_Y = constant 1.1 # 1.0 - garuns_olivier.nu_F = constant 1 # 1.0 - garuns_olivier.nu_P = constant 1 # 1.0 - garuns_olivier.eD_star = constant 10.7 # 10.7 - garuns_olivier.NDF_star = constant 0.5 # 0.5 - rpm_lite.nu_B = constant 1.7 # 1.7 - rpm_lite.nu_Z = constant 1 # 1.0 - rpm_lite.nu_I = constant 0.025 # 0.026 -} - -####### RANDOM COW ############################################################################################## -init_cow{ - name=cow_random - - ### ABORTION rules acording to days in pregnancy (dip) - abortion_olivier.delta = constant 3.0 # days (compute every delta) - abortion_olivier.enabled = sometime - # never : no abortion, - # always : always abort, - # sometime : abort according to abortion_olivier.abo - # and abortion_olivier.dip - - ### Days in pregnancy (dip) cutoffs (to cut gestation in early embryo, late embryo and fetal stages) - # Default intervals: Early embryo [0;17] Late embryo [17;64] Fetal [64;+inf] - abortion_olivier.dip = vector constant 17 ; constant 64 - - ### Daily probability of abortion for each intervals - # Default probabiliies : E: 0.0230 L: 0.0096 F: 0.0004 - abortion_olivier.abo = vector constant 0.02 ; constant 0.005 ; constant 0.0004 - - ### GARUNS & RPM_lite Genetic Scaling Parameters - # Random values - garuns_olivier.WM = norm99 450 50 #450 ± 25 - garuns_olivier.khi_M = norm99 0.30 0.06 # 0.33 ± 0.03 - garuns_olivier.b0 = norm99 1.6 0 # 1.6 ± 0.16 - garuns_olivier.nu_X = norm99 1 0 # 1.0 ± 0.10 - garuns_olivier.nu_Y = norm99 1.1 0.1 # 1.0 ± 0.10 - garuns_olivier.nu_F = norm99 1 0 # 1.0 ± 0.02 - garuns_olivier.nu_P = norm99 1 0 # 1.0 ± 0.02 - garuns_olivier.eD_star = norm99 10.7 0 # 10.7 ± 0.5 - garuns_olivier.NDF_star = norm99 0.5 0 # 0.5 ± 0.02 - rpm_lite.nu_B = norm99 1.7 0.07 # 1.7 ± 0.07 - rpm_lite.nu_Z = norm99 1 0.02 # 1.0 ± 0.02 - rpm_lite.nu_I = norm99 0.025 0.007 # 0.026 ± 0.007 -} - -################################################################################################################# -#====== Breeding # -################################################################################################################# - -#______ Bull semen: quality = 0.95 ± 0.05 ; sexratio = 0 % female - -breed{ - breed = bull_default -} - -init_bull{ - name=semen_default - bull.breed_name = bull_default - bull.semens_quality = norm99 0.95 0.05 # a number between 0.0 (=never works) and 1.0 (=perfect) - bull.female_ratio = constant 0 # offspring sex ratio. 1.0 = 100%female, 0.0=0%female -} - -#_______Breeding season: every year from *-03-21 00:00:00 to *-06-21 23:59:59 - -condition{ - type = chron_range - name = breeding_season - from = *-03-21 00:00:00 #*-03-21 00:00:00 - to = *-06-21 23:59:59 #*-06-21 23:59:59 -} - -trigger{ - type = chron - name = breeding_start - scheme = *-03-21 00:00:00 -} - -# link{ -# trigger = breeding_start -# action = log_db Start_breeding_season -#} - -trigger{ - type = chron - name = breeding_end - scheme = *-06-21 23:59:59 -} - -#link{ -# trigger = breeding_end -# action = log_db Stop_breeding_season -#} - -#______ Estrous detection method ________________________________________________________________________________ - -estrous_detection_method{ - name=estrous_detection_default - - #When do we observe oestruses - time_slice = 06:00:00 18:00:00 #00:00:01 23:59:59 - - #estrogene is transformed to an expression using a Hill function - expression_threshold=0.75 #default 0.75 - expression_stiffness=7 #default 7 - - - #the oestrus worth an insemination if the memory function is above this threshold - #THIS threshold is scaled for an observation all the day long - #if you observe half a day multiply this threshold by 0.5 - #1.0 is a reasonable base value for all day observations - detection_threshold=0.05 # 0.1 - - #then, the oestrus is truely detected with a chance of - sensitivity = 0.75 #0.7 - - #then an average of wrong_oestrus_per_day are generated - wrong_oestrus_per_day = 0 #0.00 -} - - -#______ Insemination _________________________________________________________________________________ - -# Insemination is performed once a day when estrous is detected - -state{ - state = ALREADY_INSEMINATED -} - -trigger{ - type=custom - name=tr_delete_ALREADY_INSEMINATED -} - -link{ - trigger = tr_delete_ALREADY_INSEMINATED - action = state_delete ALREADY_INSEMINATED -} - -link{ - trigger = estrous - condition = is_in BREEDING - condition = not is_pregnant - condition = not is_in ALREADY_INSEMINATED - action = state_add ALREADY_INSEMINATED - action = trigger_later tr_delete_ALREADY_INSEMINATED 1 - action = log_db 01_INSEMINATION - action = inseminate semen_default -} - -################################################################################################################# -#====== Initialization of herd # -################################################################################################################# - -trigger{ - type = custom - name = init_day_01 -} -trigger{ - type = custom - name = init_day_02 -} -trigger{ - type = custom - name = init_day_03 -} -trigger{ - type = custom - name = init_day_04 -} -trigger{ - type = custom - name = init_day_05 -} -trigger{ - type = custom - name = init_day_06 -} -trigger{ - type = custom - name = init_day_07 -} -trigger{ - type = custom - name = init_day_08 -} -trigger{ - type = custom - name = init_day_09 -} -trigger{ - type = custom - name = init_day_10 -} -trigger{ - type = custom - name = init_day_11 -} -trigger{ - type = custom - name = init_day_12 -} -trigger{ - type = custom - name = init_day_13 -} -trigger{ - type = custom - name = init_day_14 -} -trigger{ - type = custom - name = init_day_15 -} -trigger{ - type = custom - name = init_day_16 -} -trigger{ - type = custom - name = init_day_17 -} -trigger{ - type = custom - name = init_day_18 -} -trigger{ - type = custom - name = init_day_19 -} -trigger{ - type = custom - name = init_day_20 -} -trigger{ - type = custom - name = init_day_21 -} -trigger{ - type = custom - name = init_day_22 -} -trigger{ - type = custom - name = init_day_23 -} -trigger{ - type = custom - name = init_day_24 -} -trigger{ - type = custom - name = init_day_25 -} -trigger{ - type = custom - name = init_day_26 -} -trigger{ - type = custom - name = init_day_27 -} -trigger{ - type = custom - name = init_day_28 -} -trigger{ - type = custom - name = init_day_29 -} -trigger{ - type = custom - name = init_day_30 -} -trigger{ - type = custom - name = init_day_31 -} -trigger{ - type = custom - name = init_day_32 -} -trigger{ - type = custom - name = init_day_33 -} -trigger{ - type = custom - name = init_day_34 -} -trigger{ - type = custom - name = init_day_35 -} -trigger{ - type = custom - name = init_day_36 -} -trigger{ - type = custom - name = init_day_37 -} -trigger{ - type = custom - name = init_day_38 -} -trigger{ - type = custom - name = init_day_39 -} -trigger{ - type = custom - name = init_day_40 -} -trigger{ - type = custom - name = init_day_41 -} -trigger{ - type = custom - name = init_day_42 -} -trigger{ - type = custom - name = init_day_43 -} -trigger{ - type = custom - name = init_day_44 -} -trigger{ - type = custom - name = init_day_45 -} -trigger{ - type = custom - name = init_day_46 -} -trigger{ - type = custom - name = init_day_47 -} -trigger{ - type = custom - name = init_day_48 -} -trigger{ - type = custom - name = init_day_49 -} -trigger{ - type = custom - name = init_day_50 -} -trigger{ - type = custom - name = init_day_51 -} -trigger{ - type = custom - name = init_day_52 -} -trigger{ - type = custom - name = init_day_53 -} -trigger{ - type = custom - name = init_day_54 -} -trigger{ - type = custom - name = init_day_55 -} -trigger{ - type = custom - name = init_day_56 -} -trigger{ - type = custom - name = init_day_57 -} -trigger{ - type = custom - name = init_day_58 -} -trigger{ - type = custom - name = init_day_59 -} - -link{ - trigger = init - action = buy_calf cow_random 1 - action = log_db BUY_CALF_N=1 - action = trigger_later init_day_01 1 -} -link{ - trigger = init_day_01 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_02 1 -} -link{ - trigger = init_day_02 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_03 1 -} -link{ - trigger = init_day_03 - action = buy_calf cow_random 8 - action = log_db BUY_CALF_N=8 - action = trigger_later init_day_04 1 -} -link{ - trigger = init_day_04 - action = buy_calf cow_random 8 - action = log_db BUY_CALF_N=8 - action = trigger_later init_day_05 1 -} -link{ - trigger = init_day_05 - action = buy_calf cow_random 4 - action = log_db BUY_CALF_N=4 - action = trigger_later init_day_06 1 -} -link{ - trigger = init_day_06 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_07 1 -} -link{ - trigger = init_day_07 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_08 1 -} -link{ - trigger = init_day_08 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_09 1 -} -link{ - trigger = init_day_09 - action = buy_calf cow_random 4 - action = log_db BUY_CALF_N=4 - action = trigger_later init_day_10 1 -} -link{ - trigger = init_day_10 - action = buy_calf cow_random 4 - action = log_db BUY_CALF_N=4 - action = trigger_later init_day_11 1 -} -link{ - trigger = init_day_11 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_12 1 -} -link{ - trigger = init_day_12 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_13 1 -} -link{ - trigger = init_day_13 - action = buy_calf cow_random 4 - action = log_db BUY_CALF_N=4 - action = trigger_later init_day_14 1 -} -link{ - trigger = init_day_14 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_15 1 -} -link{ - trigger = init_day_15 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_16 1 -} -link{ - trigger = init_day_16 - action = buy_calf cow_random 4 - action = log_db BUY_CALF_N=4 - action = trigger_later init_day_17 1 -} -link{ - trigger = init_day_17 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_18 1 -} -link{ - trigger = init_day_18 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_19 1 -} -link{ - trigger = init_day_19 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_20 1 -} -link{ - trigger = init_day_20 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_21 1 -} -link{ - trigger = init_day_21 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_22 1 -} -link{ - trigger = init_day_22 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_23 1 -} -link{ - trigger = init_day_23 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_24 1 -} -link{ - trigger = init_day_24 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_25 1 -} -link{ - trigger = init_day_25 - action = buy_calf cow_random 4 - action = log_db BUY_CALF_N=4 - action = trigger_later init_day_26 1 -} -link{ - trigger = init_day_26 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_27 1 -} -link{ - trigger = init_day_27 - action = buy_calf cow_random 12 - action = log_db BUY_CALF_N=12 - action = trigger_later init_day_28 1 -} -link{ - trigger = init_day_28 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_29 1 -} -link{ - trigger = init_day_29 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_30 1 -} -link{ - trigger = init_day_30 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_31 1 -} -link{ - trigger = init_day_31 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_32 1 -} -link{ - trigger = init_day_32 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_33 1 -} -link{ - trigger = init_day_33 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_34 1 -} -link{ - trigger = init_day_34 - action = buy_calf cow_random 4 - action = log_db BUY_CALF_N=4 - action = trigger_later init_day_35 1 -} -link{ - trigger = init_day_35 - action = buy_calf cow_random 4 - action = log_db BUY_CALF_N=4 - action = trigger_later init_day_36 1 -} -link{ - trigger = init_day_36 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_37 1 -} -link{ - trigger = init_day_37 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_38 1 -} -link{ - trigger = init_day_38 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_39 1 -} -link{ - trigger = init_day_39 - action = buy_calf cow_random 4 - action = log_db BUY_CALF_N=4 - action = trigger_later init_day_40 1 -} -link{ - trigger = init_day_40 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_41 1 -} -link{ - trigger = init_day_41 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_42 1 -} -link{ - trigger = init_day_42 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_43 1 -} -link{ - trigger = init_day_43 - action = buy_calf cow_random 4 - action = log_db BUY_CALF_N=4 - action = trigger_later init_day_44 1 -} -link{ - trigger = init_day_44 - action = buy_calf cow_random 4 - action = log_db BUY_CALF_N=4 - action = trigger_later init_day_45 1 -} -link{ - trigger = init_day_45 - action = buy_calf cow_random 4 - action = log_db BUY_CALF_N=4 - action = trigger_later init_day_46 1 -} -link{ - trigger = init_day_46 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_47 1 -} -link{ - trigger = init_day_47 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_48 1 -} -link{ - trigger = init_day_48 - action = buy_calf cow_random 4 - action = log_db BUY_CALF_N=4 - action = trigger_later init_day_49 1 -} -link{ - trigger = init_day_49 - action = buy_calf cow_random 4 - action = log_db BUY_CALF_N=4 - action = trigger_later init_day_50 1 -} -link{ - trigger = init_day_50 - action = buy_calf cow_random 4 - action = log_db BUY_CALF_N=4 - action = trigger_later init_day_51 1 -} -link{ - trigger = init_day_51 - action = buy_calf cow_random 8 - action = log_db BUY_CALF_N=8 - action = trigger_later init_day_52 1 -} -link{ - trigger = init_day_52 - action = buy_calf cow_random 4 - action = log_db BUY_CALF_N=4 - action = trigger_later init_day_53 1 -} -link{ - trigger = init_day_53 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_54 1 -} -link{ - trigger = init_day_54 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_55 1 -} -link{ - trigger = init_day_55 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_56 1 -} -link{ - trigger = init_day_56 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_57 1 -} -link{ - trigger = init_day_57 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_58 1 -} -link{ - trigger = init_day_58 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_59 1 -} -link{ - trigger = init_day_59 - action = buy_calf cow_random 25 - action = log_db BUY_CALF_N=25 -} - -################################################################################################################# -#====== Management of herd # -################################################################################################################# - -#_______Predefined states : herd, heifers & mature ______________________________________________________________ -# -# herd : Every animal that enters the herd is added to this state. Male calves are never added. -# heifers : Newborn female calves enter the herd as heifers, and are moved to not_heifers at 1st calving. -# mature : Cows enter mature state when non-labile body mass W > 0.5 WM (GSP for mature format). - - -################################################################################################################# -#====== Remove cows @ end of simulation # -################################################################################################################# - -trigger{ - type = chron - name = tr_end_simu - scheme = 1985-12-31 23:59:58 -} - -link{ - trigger = tr_end_simu - action = log_db action_remove_herd - action = remove_herd -} - -action{ - type = broadcast_now - name = remove_herd - trigger = tr_remove_herd -} - -trigger{ - type = custom - name = tr_remove_herd -} - -link{ - trigger = tr_remove_herd - action = log_db delete_cow - action = delete_cow -} - -################################################################################################################# -#====== Rearing # -################################################################################################################# - -#_______CALF: heifers of age < 100 days - -state{ - state = CALF -} - -link{ - trigger = enter heifers - condition = age < 100 - # action = log_db heifers_to_CALF - action = state_move heifers CALF -} - -link{ - trigger = calving - condition = state_size CALF > 333 - action = log_db REMOVE_CALF_to_limit_size - action = delete_calf - } - -#_______HEIFER: heifers of age >= 100 days - -state{ - state = HEIFER -} - -link{ - trigger = enter heifers - condition = age >= 100 - # action = log_db heifers_to_HEIFER - action = state_move heifers HEIFER -} - -link{ - trigger = every_day - condition = age >= 100 - condition = is_in CALF - # action = log_db CALF_to_HEIFER_@WEANING - action = state_move CALF HEIFER -} - - -################################################################################################################# -#====== Reproduction # -################################################################################################################# - -#_______CYCLING: non-pregnant heifers at 1st ovulation or postabortive/postpartum recycling cows _____________ - -state{ - state = CYCLING -} - -link{ - trigger = ovulation - condition = is_in HEIFER - # action = log_db HEIFER_to_CYCLING_@PUBERTY - action = log_db 00_PUBERTY - action = state_move HEIFER CYCLING -} - -link{ - trigger = ovulation - action = log_db 00_OVULATION -} - -#_______BREEDING: cycling heifers and cows during breeding season ______________________________________________ - -state{ - state = BREEDING -} - -#During breeding season, not TO_CULL and CYCLING cows are moved to BREEDING -link{ - trigger = every_day - condition = breeding_season - condition = not is_in TO_CULL - condition = is_in CYCLING - condition = is_in mature - # action = log_db CYCLING_to_BREEDING - action = state_move CYCLING BREEDING -} - -link{ - trigger = enter BREEDING - # action = log_db Start_estrous_detection - action = estrous_start estrous_detection_default -} - -link{ - trigger = every_day - condition = not breeding_season - condition = is_in BREEDING - # action = log_db BREEDING_to_CYCLING - action = state_move BREEDING CYCLING -} - -link{ - trigger = quit BREEDING - # action = log_db Stop_estrous_detection - action = estrous_stop -} - - -#_______PREGNANT: at conception _________________________________________________________________________________ - -state{ - state = PREGNANT -} - -link{ - trigger = conception - action = log_db 02_CONCEPTION - action = state_move BREEDING PREGNANT -} - -#_______POST-ABORTIVE: triggered at abortion ____________________________________________________________________ - -state{ - state = POST-ABORTIVE -} - -link{ - trigger = abortion - condition = days_after_conception <= 17 - action = log_db 03_EARLY_EMBRYO_DEATH - action = state_move PREGNANT CYCLING -} - -link{ - trigger = abortion - condition = days_after_conception > 17 - condition = days_after_conception <= 64 - action = log_db 04_LATE_EMBRYO_DEATH - action = state_move PREGNANT CYCLING -} - -trigger{ - type = custom - name = post_abortive_recycling -} - -#Abortions after ] 64 - 210 days] days in pregnancy are managed with a voluntary period of 40 days -link{ - trigger = abortion - condition = days_after_conception > 64 - condition = days_after_conception <= 210 - action = log_db 05_FETAL_DEATH - action = state_move PREGNANT POST-ABORTIVE - action = trigger_later post_abortive_recycling 40 -} - -link{ - trigger = post_abortive_recycling - # action = log_db POST-ABORTIVE_to_CYCLING - action = state_move POST-ABORTIVE CYCLING -} - -#Abortions after 210 days in pregnancy are managed by culling -link{ - trigger = abortion - condition = days_after_conception > 210 - action = log_db 05_FETAL_DEATH - action = log_db TO_CULL_from_PREGNANT_after_late_fetal_death - action = state_move PREGNANT TO_CULL -} - - -#_______POSTPARTAL: triggered at parturition ____________________________________________________________________ - -state{ - state = POSTPARTAL -} - -trigger{ - type = custom - name = postpartal_recycling -} - -link{ - trigger = parturition - action = log_db 06_PARTURITION - # action = log_db PREGNANT_to_POSTPARTAL - action = state_move PREGNANT POSTPARTAL - action = trigger_later postpartal_recycling 40 - action = log_db start_milking - action = start_milking - } - -link{ - trigger = postpartal_recycling - # action = log_db POSTPARTAL_to_CYCLING - action = state_move POSTPARTAL CYCLING -} - -################################################################################################################# -#====== Drying-off # -################################################################################################################# - -#_______EXTENDED_LACTATION: CYCLING and is_milking after 305 days after calving - -state{ - state = EXTENDED_LACTATION -} - -link{ - trigger = every_day - condition = is_milking - condition = not is_in PREGNANT - condition = not is_in EXTENDED_LACTATION - condition = days_after_calving >= 305 - # action = log_db Extended lactation - action = state_add EXTENDED_LACTATION -} - -#stop 300 days_after_calving if milk_yield <= 5 kg/d and not in EXTENDED_LACTATION -link{ - trigger = every_day - condition = is_milking - condition = not is_in EXTENDED_LACTATION - condition = days_after_calving >= 300 - condition = milk_yield <= 5 - action = log_db stop_milking - action = stop_milking -} - -#stop 300 days_after_calving if milk_yield <= 5 kg/d and in EXTENDED_LACTATION -link{ - trigger = every_day - condition = is_milking - condition = is_in EXTENDED_LACTATION - condition = days_after_calving >= 300 - condition = milk_yield <= 5 - action = log_db stop_milking_extended - action = stop_milking -} - -#stop 300 days_after_calving and 219 days_in_pregnancy -link{ - trigger = every_day - condition = is_milking - condition = is_pregnant - condition = days_after_calving >= 300 - condition = days_in_pregnancy >= 219 - action = log_db stop_milking_pregnant - action = stop_milking -} - -link{ - trigger = stop_milking - trigger = enter PREGNANT - condition = is_in EXTENDED_LACTATION - action = state_delete EXTENDED_LACTATION -} - -################################################################################################################# -#====== Culling # -################################################################################################################# - -#_______TO_CULL: ____________________________________________________________________ - -state{ - state = TO_CULL -} - -#______culling not pregnant nulliparous at age > 800 days -link{ - trigger = every_day - condition = is_in CYCLING - condition = not is_in PREGNANT - condition = parity = 0 - condition = age > 800 - action = log_db TO_CULL_from_CYCLING_because_too_old_heifer - action = state_move CYCLING TO_CULL -} - - -#______culling not pregnant 320 days_after_calving -link{ - trigger = every_day - condition = days_after_calving > 320 - condition = is_in CYCLING - action = log_db TO_CULL_from_CYCLING_because_too_late_after_calving - action = state_move CYCLING TO_CULL -} - -#______culling not pregnant after 7 insemination -link{ - trigger = every_day - condition = is_in BREEDING - condition = not is_in ALREADY_INSEMINATED - condition = parity > 0 - condition = num_insemination_lactation >= 7 - action = log_db TO_CULL_from_BREEDING_max_nb_ins - action = state_move BREEDING TO_CULL -} - -link{ - trigger = enter PREGNANT - condition = is_in TO_CULL - action = state_move TO_CULL PREGNANT -} - - -#______culling oldest cow - -link{ - trigger = culling_day - condition = state_size TO_CULL = 999999 - condition = state_size PREGNANT > 666 - #individual conditions, like not is_milking cannot be mixed wirh herd level triggers - action = log_db Seek_for_oldest_to_cull - action = cull_oldest -} - -trigger{ - type = custom - name = tr_cull_oldest -} - -action{ - type = broadcast_now - name = cull_oldest - condition = not is_pregnant - condition = not is_milking - condition = not is_in HEIFER - condition = not is_in CALF - sortby = age - reverse = yes - limit = 1 - trigger = tr_cull_oldest -} - -link{ - trigger = tr_cull_oldest - action = log_db remove_oldest - action = delete_cow -} - - -#______remove cows TO_CULL once a month on day 15th - -trigger{ - type = custom - name = tr_remove_cows_to_cull -} - -link{ - trigger = tr_remove_cows_to_cull - condition = is_in TO_CULL - condition = not is_milking - condition = not is_pregnant - action = log_db Remove - action = delete_cow -} - -trigger{ - type = chron - name = culling_day - scheme = *-*-15 14:00:00 -} - -action{ - type = broadcast_now - name = broadcast_TO_CULL - condition = is_in TO_CULL - trigger = tr_remove_cows_to_cull -} - -link{ - trigger = culling_day - action = broadcast_TO_CULL -} - - -################################################################################################################# -#====== Feeding # -################################################################################################################# -#______optimal feeding for 999 - -state{ - state = CONTROL -} - -link{ - trigger = enter herd - condition = state_size herd <= 999 #nb_control 0 - 999 - action = change_food optimal - action = state_add CONTROL #Cows are fed on optimal diet as a control -} - -#______Default feeding rules - -#################### > at birth: on calf diet -link{ - trigger = enter CALF - condition = not is_in CONTROL - action = change_food calf_diet -} - -#################### > at weaning: on heifer diet -link{ - trigger = enter HEIFER - condition = not is_in CONTROL - action = change_food heifer_diet -} - -#################### > at parturition: on lactation diet -link{ - trigger = parturition - condition = not is_in CONTROL - action = change_food lactation_diet -} - - -#################### > at drying-off: on drycow_diet -link{ - trigger = stop_milking - condition = not is_in CONTROL - action = change_food drycow_diet -} - -#################### > OUTDOOR: on pasture diet -trigger{ - type = chron - name = outdoor - scheme = *-04-01 00:00:00 -} - -link{ - trigger = outdoor - action = broadcast_outdoor -} - -action{ - type = broadcast_now - name = broadcast_outdoor - trigger = outdoor_feeding -} - -trigger{ - type = custom - name = outdoor_feeding -} - -link{ - trigger = outdoor_feeding - condition = not is_in CALF - condition = not is_in CONTROL - action = change_food pasture_diet -} - - -#################### > INDOOR: back to diet according to state -trigger{ - type = chron - name = indoor - scheme = *-10-01 00:00:00 -} - -link{ - trigger = indoor - action = broadcast_indoor -} - -action{ - type = broadcast_now - name = broadcast_indoor - trigger = indoor_feeding -} - -trigger{ - type = custom - name = indoor_feeding -} - -link{ - trigger = indoor_feeding - condition = is_in HEIFER - condition = not is_in CONTROL - action = change_food heifer_diet -} - -link{ - trigger = indoor_feeding - condition = is_in CYCLING - condition = not is_in CONTROL - action = change_food heifer_diet -} - -link{ - trigger = indoor_feeding - condition = is_in BREEDING - condition = not is_milking - condition = not is_in CONTROL - action = change_food heifer_diet -} - -link{ - trigger = indoor_feeding - condition = not is_in BREEDING - condition = not is_milking - condition = not is_in CONTROL - action = change_food drycow_diet -} - -link{ - trigger = indoor_feeding - condition = is_milking - condition = not is_in CONTROL - action = change_food lactation_diet -} - - - - -################################################################################################################# -#====== Generic stuff # -################################################################################################################# - -trigger{ - type = chron - name = every_day_herd - scheme = *-*-* 12:00:00 -} - -trigger{ - type = custom - name = every_day -} - -link{ - trigger = every_day_herd - action = broadcast_now every_day -} - -trigger{ - type = custom - name = first_day_sub -} - -trigger{ - type = custom - name = first_day -} - -link{ - trigger = init - action = trigger_later first_day_sub 0.001 -} -link{ - trigger = first_day_sub - action = broadcast_now first_day -} - -################################################################################################################# -#====== Log # -################################################################################################################# - -log{ - - #farmer level - insemination = yes - change_food = yes - - #herd level - conception = yes - parturition = yes - death = yes - estrous_observed = yes - estrous_missed = yes - estrous_environment= yes - insemination_result= yes - mature = yes - ovulation = yes - new_cow = yes - delete_cow = yes - abortion = yes - - #cow level - animal_performance = no -} - -################################################################################################################# -#====== Log states # -################################################################################################################# - -action{ - type = genericlog_herd - - name = log_states - log_type = file - file_path = states.txt - sep_col = \t - file_line_flush=no - - #sqlite_path = states.sqlite - #sqlite_table = states - - - #--- from cow and simulator --- - column{ - value = time - name = time - sqlite_type = numeric - } - - column{ - value = state.CONTROL - name = CONTROL - sqlite_type = numeric - } - - column{ - value = state.CALF - name = CALF - sqlite_type = numeric - } - - column{ - value = state.HEIFER - name = HEIFER - sqlite_type = numeric - } - - column{ - value = state.CYCLING - name = CYCLING - sqlite_type = numeric - } - - column{ - value = state.BREEDING - name = BREEDING - sqlite_type = numeric - } - - column{ - value = state.PREGNANT - name = PREGNANT - sqlite_type = numeric - } - - column{ - value = state.POST-ABORTIVE - name = POST-ABORTIVE - sqlite_type = numeric - } - - column{ - value = state.POSTPARTAL - name = POSTPARTAL - sqlite_type = numeric - } - - column{ - value = state.EXTENDED_LACTATION - name = EXTENDED_LACTATION - sqlite_type = numeric - } - - column{ - value = state.TO_CULL - name = TO_CULL - sqlite_type = numeric - } - - - # column{ - # value = state.not.mature - # name = not_mature - # sqlite_type = numeric - # } - -} - -link{ - trigger = every_day_herd - action = log_states -} - - - -###s######## Default diets - -feed{ - name = calf_diet - type = mix - - feed = CPL.MLK - proportion = 1.00 -} - -feed{ - name = heifer_diet - type = mix - - feed = FO.STR - proportion = 0.02 - feed = FO.HAP - proportion = 0.60 - feed = FO.GSI - proportion = 0.32 - feed = CO.CER - proportion = 0.05 - feed = CPL.CMV - proportion = 0.01 -} - -feed{ - name = lactation_diet - type = mix - - feed = FO.STR - proportion = 0.01 - feed = FO.HAP - proportion = 0.03 - feed = FO.GSI - proportion = 0.04 - feed = FO.CSI - proportion = 0.70 - feed = CO.CER - proportion = 0.05 - feed = CO.OSC - proportion = 0.13 - feed = CO.ROO - proportion = 0.03 - feed = CPL.CMV - proportion = 0.01 -} - -feed{ - name = drycow_diet - type = mix - - feed = FO.STR - proportion = 0.02 - feed = FO.HAP - proportion = 0.68 - feed = FO.CSI - proportion = 0.08 - feed = CO.CER - proportion = 0.05 - feed = CO.OSC - proportion = 0.13 - feed = CO.ROO - proportion = 0.03 - feed = CPL.CMV - proportion = 0.01 -} - -feed{ - name = pasture_diet - type = mix - - feed = FO.FGX - proportion = 0.778 - feed = CO.CER - proportion = 0.050 - feed = CO.OSC - proportion = 0.130 - feed = CO.TUB - proportion = 0.002 - feed = CO.ROO - proportion = 0.030 - feed = CPL.CMV - proportion = 0.010 -} - - - - - -######################################################## -# # -#List of available feed (derived from INRA tables) # -# # -######################################################## - -########### FORAGES #################################### -# FO.STR Straw -# FO.STN Straw treated with ammonia -# FO.MSH Maize stover & husks -# FO.HAL Legume hay -# FO.HAG Gramineae hay -# FO.HAP Permanent grassland hay -# FO.DHA Dehydrated alfalfa -# FO.DHF Dehydrated forage -# FO.FGC Fresh cereal grass -# FO.FGO Fresh oleaginous grass -# FO.FGG Fresh gramineae grass -# FO.FGX Fresh mixed grass (meadow) -# FO.FGL Fresh legume grass -# FO.GSI50 Grass silage > 50% DM -# FO.GSI Grass silage -# FO.CSI Corn silage -# FO.FPF Faba & pea forage -# FO.VEG Vegetable fodder - -########### CONCENTRATES ############################### -# CO.CER Cereal seed & by-products -# CO.OSC5 Oilseed cake <5% oil -# CO.OSC Oilseed cake -# CO.TUB Starchy tubers -# CO.ROO Vegetable roots -# CO.FPB Faba & pea bean -# CO.LUP Lupin -# CO.SDO Oilseed - -########### COMPLEMENTS ################################ -# CPL.CMV Compl. Minerals & Vitamins -# CPL.AMA Amino acids -# CPL.URE Urea -# CPL.MOL Molasses -# CPL.PLP Beet pulp -# CPL.MLK Milk -# CPL.OIL Oil - - -feed{ # Straw - # Type of feed: FORAGE - # Maximum incorporation in diet: 80 %FM - # Representative INRA feed: FP0090 Oat straw - name = FO.STR - type = ingredient - feed_eD = 5.9512 # MJ_ME/kg_DM - feed_DMC = 0.8825 # kg_DM/kg_FM - feed_OM = 0.9100 # kg/kg_DM - feed_OMd = 0.4500 # % - feed_CP = 0.0360 # kg/kg_DM - feed_CPd = 0.0296 # % - feed_NDF = 0.7910 # kg/kg_DM - feed_ST = 0.0000 # kg/kg_DM - feed_STd = 0.0000 # % - feed_EE = 0.0150 # kg/kg_DM -} -feed{ # Straw treated with ammonia - # Type of feed: FORAGE - # Maximum incorporation in diet: 80 %FM - # Representative INRA feed: FP0080 Barley straw, NH3-treated 5%DM - name = FO.STN - type = ingredient - feed_eD = 7.6484 # MJ_ME/kg_DM - feed_DMC = 0.8867 # kg_DM/kg_FM - feed_OM = 0.8970 # kg/kg_DM - feed_OMd = 0.5567 # % - feed_CP = 0.1000 # kg/kg_DM - feed_CPd = 0.3933 # % - feed_NDF = 0.7603 # kg/kg_DM - feed_ST = 0.0000 # kg/kg_DM - feed_STd = 0.0000 # % - feed_EE = 0.0150 # kg/kg_DM -} -feed{ # Maize stover & husks - # Type of feed: FORAGE - # Maximum incorporation in diet: 80 %FM - # Representative INRA feed: FP0180 Maize stover, ensiled - name = FO.MSH - type = ingredient - feed_eD = 8.5847 # MJ_ME/kg_DM - feed_DMC = 0.5022 # kg_DM/kg_FM - feed_OM = 0.9332 # kg/kg_DM - feed_OMd = 0.6220 # % - feed_CP = 0.0888 # kg/kg_DM - feed_CPd = 0.3432 # % - feed_NDF = 0.6580 # kg/kg_DM - feed_ST = 0.0000 # kg/kg_DM - feed_STd = 0.0000 # % - feed_EE = 0.0150 # kg/kg_DM -} -feed{ # Legume hay - # Type of feed: FORAGE - # Maximum incorporation in diet: 100 %FM - # Representative INRA feed: FF3370 Lucerne hay - name = FO.HAL - type = ingredient - feed_eD = 8.4626 # MJ_ME/kg_DM - feed_DMC = 0.8500 # kg_DM/kg_FM - feed_OM = 0.8956 # kg/kg_DM - feed_OMd = 0.5987 # % - feed_CP = 0.1791 # kg/kg_DM - feed_CPd = 0.6818 # % - feed_NDF = 0.5326 # kg/kg_DM - feed_ST = 0.0000 # kg/kg_DM - feed_STd = 0.0000 # % - feed_EE = 0.0259 # kg/kg_DM -} -feed{ # Gramineae hay - # Type of feed: FORAGE - # Maximum incorporation in diet: 100 %FM - # Representative INRA feed: FF1190 Italian ryegrass hay - name = FO.HAG - type = ingredient - feed_eD = 8.8553 # MJ_ME/kg_DM - feed_DMC = 0.8500 # kg_DM/kg_FM - feed_OM = 0.9011 # kg/kg_DM - feed_OMd = 0.6294 # % - feed_CP = 0.1169 # kg/kg_DM - feed_CPd = 0.5447 # % - feed_NDF = 0.6421 # kg/kg_DM - feed_ST = 0.0000 # kg/kg_DM - feed_STd = 0.0000 # % - feed_EE = 0.0300 # kg/kg_DM -} -feed{ # Permanent grassland hay - # Type of feed: FORAGE - # Maximum incorporation in diet: 100 %FM - # Representative INRA feed: FF0750 Mountain permanent grassland hay - name = FO.HAP - type = ingredient - feed_eD = 9.0294 # MJ_ME/kg_DM - feed_DMC = 0.8500 # kg_DM/kg_FM - feed_OM = 0.9133 # kg/kg_DM - feed_OMd = 0.6196 # % - feed_CP = 0.1270 # kg/kg_DM - feed_CPd = 0.5679 # % - feed_NDF = 0.6090 # kg/kg_DM - feed_ST = 0.0000 # kg/kg_DM - feed_STd = 0.0000 # % - feed_EE = 0.0223 # kg/kg_DM -} -feed{ # Dehydrated alfalfa - # Type of feed: FORAGE - # Maximum incorporation in diet: 60 %FM - # Representative INRA feed: CD0040 Dehydrated alfalfa - name = FO.DHA - type = ingredient - feed_eD = 9.2187 # MJ_ME/kg_DM - feed_DMC = 0.9070 # kg_DM/kg_FM - feed_OM = 0.8752 # kg/kg_DM - feed_OMd = 0.6317 # % - feed_CP = 0.2002 # kg/kg_DM - feed_CPd = 0.7017 # % - feed_NDF = 0.4375 # kg/kg_DM - feed_ST = 0.0297 # kg/kg_DM - feed_STd = 0.8200 # % - feed_EE = 0.0292 # kg/kg_DM -} -feed{ # Dehydrated forage - # Type of feed: FORAGE - # Maximum incorporation in diet: 60 %FM - # Representative INRA feed: CD0120 Dehydrated Italian ryegrass - name = FO.DHF - type = ingredient - feed_eD = 9.9954 # MJ_ME/kg_DM - feed_DMC = 0.9080 # kg_DM/kg_FM - feed_OM = 0.8898 # kg/kg_DM - feed_OMd = 0.7010 # % - feed_CP = 0.1436 # kg/kg_DM - feed_CPd = 0.6182 # % - feed_NDF = 0.5450 # kg/kg_DM - feed_ST = 0.0024 # kg/kg_DM - feed_STd = 0.1640 # % - feed_EE = 0.0268 # kg/kg_DM -} -feed{ # Fresh cereal grass - # Type of feed: FORAGE - # Maximum incorporation in diet: 100 %FM - # Representative INRA feed: FV2020 Fresh whole crop sorghum - name = FO.FGC - type = ingredient - feed_eD = 9.4748 # MJ_ME/kg_DM - feed_DMC = 0.2504 # kg_DM/kg_FM - feed_OM = 0.9148 # kg/kg_DM - feed_OMd = 0.6585 # % - feed_CP = 0.1044 # kg/kg_DM - feed_CPd = 0.6330 # % - feed_NDF = 0.5710 # kg/kg_DM - feed_ST = 0.0983 # kg/kg_DM - feed_STd = 0.8652 # % - feed_EE = 0.0304 # kg/kg_DM -} -feed{ # Fresh oleaginous grass - # Type of feed: FORAGE - # Maximum incorporation in diet: 100 %FM - # Representative INRA feed: FV2830 Fresh silphium - name = FO.FGO - type = ingredient - feed_eD = 9.8974 # MJ_ME/kg_DM - feed_DMC = 0.1170 # kg_DM/kg_FM - feed_OM = 0.8494 # kg/kg_DM - feed_OMd = 0.7323 # % - feed_CP = 0.1535 # kg/kg_DM - feed_CPd = 0.7491 # % - feed_NDF = 0.4212 # kg/kg_DM - feed_ST = 0.0000 # kg/kg_DM - feed_STd = 0.0000 # % - feed_EE = 0.0248 # kg/kg_DM -} -feed{ # Fresh gramineae grass - # Type of feed: FORAGE - # Maximum incorporation in diet: 100 %FM - # Representative INRA feed: FV0490 Fresh italian ryegrass - name = FO.FGG - type = ingredient - feed_eD = 10.2129 # MJ_ME/kg_DM - feed_DMC = 0.1885 # kg_DM/kg_FM - feed_OM = 0.8893 # kg/kg_DM - feed_OMd = 0.7150 # % - feed_CP = 0.1452 # kg/kg_DM - feed_CPd = 0.6756 # % - feed_NDF = 0.5690 # kg/kg_DM - feed_ST = 0.0000 # kg/kg_DM - feed_STd = 0.0000 # % - feed_EE = 0.0367 # kg/kg_DM -} -feed{ # Fresh mixed grass (meadow) - # Type of feed: FORAGE - # Maximum incorporation in diet: 100 %FM - # Representative INRA feed: FV0120 Fresh lowland grassland - name = FO.FGX - type = ingredient - feed_eD = 10.2424 # MJ_ME/kg_DM - feed_DMC = 0.1946 # kg_DM/kg_FM - feed_OM = 0.9057 # kg/kg_DM - feed_OMd = 0.6896 # % - feed_CP = 0.1444 # kg/kg_DM - feed_CPd = 0.6595 # % - feed_NDF = 0.5498 # kg/kg_DM - feed_ST = 0.0000 # kg/kg_DM - feed_STd = 0.0000 # % - feed_EE = 0.0265 # kg/kg_DM -} -feed{ # Fresh legume grass - # Type of feed: FORAGE - # Maximum incorporation in diet: 100 %FM - # Representative INRA feed: FV2370 Fresh red clover - name = FO.FGL - type = ingredient - feed_eD = 10.3243 # MJ_ME/kg_DM - feed_DMC = 0.1749 # kg_DM/kg_FM - feed_OM = 0.8844 # kg/kg_DM - feed_OMd = 0.7014 # % - feed_CP = 0.2046 # kg/kg_DM - feed_CPd = 0.7671 # % - feed_NDF = 0.4603 # kg/kg_DM - feed_ST = 0.0000 # kg/kg_DM - feed_STd = 0.0000 # % - feed_EE = 0.0287 # kg/kg_DM -} -feed{ # Grass silage > 50% DM - # Type of feed: FORAGE - # Maximum incorporation in diet: 100 %FM - # Representative INRA feed: FE2790 Wilted perennial ryegrass silage - name = FO.GSI50 - type = ingredient - feed_eD = 9.3078 # MJ_ME/kg_DM - feed_DMC = 0.5502 # kg_DM/kg_FM - feed_OM = 0.9056 # kg/kg_DM - feed_OMd = 0.6545 # % - feed_CP = 0.1351 # kg/kg_DM - feed_CPd = 0.6395 # % - feed_NDF = 0.5744 # kg/kg_DM - feed_ST = 0.0000 # kg/kg_DM - feed_STd = 0.0000 # % - feed_EE = 0.0337 # kg/kg_DM -} -feed{ # Grass silage - # Type of feed: FORAGE - # Maximum incorporation in diet: 100 %FM - # Representative INRA feed: FE2220 Perennial ryegrass silage - name = FO.GSI - type = ingredient - feed_eD = 10.3090 # MJ_ME/kg_DM - feed_DMC = 0.2234 # kg_DM/kg_FM - feed_OM = 0.8950 # kg/kg_DM - feed_OMd = 0.6952 # % - feed_CP = 0.1406 # kg/kg_DM - feed_CPd = 0.6469 # % - feed_NDF = 0.5425 # kg/kg_DM - feed_ST = 0.0000 # kg/kg_DM - feed_STd = 0.0000 # % - feed_EE = 0.0374 # kg/kg_DM -} -feed{ # Corn silage - # Type of feed: FORAGE - # Maximum incorporation in diet: 100 %FM - # Representative INRA feed: FE4710 Fine chop 30% DM corn silage - name = FO.CSI - type = ingredient - feed_eD = 10.6995 # MJ_ME/kg_DM - feed_DMC = 0.3109 # kg_DM/kg_FM - feed_OM = 0.9484 # kg/kg_DM - feed_OMd = 0.7061 # % - feed_CP = 0.0848 # kg/kg_DM - feed_CPd = 0.5300 # % - feed_NDF = 0.4415 # kg/kg_DM - feed_ST = 0.2754 # kg/kg_DM - feed_STd = 0.7660 # % - feed_EE = 0.0310 # kg/kg_DM -} -feed{ # Faba & pea forage - # Type of feed: FORAGE - # Maximum incorporation in diet: 100 %FM - # Representative INRA feed: FV2700 Fresh faba bean forage - name = FO.FPF - type = ingredient - feed_eD = 10.8203 # MJ_ME/kg_DM - feed_DMC = 0.2546 # kg_DM/kg_FM - feed_OM = 0.9115 # kg/kg_DM - feed_OMd = 0.7188 # % - feed_CP = 0.1578 # kg/kg_DM - feed_CPd = 0.7156 # % - feed_NDF = 0.4160 # kg/kg_DM - feed_ST = 0.0913 # kg/kg_DM - feed_STd = 0.7650 # % - feed_EE = 0.0288 # kg/kg_DM -} -feed{ # Vegetable fodder - # Type of feed: FORAGE - # Maximum incorporation in diet: 100 %FM - # Representative INRA feed: FV2840 Fresh kale - name = FO.VEG - type = ingredient - feed_eD = 12.0901 # MJ_ME/kg_DM - feed_DMC = 0.1348 # kg_DM/kg_FM - feed_OM = 0.8674 # kg/kg_DM - feed_OMd = 0.8260 # % - feed_CP = 0.1684 # kg/kg_DM - feed_CPd = 0.7794 # % - feed_NDF = 0.3382 # kg/kg_DM - feed_ST = 0.0000 # kg/kg_DM - feed_STd = 0.0000 # % - feed_EE = 0.0080 # kg/kg_DM -} -feed{ # Cereal seed & by-products - # Type of feed: CONCENTRATE - # Maximum incorporation in diet: 60 %FM - # Representative INRA feed: CS0160 Wheat middlings, starch 30-40% - name = CO.CER - type = ingredient - feed_eD = 12.3262 # MJ_ME/kg_DM - feed_DMC = 0.8835 # kg_DM/kg_FM - feed_OM = 0.9541 # kg/kg_DM - feed_OMd = 0.7712 # % - feed_CP = 0.1642 # kg/kg_DM - feed_CPd = 0.6629 # % - feed_NDF = 0.2909 # kg/kg_DM - feed_ST = 0.4008 # kg/kg_DM - feed_STd = 0.8041 # % - feed_EE = 0.0584 # kg/kg_DM -} -feed{ # Oilseed cake <5% oil - # Type of feed: CONCENTRATE - # Maximum incorporation in diet: 60 %FM - # Representative INRA feed: CX0050 Cottonseed meal, cr. fibre 15-20% - name = CO.OSC5 - type = ingredient - feed_eD = 12.0555 # MJ_ME/kg_DM - feed_DMC = 0.8907 # kg_DM/kg_FM - feed_OM = 0.9309 # kg/kg_DM - feed_OMd = 0.7747 # % - feed_CP = 0.4309 # kg/kg_DM - feed_CPd = 0.7740 # % - feed_NDF = 0.2931 # kg/kg_DM - feed_ST = 0.0527 # kg/kg_DM - feed_STd = 0.8200 # % - feed_EE = 0.0236 # kg/kg_DM -} -feed{ # Oilseed cake - # Type of feed: CONCENTRATE - # Maximum incorporation in diet: 60 %FM - # Representative INRA feed: CX0310 Sunflower meal, oil 5-20% - name = CO.OSC - type = ingredient - feed_eD = 12.6524 # MJ_ME/kg_DM - feed_DMC = 0.9207 # kg_DM/kg_FM - feed_OM = 0.9368 # kg/kg_DM - feed_OMd = 0.7350 # % - feed_CP = 0.3499 # kg/kg_DM - feed_CPd = 0.7570 # % - feed_NDF = 0.3477 # kg/kg_DM - feed_ST = 0.0444 # kg/kg_DM - feed_STd = 0.8200 # % - feed_EE = 0.1015 # kg/kg_DM -} -feed{ # Starchy tubers - # Type of feed: CONCENTRATE - # Maximum incorporation in diet: 60 %FM - # Representative INRA feed: CP0030 Cassava - name = CO.TUB - type = ingredient - feed_eD = 11.6622 # MJ_ME/kg_DM - feed_DMC = 0.6480 # kg_DM/kg_FM - feed_OM = 0.9510 # kg/kg_DM - feed_OMd = 0.8367 # % - feed_CP = 0.0750 # kg/kg_DM - feed_CPd = 0.4888 # % - feed_NDF = 0.1192 # kg/kg_DM - feed_ST = 0.6447 # kg/kg_DM - feed_STd = 0.7900 # % - feed_EE = 0.0062 # kg/kg_DM -} -feed{ # Vegetable roots - # Type of feed: CONCENTRATE - # Maximum incorporation in diet: 60 %FM - # Representative INRA feed: FR0040 Carrot - name = CO.ROO - type = ingredient - feed_eD = 12.8261 # MJ_ME/kg_DM - feed_DMC = 0.1568 # kg_DM/kg_FM - feed_OM = 0.9311 # kg/kg_DM - feed_OMd = 0.8900 # % - feed_CP = 0.0896 # kg/kg_DM - feed_CPd = 0.5710 # % - feed_NDF = 0.1295 # kg/kg_DM - feed_ST = 0.0050 # kg/kg_DM - feed_STd = 0.2000 # % - feed_EE = 0.0110 # kg/kg_DM -} -feed{ # Faba & pea bean - # Type of feed: CONCENTRATE - # Maximum incorporation in diet: 60 %FM - # Representative INRA feed: CN0060 Faba bean seeds - name = CO.FPB - type = ingredient - feed_eD = 13.6219 # MJ_ME/kg_DM - feed_DMC = 0.8721 # kg_DM/kg_FM - feed_OM = 0.9610 # kg/kg_DM - feed_OMd = 0.9057 # % - feed_CP = 0.2689 # kg/kg_DM - feed_CPd = 0.7843 # % - feed_NDF = 0.1550 # kg/kg_DM - feed_ST = 0.4601 # kg/kg_DM - feed_STd = 0.7586 # % - feed_EE = 0.0146 # kg/kg_DM -} -feed{ # Lupin - # Type of feed: CONCENTRATE - # Maximum incorporation in diet: 60 %FM - # Representative INRA feed: CN0130 White lupin seeds - name = CO.LUP - type = ingredient - feed_eD = 15.2995 # MJ_ME/kg_DM - feed_DMC = 0.8880 # kg_DM/kg_FM - feed_OM = 0.9617 # kg/kg_DM - feed_OMd = 0.8800 # % - feed_CP = 0.3657 # kg/kg_DM - feed_CPd = 0.8000 # % - feed_NDF = 0.2257 # kg/kg_DM - feed_ST = 0.0700 # kg/kg_DM - feed_STd = 0.8200 # % - feed_EE = 0.0850 # kg/kg_DM -} -feed{ # Oilseed - # Type of feed: CONCENTRATE - # Maximum incorporation in diet: 60 %FM - # Representative INRA feed: CN0110 Linseeds - name = CO.SDO - type = ingredient - feed_eD = 17.6063 # MJ_ME/kg_DM - feed_DMC = 0.9143 # kg_DM/kg_FM - feed_OM = 0.9539 # kg/kg_DM - feed_OMd = 0.7650 # % - feed_CP = 0.2647 # kg/kg_DM - feed_CPd = 0.7380 # % - feed_NDF = 0.2515 # kg/kg_DM - feed_ST = 0.0461 # kg/kg_DM - feed_STd = 0.8200 # % - feed_EE = 0.3208 # kg/kg_DM -} -feed{ # Compl. Minerals & Vitamins - # Type of feed: COMPLEMENT - # Maximum incorporation in diet: 5 %FM - # Representative INRA feed: MC0010 Crushed chalk - name = CPL.CMV - type = ingredient - feed_eD = 0.0000 # MJ_ME/kg_DM - feed_DMC = 0.9500 # kg_DM/kg_FM - feed_OM = 0.0000 # kg/kg_DM - feed_OMd = 0.0000 # % - feed_CP = 0.0000 # kg/kg_DM - feed_CPd = 0.0000 # % - feed_NDF = 0.0000 # kg/kg_DM - feed_ST = 0.0000 # kg/kg_DM - feed_STd = 0.0000 # % - feed_EE = 0.0000 # kg/kg_DM -} -feed{ # Amino acids - # Type of feed: COMPLEMENT - # Maximum incorporation in diet: 5 %FM - # Representative INRA feed: CAA020 L-threonin - name = CPL.AMA - type = ingredient - feed_eD = 0.0000 # MJ_ME/kg_DM - feed_DMC = 1.0000 # kg_DM/kg_FM - feed_OM = 0.9960 # kg/kg_DM - feed_OMd = 1.0000 # % - feed_CP = 0.7450 # kg/kg_DM - feed_CPd = 1.0000 # % - feed_NDF = 0.0000 # kg/kg_DM - feed_ST = 0.0000 # kg/kg_DM - feed_STd = 0.0000 # % - feed_EE = 0.0000 # kg/kg_DM -} -feed{ # Urea - # Type of feed: COMPLEMENT - # Maximum incorporation in diet: 5 %FM - # Representative INRA feed: CV0020 Urea - name = CPL.URE - type = ingredient - feed_eD = 3.3890 # MJ_ME/kg_DM - feed_DMC = 0.9940 # kg_DM/kg_FM - feed_OM = 1.0000 # kg/kg_DM - feed_OMd = 0.9900 # % - feed_CP = 2.8700 # kg/kg_DM - feed_CPd = 1.0000 # % - feed_NDF = 0.0000 # kg/kg_DM - feed_ST = 0.0000 # kg/kg_DM - feed_STd = 0.0000 # % - feed_EE = 0.0000 # kg/kg_DM -} -feed{ # Molasses - # Type of feed: COMPLEMENT - # Maximum incorporation in diet: 10 %FM - # Representative INRA feed: CP0170 Beet molasses - name = CPL.MOL - type = ingredient - feed_eD = 9.7906 # MJ_ME/kg_DM - feed_DMC = 0.7390 # kg_DM/kg_FM - feed_OM = 0.8660 # kg/kg_DM - feed_OMd = 0.8250 # % - feed_CP = 0.1000 # kg/kg_DM - feed_CPd = 0.5800 # % - feed_NDF = 0.0015 # kg/kg_DM - feed_ST = 0.0000 # kg/kg_DM - feed_STd = 0.0000 # % - feed_EE = 0.0070 # kg/kg_DM -} -feed{ # Beet pulp - # Type of feed: COMPLEMENT - # Maximum incorporation in diet: 10 %FM - # Representative INRA feed: CP0020 Pressed beet pulp - name = CPL.PLP - type = ingredient - feed_eD = 11.5046 # MJ_ME/kg_DM - feed_DMC = 0.4503 # kg_DM/kg_FM - feed_OM = 0.9243 # kg/kg_DM - feed_OMd = 0.8367 # % - feed_CP = 0.0913 # kg/kg_DM - feed_CPd = 0.6470 # % - feed_NDF = 0.4827 # kg/kg_DM - feed_ST = 0.0047 # kg/kg_DM - feed_STd = 0.5467 # % - feed_EE = 0.0097 # kg/kg_DM -} -feed{ # Milk - # Type of feed: COMPLEMENT - # Maximum incorporation in diet: 100 %FM - # Representative INRA feed: CL0020 Whole milk powder - name = CPL.MLK - type = ingredient - feed_eD = 18.8280 # MJ_ME/kg_DM - feed_DMC = 0.9600 # kg_DM/kg_FM - feed_OM = 0.9350 # kg/kg_DM - feed_OMd = 0.9400 # % - feed_CP = 0.2540 # kg/kg_DM - feed_CPd = 0.7800 # % - feed_NDF = 0.0000 # kg/kg_DM - feed_ST = 0.0000 # kg/kg_DM - feed_STd = 0.0000 # % - feed_EE = 0.2510 # kg/kg_DM -} -feed{ # Oil - # Type of feed: COMPLEMENT - # Maximum incorporation in diet: 5 %FM - # Representative INRA feed: CG0050 Soybean oil - name = CPL.OIL - type = ingredient - feed_eD = 36.6937 # MJ_ME/kg_DM - feed_DMC = 0.9980 # kg_DM/kg_FM - feed_OM = 0.9995 # kg/kg_DM - feed_OMd = 0.8900 # % - feed_CP = 0.0000 # kg/kg_DM - feed_CPd = 0.0000 # % - feed_NDF = 0.0000 # kg/kg_DM - feed_ST = 0.0000 # kg/kg_DM - feed_STd = 0.0000 # % - feed_EE = 0.9992 # kg/kg_DM -} - - -
--- a/test-data/input/example_02/explan.txt Wed May 28 08:37:22 2025 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2 +0,0 @@ -template_file sim_id end_year -farmer-pl.txt sim_1 1980
--- a/test-data/input/example_02/farmer-pl.txt Wed May 28 08:37:22 2025 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2354 +0,0 @@ -################################################################################################################# -# # -# InSiliCow: Farm Management # -# # -################################################################################################################# - -################################################################################################################# -#====== Preprocessor: specification of included files # -################################################################################################################# - -@include farmer-log.txt -# provides the action log_olivier -# call the action log_olivier every hour - -################################################################################################################# -#====== Initialization of simulation # -################################################################################################################# - -#______ Simulation time range - -init{ - begin_date = 1970-01-01 00:00:00 # 1970-01-01 00:00:00 - end_date = $end_year$-12-31 23:59:59 # 1975-02-20 23:59:59 - output_db = events.sqlite - name = $sim_id$ -} - -#______ Models - -param_general{ - garuns_type = garuns_olivier - rpm_type = rpm_lite - abortion_type = abortion_olivier -} - - -#______ Stoechio -stoechio{ - -} - -################################################################################################################# -#====== Genetic Scaling Parameters (GSP): defines individual cow performance # -# # -#======> in GARUNS model # -#GSP (unit) : Name Default | Proxy for # -#WM (Kg) : Mature non labile body mass 450 ± 25 | Format # -#khi_M (%) : Target labile:non-labile mass ratio 0.33 ± 0.03 | Body fatness # -#b0 (1/d) : Reserves storage rate 1.6 ± 0.16 | Reserve lability # -#nu_X (-) : Labile body mass mobilization index 1.0 ± 0.1 | Maternal investment # -#nu_Y (-) : Milk yield index 1.0 ± 0.1 | Milk potential # -#nu_F (-) : Milk fat secretion index 1.00 ± 0.02 | Milk fat content # -#nu_P (-) : Milk protein secretion index 1.00 ± 0.02 | Milk protein content # -#eD_star (MJ ME/Kg DM) : Optimal diet energy content 12.3 ± 0.5 | Energy intake capacity # -#NDF_star (Kg NDF/Kg DM): Optimal fiber energy content 0.5 ± 0.02 | Fiber intake capacity # -# # -#======> in RPM model # -#nu_I (-) : Conception probability threshold 0.026 ± 0.007 | Fertility # -#nu_B (-) : Puberty index 1.70 ± 0.07 | Age at 1st ovulation # -#nu_Z (-) : Follicular dynamics rate 1.00 ± 0.02 | Estrous duration # -################################################################################################################# - -################################################################################################################# -#====== Transmission of Genetic Scaling Parameters (GSP) # -# > genetic_sd defines the Mendelian sampling standard deviation for the calculation of the GSP of # -# a newborn calf : GSP_newborn ~ Normal [ (GSP_mother + GSP_father)/2 , GSP_sd ] # -################################################################################################################# - -genetic_sd{ - - garuns_olivier.WM{ - sd = 50 - min = 200 - max = 800 - } - - garuns_olivier.khi_M { - sd = 0.06 - min = 0.1 - max = 0.6 - } - - garuns_olivier.b0{ - sd = 0 - min = 0.80 - max = 2.40 - } - - garuns_olivier.nu_X{ - sd = 0 - min = 0.2 - max = 1.8 - } - - garuns_olivier.nu_Y{ - sd = 0.1 - min = 0.2 - max = 1.8 - } - - garuns_olivier.nu_F{ - sd = 0 - min = 0.50 - max = 1.50 - } - - garuns_olivier.nu_P{ - sd = 0 - min = 0.50 - max = 1.50 - } - - garuns_olivier.eD_star{ - sd = 0 - min = 9.0 - max = 15.0 - } - - garuns_olivier.NDF_star{ - sd = 0 - min = 0.10 - max = 0.90 - } - - rpm_lite.nu_I{ - sd = 0.007 - min = 0.00 - max = 0.20 - } - - rpm_lite.nu_B{ - sd = 0.07 - min = 1.20 - max = 2.20 - } - - rpm_lite.nu_Z{ - sd = 0.02 - min = 0.90 - max = 1.10 - } -} - -################################################################################################################# -#====== Initialization of cows # -################################################################################################################# - -####### DEFAULT COW ############################################################################################# -init_cow{ - name=cow_default - - ### ABORTION rules acording to days in pregnancy (dip) - abortion_olivier.delta = constant 3.0 # days (compute every delta) - abortion_olivier.enabled = sometime - # never : no abortion, - # always : always abort, - # sometime : abort according to abortion_olivier.abo - # and abortion_olivier.dip - - ### Days in pregnancy (dip) cutoffs (to cut gestation in early embryo, late embryo and fetal stages) - # Default intervals: Early embryo [0;17] Late embryo [17;64] Fetal [64;+inf] - abortion_olivier.dip = vector constant 17 ; constant 64 - - ### Daily probability of abortion for each intervals - # Default probabiliies : E: 0.0230 L: 0.0096 F: 0.0004 - abortion_olivier.abo = vector constant 0.02 ; constant 0.005 ; constant 0.0004 - - ### GARUNS & RPM_lite Genetic Scaling Parameters - # Default constant values - garuns_olivier.WM = constant 450 #450 - garuns_olivier.khi_M = constant 0.30 # 0.33 - garuns_olivier.b0 = constant 1.6 # 1.6 - garuns_olivier.nu_X = constant 1 # 1.0 - garuns_olivier.nu_Y = constant 1.1 # 1.0 - garuns_olivier.nu_F = constant 1 # 1.0 - garuns_olivier.nu_P = constant 1 # 1.0 - garuns_olivier.eD_star = constant 10.7 # 10.7 - garuns_olivier.NDF_star = constant 0.5 # 0.5 - rpm_lite.nu_B = constant 1.7 # 1.7 - rpm_lite.nu_Z = constant 1 # 1.0 - rpm_lite.nu_I = constant 0.025 # 0.026 -} - -####### RANDOM COW ############################################################################################## -init_cow{ - name=cow_random - - ### ABORTION rules acording to days in pregnancy (dip) - abortion_olivier.delta = constant 3.0 # days (compute every delta) - abortion_olivier.enabled = sometime - # never : no abortion, - # always : always abort, - # sometime : abort according to abortion_olivier.abo - # and abortion_olivier.dip - - ### Days in pregnancy (dip) cutoffs (to cut gestation in early embryo, late embryo and fetal stages) - # Default intervals: Early embryo [0;17] Late embryo [17;64] Fetal [64;+inf] - abortion_olivier.dip = vector constant 17 ; constant 64 - - ### Daily probability of abortion for each intervals - # Default probabiliies : E: 0.0230 L: 0.0096 F: 0.0004 - abortion_olivier.abo = vector constant 0.02 ; constant 0.005 ; constant 0.0004 - - ### GARUNS & RPM_lite Genetic Scaling Parameters - # Random values - garuns_olivier.WM = norm99 450 50 #450 ± 25 - garuns_olivier.khi_M = norm99 0.30 0.06 # 0.33 ± 0.03 - garuns_olivier.b0 = norm99 1.6 0 # 1.6 ± 0.16 - garuns_olivier.nu_X = norm99 1 0 # 1.0 ± 0.10 - garuns_olivier.nu_Y = norm99 1.1 0.1 # 1.0 ± 0.10 - garuns_olivier.nu_F = norm99 1 0 # 1.0 ± 0.02 - garuns_olivier.nu_P = norm99 1 0 # 1.0 ± 0.02 - garuns_olivier.eD_star = norm99 10.7 0 # 10.7 ± 0.5 - garuns_olivier.NDF_star = norm99 0.5 0 # 0.5 ± 0.02 - rpm_lite.nu_B = norm99 1.7 0.07 # 1.7 ± 0.07 - rpm_lite.nu_Z = norm99 1 0.02 # 1.0 ± 0.02 - rpm_lite.nu_I = norm99 0.025 0.007 # 0.026 ± 0.007 -} - -################################################################################################################# -#====== Breeding # -################################################################################################################# - -#______ Bull semen: quality = 0.95 ± 0.05 ; sexratio = 0 % female - -breed{ - breed = bull_default -} - -init_bull{ - name=semen_default - bull.breed_name = bull_default - bull.semens_quality = norm99 0.95 0.05 # a number between 0.0 (=never works) and 1.0 (=perfect) - bull.female_ratio = constant 0 # offspring sex ratio. 1.0 = 100%female, 0.0=0%female -} - -#_______Breeding season: every year from *-03-21 00:00:00 to *-06-21 23:59:59 - -condition{ - type = chron_range - name = breeding_season - from = *-03-21 00:00:00 #*-03-21 00:00:00 - to = *-06-21 23:59:59 #*-06-21 23:59:59 -} - -trigger{ - type = chron - name = breeding_start - scheme = *-03-21 00:00:00 -} - -# link{ -# trigger = breeding_start -# action = log_db Start_breeding_season -#} - -trigger{ - type = chron - name = breeding_end - scheme = *-06-21 23:59:59 -} - -#link{ -# trigger = breeding_end -# action = log_db Stop_breeding_season -#} - -#______ Estrous detection method ________________________________________________________________________________ - -estrous_detection_method{ - name=estrous_detection_default - - #When do we observe oestruses - time_slice = 06:00:00 18:00:00 #00:00:01 23:59:59 - - #estrogene is transformed to an expression using a Hill function - expression_threshold=0.75 #default 0.75 - expression_stiffness=7 #default 7 - - - #the oestrus worth an insemination if the memory function is above this threshold - #THIS threshold is scaled for an observation all the day long - #if you observe half a day multiply this threshold by 0.5 - #1.0 is a reasonable base value for all day observations - detection_threshold=0.05 # 0.1 - - #then, the oestrus is truely detected with a chance of - sensitivity = 0.75 #0.7 - - #then an average of wrong_oestrus_per_day are generated - wrong_oestrus_per_day = 0 #0.00 -} - - -#______ Insemination _________________________________________________________________________________ - -# Insemination is performed once a day when estrous is detected - -state{ - state = ALREADY_INSEMINATED -} - -trigger{ - type=custom - name=tr_delete_ALREADY_INSEMINATED -} - -link{ - trigger = tr_delete_ALREADY_INSEMINATED - action = state_delete ALREADY_INSEMINATED -} - -link{ - trigger = estrous - condition = is_in BREEDING - condition = not is_pregnant - condition = not is_in ALREADY_INSEMINATED - action = state_add ALREADY_INSEMINATED - action = trigger_later tr_delete_ALREADY_INSEMINATED 1 - action = log_db 01_INSEMINATION - action = inseminate semen_default -} - -################################################################################################################# -#====== Initialization of herd # -################################################################################################################# - -trigger{ - type = custom - name = init_day_01 -} -trigger{ - type = custom - name = init_day_02 -} -trigger{ - type = custom - name = init_day_03 -} -trigger{ - type = custom - name = init_day_04 -} -trigger{ - type = custom - name = init_day_05 -} -trigger{ - type = custom - name = init_day_06 -} -trigger{ - type = custom - name = init_day_07 -} -trigger{ - type = custom - name = init_day_08 -} -trigger{ - type = custom - name = init_day_09 -} -trigger{ - type = custom - name = init_day_10 -} -trigger{ - type = custom - name = init_day_11 -} -trigger{ - type = custom - name = init_day_12 -} -trigger{ - type = custom - name = init_day_13 -} -trigger{ - type = custom - name = init_day_14 -} -trigger{ - type = custom - name = init_day_15 -} -trigger{ - type = custom - name = init_day_16 -} -trigger{ - type = custom - name = init_day_17 -} -trigger{ - type = custom - name = init_day_18 -} -trigger{ - type = custom - name = init_day_19 -} -trigger{ - type = custom - name = init_day_20 -} -trigger{ - type = custom - name = init_day_21 -} -trigger{ - type = custom - name = init_day_22 -} -trigger{ - type = custom - name = init_day_23 -} -trigger{ - type = custom - name = init_day_24 -} -trigger{ - type = custom - name = init_day_25 -} -trigger{ - type = custom - name = init_day_26 -} -trigger{ - type = custom - name = init_day_27 -} -trigger{ - type = custom - name = init_day_28 -} -trigger{ - type = custom - name = init_day_29 -} -trigger{ - type = custom - name = init_day_30 -} -trigger{ - type = custom - name = init_day_31 -} -trigger{ - type = custom - name = init_day_32 -} -trigger{ - type = custom - name = init_day_33 -} -trigger{ - type = custom - name = init_day_34 -} -trigger{ - type = custom - name = init_day_35 -} -trigger{ - type = custom - name = init_day_36 -} -trigger{ - type = custom - name = init_day_37 -} -trigger{ - type = custom - name = init_day_38 -} -trigger{ - type = custom - name = init_day_39 -} -trigger{ - type = custom - name = init_day_40 -} -trigger{ - type = custom - name = init_day_41 -} -trigger{ - type = custom - name = init_day_42 -} -trigger{ - type = custom - name = init_day_43 -} -trigger{ - type = custom - name = init_day_44 -} -trigger{ - type = custom - name = init_day_45 -} -trigger{ - type = custom - name = init_day_46 -} -trigger{ - type = custom - name = init_day_47 -} -trigger{ - type = custom - name = init_day_48 -} -trigger{ - type = custom - name = init_day_49 -} -trigger{ - type = custom - name = init_day_50 -} -trigger{ - type = custom - name = init_day_51 -} -trigger{ - type = custom - name = init_day_52 -} -trigger{ - type = custom - name = init_day_53 -} -trigger{ - type = custom - name = init_day_54 -} -trigger{ - type = custom - name = init_day_55 -} -trigger{ - type = custom - name = init_day_56 -} -trigger{ - type = custom - name = init_day_57 -} -trigger{ - type = custom - name = init_day_58 -} -trigger{ - type = custom - name = init_day_59 -} - -link{ - trigger = init - action = buy_calf cow_random 1 - action = log_db BUY_CALF_N=1 - action = trigger_later init_day_01 1 -} -link{ - trigger = init_day_01 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_02 1 -} -link{ - trigger = init_day_02 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_03 1 -} -link{ - trigger = init_day_03 - action = buy_calf cow_random 8 - action = log_db BUY_CALF_N=8 - action = trigger_later init_day_04 1 -} -link{ - trigger = init_day_04 - action = buy_calf cow_random 8 - action = log_db BUY_CALF_N=8 - action = trigger_later init_day_05 1 -} -link{ - trigger = init_day_05 - action = buy_calf cow_random 4 - action = log_db BUY_CALF_N=4 - action = trigger_later init_day_06 1 -} -link{ - trigger = init_day_06 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_07 1 -} -link{ - trigger = init_day_07 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_08 1 -} -link{ - trigger = init_day_08 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_09 1 -} -link{ - trigger = init_day_09 - action = buy_calf cow_random 4 - action = log_db BUY_CALF_N=4 - action = trigger_later init_day_10 1 -} -link{ - trigger = init_day_10 - action = buy_calf cow_random 4 - action = log_db BUY_CALF_N=4 - action = trigger_later init_day_11 1 -} -link{ - trigger = init_day_11 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_12 1 -} -link{ - trigger = init_day_12 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_13 1 -} -link{ - trigger = init_day_13 - action = buy_calf cow_random 4 - action = log_db BUY_CALF_N=4 - action = trigger_later init_day_14 1 -} -link{ - trigger = init_day_14 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_15 1 -} -link{ - trigger = init_day_15 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_16 1 -} -link{ - trigger = init_day_16 - action = buy_calf cow_random 4 - action = log_db BUY_CALF_N=4 - action = trigger_later init_day_17 1 -} -link{ - trigger = init_day_17 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_18 1 -} -link{ - trigger = init_day_18 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_19 1 -} -link{ - trigger = init_day_19 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_20 1 -} -link{ - trigger = init_day_20 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_21 1 -} -link{ - trigger = init_day_21 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_22 1 -} -link{ - trigger = init_day_22 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_23 1 -} -link{ - trigger = init_day_23 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_24 1 -} -link{ - trigger = init_day_24 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_25 1 -} -link{ - trigger = init_day_25 - action = buy_calf cow_random 4 - action = log_db BUY_CALF_N=4 - action = trigger_later init_day_26 1 -} -link{ - trigger = init_day_26 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_27 1 -} -link{ - trigger = init_day_27 - action = buy_calf cow_random 12 - action = log_db BUY_CALF_N=12 - action = trigger_later init_day_28 1 -} -link{ - trigger = init_day_28 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_29 1 -} -link{ - trigger = init_day_29 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_30 1 -} -link{ - trigger = init_day_30 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_31 1 -} -link{ - trigger = init_day_31 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_32 1 -} -link{ - trigger = init_day_32 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_33 1 -} -link{ - trigger = init_day_33 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_34 1 -} -link{ - trigger = init_day_34 - action = buy_calf cow_random 4 - action = log_db BUY_CALF_N=4 - action = trigger_later init_day_35 1 -} -link{ - trigger = init_day_35 - action = buy_calf cow_random 4 - action = log_db BUY_CALF_N=4 - action = trigger_later init_day_36 1 -} -link{ - trigger = init_day_36 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_37 1 -} -link{ - trigger = init_day_37 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_38 1 -} -link{ - trigger = init_day_38 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_39 1 -} -link{ - trigger = init_day_39 - action = buy_calf cow_random 4 - action = log_db BUY_CALF_N=4 - action = trigger_later init_day_40 1 -} -link{ - trigger = init_day_40 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_41 1 -} -link{ - trigger = init_day_41 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_42 1 -} -link{ - trigger = init_day_42 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_43 1 -} -link{ - trigger = init_day_43 - action = buy_calf cow_random 4 - action = log_db BUY_CALF_N=4 - action = trigger_later init_day_44 1 -} -link{ - trigger = init_day_44 - action = buy_calf cow_random 4 - action = log_db BUY_CALF_N=4 - action = trigger_later init_day_45 1 -} -link{ - trigger = init_day_45 - action = buy_calf cow_random 4 - action = log_db BUY_CALF_N=4 - action = trigger_later init_day_46 1 -} -link{ - trigger = init_day_46 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_47 1 -} -link{ - trigger = init_day_47 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_48 1 -} -link{ - trigger = init_day_48 - action = buy_calf cow_random 4 - action = log_db BUY_CALF_N=4 - action = trigger_later init_day_49 1 -} -link{ - trigger = init_day_49 - action = buy_calf cow_random 4 - action = log_db BUY_CALF_N=4 - action = trigger_later init_day_50 1 -} -link{ - trigger = init_day_50 - action = buy_calf cow_random 4 - action = log_db BUY_CALF_N=4 - action = trigger_later init_day_51 1 -} -link{ - trigger = init_day_51 - action = buy_calf cow_random 8 - action = log_db BUY_CALF_N=8 - action = trigger_later init_day_52 1 -} -link{ - trigger = init_day_52 - action = buy_calf cow_random 4 - action = log_db BUY_CALF_N=4 - action = trigger_later init_day_53 1 -} -link{ - trigger = init_day_53 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_54 1 -} -link{ - trigger = init_day_54 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_55 1 -} -link{ - trigger = init_day_55 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_56 1 -} -link{ - trigger = init_day_56 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_57 1 -} -link{ - trigger = init_day_57 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_58 1 -} -link{ - trigger = init_day_58 - action = buy_calf cow_random 0 - action = log_db BUY_CALF_N=0 - action = trigger_later init_day_59 1 -} -link{ - trigger = init_day_59 - action = buy_calf cow_random 25 - action = log_db BUY_CALF_N=25 -} - -################################################################################################################# -#====== Management of herd # -################################################################################################################# - -#_______Predefined states : herd, heifers & mature ______________________________________________________________ -# -# herd : Every animal that enters the herd is added to this state. Male calves are never added. -# heifers : Newborn female calves enter the herd as heifers, and are moved to not_heifers at 1st calving. -# mature : Cows enter mature state when non-labile body mass W > 0.5 WM (GSP for mature format). - - -################################################################################################################# -#====== Remove cows @ end of simulation # -################################################################################################################# - -trigger{ - type = chron - name = tr_end_simu - scheme = 1985-12-31 23:59:58 -} - -link{ - trigger = tr_end_simu - action = log_db action_remove_herd - action = remove_herd -} - -action{ - type = broadcast_now - name = remove_herd - trigger = tr_remove_herd -} - -trigger{ - type = custom - name = tr_remove_herd -} - -link{ - trigger = tr_remove_herd - action = log_db delete_cow - action = delete_cow -} - -################################################################################################################# -#====== Rearing # -################################################################################################################# - -#_______CALF: heifers of age < 100 days - -state{ - state = CALF -} - -link{ - trigger = enter heifers - condition = age < 100 - # action = log_db heifers_to_CALF - action = state_move heifers CALF -} - -link{ - trigger = calving - condition = state_size CALF > 333 - action = log_db REMOVE_CALF_to_limit_size - action = delete_calf - } - -#_______HEIFER: heifers of age >= 100 days - -state{ - state = HEIFER -} - -link{ - trigger = enter heifers - condition = age >= 100 - # action = log_db heifers_to_HEIFER - action = state_move heifers HEIFER -} - -link{ - trigger = every_day - condition = age >= 100 - condition = is_in CALF - # action = log_db CALF_to_HEIFER_@WEANING - action = state_move CALF HEIFER -} - - -################################################################################################################# -#====== Reproduction # -################################################################################################################# - -#_______CYCLING: non-pregnant heifers at 1st ovulation or postabortive/postpartum recycling cows _____________ - -state{ - state = CYCLING -} - -link{ - trigger = ovulation - condition = is_in HEIFER - # action = log_db HEIFER_to_CYCLING_@PUBERTY - action = log_db 00_PUBERTY - action = state_move HEIFER CYCLING -} - -link{ - trigger = ovulation - action = log_db 00_OVULATION -} - -#_______BREEDING: cycling heifers and cows during breeding season ______________________________________________ - -state{ - state = BREEDING -} - -#During breeding season, not TO_CULL and CYCLING cows are moved to BREEDING -link{ - trigger = every_day - condition = breeding_season - condition = not is_in TO_CULL - condition = is_in CYCLING - condition = is_in mature - # action = log_db CYCLING_to_BREEDING - action = state_move CYCLING BREEDING -} - -link{ - trigger = enter BREEDING - # action = log_db Start_estrous_detection - action = estrous_start estrous_detection_default -} - -link{ - trigger = every_day - condition = not breeding_season - condition = is_in BREEDING - # action = log_db BREEDING_to_CYCLING - action = state_move BREEDING CYCLING -} - -link{ - trigger = quit BREEDING - # action = log_db Stop_estrous_detection - action = estrous_stop -} - - -#_______PREGNANT: at conception _________________________________________________________________________________ - -state{ - state = PREGNANT -} - -link{ - trigger = conception - action = log_db 02_CONCEPTION - action = state_move BREEDING PREGNANT -} - -#_______POST-ABORTIVE: triggered at abortion ____________________________________________________________________ - -state{ - state = POST-ABORTIVE -} - -link{ - trigger = abortion - condition = days_after_conception <= 17 - action = log_db 03_EARLY_EMBRYO_DEATH - action = state_move PREGNANT CYCLING -} - -link{ - trigger = abortion - condition = days_after_conception > 17 - condition = days_after_conception <= 64 - action = log_db 04_LATE_EMBRYO_DEATH - action = state_move PREGNANT CYCLING -} - -trigger{ - type = custom - name = post_abortive_recycling -} - -#Abortions after ] 64 - 210 days] days in pregnancy are managed with a voluntary period of 40 days -link{ - trigger = abortion - condition = days_after_conception > 64 - condition = days_after_conception <= 210 - action = log_db 05_FETAL_DEATH - action = state_move PREGNANT POST-ABORTIVE - action = trigger_later post_abortive_recycling 40 -} - -link{ - trigger = post_abortive_recycling - # action = log_db POST-ABORTIVE_to_CYCLING - action = state_move POST-ABORTIVE CYCLING -} - -#Abortions after 210 days in pregnancy are managed by culling -link{ - trigger = abortion - condition = days_after_conception > 210 - action = log_db 05_FETAL_DEATH - action = log_db TO_CULL_from_PREGNANT_after_late_fetal_death - action = state_move PREGNANT TO_CULL -} - - -#_______POSTPARTAL: triggered at parturition ____________________________________________________________________ - -state{ - state = POSTPARTAL -} - -trigger{ - type = custom - name = postpartal_recycling -} - -link{ - trigger = parturition - action = log_db 06_PARTURITION - # action = log_db PREGNANT_to_POSTPARTAL - action = state_move PREGNANT POSTPARTAL - action = trigger_later postpartal_recycling 40 - action = log_db start_milking - action = start_milking - } - -link{ - trigger = postpartal_recycling - # action = log_db POSTPARTAL_to_CYCLING - action = state_move POSTPARTAL CYCLING -} - -################################################################################################################# -#====== Drying-off # -################################################################################################################# - -#_______EXTENDED_LACTATION: CYCLING and is_milking after 305 days after calving - -state{ - state = EXTENDED_LACTATION -} - -link{ - trigger = every_day - condition = is_milking - condition = not is_in PREGNANT - condition = not is_in EXTENDED_LACTATION - condition = days_after_calving >= 305 - # action = log_db Extended lactation - action = state_add EXTENDED_LACTATION -} - -#stop 300 days_after_calving if milk_yield <= 5 kg/d and not in EXTENDED_LACTATION -link{ - trigger = every_day - condition = is_milking - condition = not is_in EXTENDED_LACTATION - condition = days_after_calving >= 300 - condition = milk_yield <= 5 - action = log_db stop_milking - action = stop_milking -} - -#stop 300 days_after_calving if milk_yield <= 5 kg/d and in EXTENDED_LACTATION -link{ - trigger = every_day - condition = is_milking - condition = is_in EXTENDED_LACTATION - condition = days_after_calving >= 300 - condition = milk_yield <= 5 - action = log_db stop_milking_extended - action = stop_milking -} - -#stop 300 days_after_calving and 219 days_in_pregnancy -link{ - trigger = every_day - condition = is_milking - condition = is_pregnant - condition = days_after_calving >= 300 - condition = days_in_pregnancy >= 219 - action = log_db stop_milking_pregnant - action = stop_milking -} - -link{ - trigger = stop_milking - trigger = enter PREGNANT - condition = is_in EXTENDED_LACTATION - action = state_delete EXTENDED_LACTATION -} - -################################################################################################################# -#====== Culling # -################################################################################################################# - -#_______TO_CULL: ____________________________________________________________________ - -state{ - state = TO_CULL -} - -#______culling not pregnant nulliparous at age > 800 days -link{ - trigger = every_day - condition = is_in CYCLING - condition = not is_in PREGNANT - condition = parity = 0 - condition = age > 800 - action = log_db TO_CULL_from_CYCLING_because_too_old_heifer - action = state_move CYCLING TO_CULL -} - - -#______culling not pregnant 320 days_after_calving -link{ - trigger = every_day - condition = days_after_calving > 320 - condition = is_in CYCLING - action = log_db TO_CULL_from_CYCLING_because_too_late_after_calving - action = state_move CYCLING TO_CULL -} - -#______culling not pregnant after 7 insemination -link{ - trigger = every_day - condition = is_in BREEDING - condition = not is_in ALREADY_INSEMINATED - condition = parity > 0 - condition = num_insemination_lactation >= 7 - action = log_db TO_CULL_from_BREEDING_max_nb_ins - action = state_move BREEDING TO_CULL -} - -link{ - trigger = enter PREGNANT - condition = is_in TO_CULL - action = state_move TO_CULL PREGNANT -} - - -#______culling oldest cow - -link{ - trigger = culling_day - condition = state_size TO_CULL = 999999 - condition = state_size PREGNANT > 666 - #individual conditions, like not is_milking cannot be mixed wirh herd level triggers - action = log_db Seek_for_oldest_to_cull - action = cull_oldest -} - -trigger{ - type = custom - name = tr_cull_oldest -} - -action{ - type = broadcast_now - name = cull_oldest - condition = not is_pregnant - condition = not is_milking - condition = not is_in HEIFER - condition = not is_in CALF - sortby = age - reverse = yes - limit = 1 - trigger = tr_cull_oldest -} - -link{ - trigger = tr_cull_oldest - action = log_db remove_oldest - action = delete_cow -} - - -#______remove cows TO_CULL once a month on day 15th - -trigger{ - type = custom - name = tr_remove_cows_to_cull -} - -link{ - trigger = tr_remove_cows_to_cull - condition = is_in TO_CULL - condition = not is_milking - condition = not is_pregnant - action = log_db Remove - action = delete_cow -} - -trigger{ - type = chron - name = culling_day - scheme = *-*-15 14:00:00 -} - -action{ - type = broadcast_now - name = broadcast_TO_CULL - condition = is_in TO_CULL - trigger = tr_remove_cows_to_cull -} - -link{ - trigger = culling_day - action = broadcast_TO_CULL -} - - -################################################################################################################# -#====== Feeding # -################################################################################################################# -#______optimal feeding for 999 - -state{ - state = CONTROL -} - -link{ - trigger = enter herd - condition = state_size herd <= 999 #nb_control 0 - 999 - action = change_food optimal - action = state_add CONTROL #Cows are fed on optimal diet as a control -} - -#______Default feeding rules - -#################### > at birth: on calf diet -link{ - trigger = enter CALF - condition = not is_in CONTROL - action = change_food calf_diet -} - -#################### > at weaning: on heifer diet -link{ - trigger = enter HEIFER - condition = not is_in CONTROL - action = change_food heifer_diet -} - -#################### > at parturition: on lactation diet -link{ - trigger = parturition - condition = not is_in CONTROL - action = change_food lactation_diet -} - - -#################### > at drying-off: on drycow_diet -link{ - trigger = stop_milking - condition = not is_in CONTROL - action = change_food drycow_diet -} - -#################### > OUTDOOR: on pasture diet -trigger{ - type = chron - name = outdoor - scheme = *-04-01 00:00:00 -} - -link{ - trigger = outdoor - action = broadcast_outdoor -} - -action{ - type = broadcast_now - name = broadcast_outdoor - trigger = outdoor_feeding -} - -trigger{ - type = custom - name = outdoor_feeding -} - -link{ - trigger = outdoor_feeding - condition = not is_in CALF - condition = not is_in CONTROL - action = change_food pasture_diet -} - - -#################### > INDOOR: back to diet according to state -trigger{ - type = chron - name = indoor - scheme = *-10-01 00:00:00 -} - -link{ - trigger = indoor - action = broadcast_indoor -} - -action{ - type = broadcast_now - name = broadcast_indoor - trigger = indoor_feeding -} - -trigger{ - type = custom - name = indoor_feeding -} - -link{ - trigger = indoor_feeding - condition = is_in HEIFER - condition = not is_in CONTROL - action = change_food heifer_diet -} - -link{ - trigger = indoor_feeding - condition = is_in CYCLING - condition = not is_in CONTROL - action = change_food heifer_diet -} - -link{ - trigger = indoor_feeding - condition = is_in BREEDING - condition = not is_milking - condition = not is_in CONTROL - action = change_food heifer_diet -} - -link{ - trigger = indoor_feeding - condition = not is_in BREEDING - condition = not is_milking - condition = not is_in CONTROL - action = change_food drycow_diet -} - -link{ - trigger = indoor_feeding - condition = is_milking - condition = not is_in CONTROL - action = change_food lactation_diet -} - - - - -################################################################################################################# -#====== Generic stuff # -################################################################################################################# - -trigger{ - type = chron - name = every_day_herd - scheme = *-*-* 12:00:00 -} - -trigger{ - type = custom - name = every_day -} - -link{ - trigger = every_day_herd - action = broadcast_now every_day -} - -trigger{ - type = custom - name = first_day_sub -} - -trigger{ - type = custom - name = first_day -} - -link{ - trigger = init - action = trigger_later first_day_sub 0.001 -} -link{ - trigger = first_day_sub - action = broadcast_now first_day -} - -################################################################################################################# -#====== Log # -################################################################################################################# - -log{ - - #farmer level - insemination = yes - change_food = yes - - #herd level - conception = yes - parturition = yes - death = yes - estrous_observed = yes - estrous_missed = yes - estrous_environment= yes - insemination_result= yes - mature = yes - ovulation = yes - new_cow = yes - delete_cow = yes - abortion = yes - - #cow level - animal_performance = no -} - -################################################################################################################# -#====== Log states # -################################################################################################################# - -action{ - type = genericlog_herd - - name = log_states - log_type = file - file_path = states.txt - sep_col = \t - file_line_flush=no - - #sqlite_path = states.sqlite - #sqlite_table = states - - - #--- from cow and simulator --- - column{ - value = time - name = time - sqlite_type = numeric - } - - column{ - value = state.CONTROL - name = CONTROL - sqlite_type = numeric - } - - column{ - value = state.CALF - name = CALF - sqlite_type = numeric - } - - column{ - value = state.HEIFER - name = HEIFER - sqlite_type = numeric - } - - column{ - value = state.CYCLING - name = CYCLING - sqlite_type = numeric - } - - column{ - value = state.BREEDING - name = BREEDING - sqlite_type = numeric - } - - column{ - value = state.PREGNANT - name = PREGNANT - sqlite_type = numeric - } - - column{ - value = state.POST-ABORTIVE - name = POST-ABORTIVE - sqlite_type = numeric - } - - column{ - value = state.POSTPARTAL - name = POSTPARTAL - sqlite_type = numeric - } - - column{ - value = state.EXTENDED_LACTATION - name = EXTENDED_LACTATION - sqlite_type = numeric - } - - column{ - value = state.TO_CULL - name = TO_CULL - sqlite_type = numeric - } - - - # column{ - # value = state.not.mature - # name = not_mature - # sqlite_type = numeric - # } - -} - -link{ - trigger = every_day_herd - action = log_states -} - - - -###s######## Default diets - -feed{ - name = calf_diet - type = mix - - feed = CPL.MLK - proportion = 1.00 -} - -feed{ - name = heifer_diet - type = mix - - feed = FO.STR - proportion = 0.02 - feed = FO.HAP - proportion = 0.60 - feed = FO.GSI - proportion = 0.32 - feed = CO.CER - proportion = 0.05 - feed = CPL.CMV - proportion = 0.01 -} - -feed{ - name = lactation_diet - type = mix - - feed = FO.STR - proportion = 0.01 - feed = FO.HAP - proportion = 0.03 - feed = FO.GSI - proportion = 0.04 - feed = FO.CSI - proportion = 0.70 - feed = CO.CER - proportion = 0.05 - feed = CO.OSC - proportion = 0.13 - feed = CO.ROO - proportion = 0.03 - feed = CPL.CMV - proportion = 0.01 -} - -feed{ - name = drycow_diet - type = mix - - feed = FO.STR - proportion = 0.02 - feed = FO.HAP - proportion = 0.68 - feed = FO.CSI - proportion = 0.08 - feed = CO.CER - proportion = 0.05 - feed = CO.OSC - proportion = 0.13 - feed = CO.ROO - proportion = 0.03 - feed = CPL.CMV - proportion = 0.01 -} - -feed{ - name = pasture_diet - type = mix - - feed = FO.FGX - proportion = 0.778 - feed = CO.CER - proportion = 0.050 - feed = CO.OSC - proportion = 0.130 - feed = CO.TUB - proportion = 0.002 - feed = CO.ROO - proportion = 0.030 - feed = CPL.CMV - proportion = 0.010 -} - - - - - -######################################################## -# # -#List of available feed (derived from INRA tables) # -# # -######################################################## - -########### FORAGES #################################### -# FO.STR Straw -# FO.STN Straw treated with ammonia -# FO.MSH Maize stover & husks -# FO.HAL Legume hay -# FO.HAG Gramineae hay -# FO.HAP Permanent grassland hay -# FO.DHA Dehydrated alfalfa -# FO.DHF Dehydrated forage -# FO.FGC Fresh cereal grass -# FO.FGO Fresh oleaginous grass -# FO.FGG Fresh gramineae grass -# FO.FGX Fresh mixed grass (meadow) -# FO.FGL Fresh legume grass -# FO.GSI50 Grass silage > 50% DM -# FO.GSI Grass silage -# FO.CSI Corn silage -# FO.FPF Faba & pea forage -# FO.VEG Vegetable fodder - -########### CONCENTRATES ############################### -# CO.CER Cereal seed & by-products -# CO.OSC5 Oilseed cake <5% oil -# CO.OSC Oilseed cake -# CO.TUB Starchy tubers -# CO.ROO Vegetable roots -# CO.FPB Faba & pea bean -# CO.LUP Lupin -# CO.SDO Oilseed - -########### COMPLEMENTS ################################ -# CPL.CMV Compl. Minerals & Vitamins -# CPL.AMA Amino acids -# CPL.URE Urea -# CPL.MOL Molasses -# CPL.PLP Beet pulp -# CPL.MLK Milk -# CPL.OIL Oil - - -feed{ # Straw - # Type of feed: FORAGE - # Maximum incorporation in diet: 80 %FM - # Representative INRA feed: FP0090 Oat straw - name = FO.STR - type = ingredient - feed_eD = 5.9512 # MJ_ME/kg_DM - feed_DMC = 0.8825 # kg_DM/kg_FM - feed_OM = 0.9100 # kg/kg_DM - feed_OMd = 0.4500 # % - feed_CP = 0.0360 # kg/kg_DM - feed_CPd = 0.0296 # % - feed_NDF = 0.7910 # kg/kg_DM - feed_ST = 0.0000 # kg/kg_DM - feed_STd = 0.0000 # % - feed_EE = 0.0150 # kg/kg_DM -} -feed{ # Straw treated with ammonia - # Type of feed: FORAGE - # Maximum incorporation in diet: 80 %FM - # Representative INRA feed: FP0080 Barley straw, NH3-treated 5%DM - name = FO.STN - type = ingredient - feed_eD = 7.6484 # MJ_ME/kg_DM - feed_DMC = 0.8867 # kg_DM/kg_FM - feed_OM = 0.8970 # kg/kg_DM - feed_OMd = 0.5567 # % - feed_CP = 0.1000 # kg/kg_DM - feed_CPd = 0.3933 # % - feed_NDF = 0.7603 # kg/kg_DM - feed_ST = 0.0000 # kg/kg_DM - feed_STd = 0.0000 # % - feed_EE = 0.0150 # kg/kg_DM -} -feed{ # Maize stover & husks - # Type of feed: FORAGE - # Maximum incorporation in diet: 80 %FM - # Representative INRA feed: FP0180 Maize stover, ensiled - name = FO.MSH - type = ingredient - feed_eD = 8.5847 # MJ_ME/kg_DM - feed_DMC = 0.5022 # kg_DM/kg_FM - feed_OM = 0.9332 # kg/kg_DM - feed_OMd = 0.6220 # % - feed_CP = 0.0888 # kg/kg_DM - feed_CPd = 0.3432 # % - feed_NDF = 0.6580 # kg/kg_DM - feed_ST = 0.0000 # kg/kg_DM - feed_STd = 0.0000 # % - feed_EE = 0.0150 # kg/kg_DM -} -feed{ # Legume hay - # Type of feed: FORAGE - # Maximum incorporation in diet: 100 %FM - # Representative INRA feed: FF3370 Lucerne hay - name = FO.HAL - type = ingredient - feed_eD = 8.4626 # MJ_ME/kg_DM - feed_DMC = 0.8500 # kg_DM/kg_FM - feed_OM = 0.8956 # kg/kg_DM - feed_OMd = 0.5987 # % - feed_CP = 0.1791 # kg/kg_DM - feed_CPd = 0.6818 # % - feed_NDF = 0.5326 # kg/kg_DM - feed_ST = 0.0000 # kg/kg_DM - feed_STd = 0.0000 # % - feed_EE = 0.0259 # kg/kg_DM -} -feed{ # Gramineae hay - # Type of feed: FORAGE - # Maximum incorporation in diet: 100 %FM - # Representative INRA feed: FF1190 Italian ryegrass hay - name = FO.HAG - type = ingredient - feed_eD = 8.8553 # MJ_ME/kg_DM - feed_DMC = 0.8500 # kg_DM/kg_FM - feed_OM = 0.9011 # kg/kg_DM - feed_OMd = 0.6294 # % - feed_CP = 0.1169 # kg/kg_DM - feed_CPd = 0.5447 # % - feed_NDF = 0.6421 # kg/kg_DM - feed_ST = 0.0000 # kg/kg_DM - feed_STd = 0.0000 # % - feed_EE = 0.0300 # kg/kg_DM -} -feed{ # Permanent grassland hay - # Type of feed: FORAGE - # Maximum incorporation in diet: 100 %FM - # Representative INRA feed: FF0750 Mountain permanent grassland hay - name = FO.HAP - type = ingredient - feed_eD = 9.0294 # MJ_ME/kg_DM - feed_DMC = 0.8500 # kg_DM/kg_FM - feed_OM = 0.9133 # kg/kg_DM - feed_OMd = 0.6196 # % - feed_CP = 0.1270 # kg/kg_DM - feed_CPd = 0.5679 # % - feed_NDF = 0.6090 # kg/kg_DM - feed_ST = 0.0000 # kg/kg_DM - feed_STd = 0.0000 # % - feed_EE = 0.0223 # kg/kg_DM -} -feed{ # Dehydrated alfalfa - # Type of feed: FORAGE - # Maximum incorporation in diet: 60 %FM - # Representative INRA feed: CD0040 Dehydrated alfalfa - name = FO.DHA - type = ingredient - feed_eD = 9.2187 # MJ_ME/kg_DM - feed_DMC = 0.9070 # kg_DM/kg_FM - feed_OM = 0.8752 # kg/kg_DM - feed_OMd = 0.6317 # % - feed_CP = 0.2002 # kg/kg_DM - feed_CPd = 0.7017 # % - feed_NDF = 0.4375 # kg/kg_DM - feed_ST = 0.0297 # kg/kg_DM - feed_STd = 0.8200 # % - feed_EE = 0.0292 # kg/kg_DM -} -feed{ # Dehydrated forage - # Type of feed: FORAGE - # Maximum incorporation in diet: 60 %FM - # Representative INRA feed: CD0120 Dehydrated Italian ryegrass - name = FO.DHF - type = ingredient - feed_eD = 9.9954 # MJ_ME/kg_DM - feed_DMC = 0.9080 # kg_DM/kg_FM - feed_OM = 0.8898 # kg/kg_DM - feed_OMd = 0.7010 # % - feed_CP = 0.1436 # kg/kg_DM - feed_CPd = 0.6182 # % - feed_NDF = 0.5450 # kg/kg_DM - feed_ST = 0.0024 # kg/kg_DM - feed_STd = 0.1640 # % - feed_EE = 0.0268 # kg/kg_DM -} -feed{ # Fresh cereal grass - # Type of feed: FORAGE - # Maximum incorporation in diet: 100 %FM - # Representative INRA feed: FV2020 Fresh whole crop sorghum - name = FO.FGC - type = ingredient - feed_eD = 9.4748 # MJ_ME/kg_DM - feed_DMC = 0.2504 # kg_DM/kg_FM - feed_OM = 0.9148 # kg/kg_DM - feed_OMd = 0.6585 # % - feed_CP = 0.1044 # kg/kg_DM - feed_CPd = 0.6330 # % - feed_NDF = 0.5710 # kg/kg_DM - feed_ST = 0.0983 # kg/kg_DM - feed_STd = 0.8652 # % - feed_EE = 0.0304 # kg/kg_DM -} -feed{ # Fresh oleaginous grass - # Type of feed: FORAGE - # Maximum incorporation in diet: 100 %FM - # Representative INRA feed: FV2830 Fresh silphium - name = FO.FGO - type = ingredient - feed_eD = 9.8974 # MJ_ME/kg_DM - feed_DMC = 0.1170 # kg_DM/kg_FM - feed_OM = 0.8494 # kg/kg_DM - feed_OMd = 0.7323 # % - feed_CP = 0.1535 # kg/kg_DM - feed_CPd = 0.7491 # % - feed_NDF = 0.4212 # kg/kg_DM - feed_ST = 0.0000 # kg/kg_DM - feed_STd = 0.0000 # % - feed_EE = 0.0248 # kg/kg_DM -} -feed{ # Fresh gramineae grass - # Type of feed: FORAGE - # Maximum incorporation in diet: 100 %FM - # Representative INRA feed: FV0490 Fresh italian ryegrass - name = FO.FGG - type = ingredient - feed_eD = 10.2129 # MJ_ME/kg_DM - feed_DMC = 0.1885 # kg_DM/kg_FM - feed_OM = 0.8893 # kg/kg_DM - feed_OMd = 0.7150 # % - feed_CP = 0.1452 # kg/kg_DM - feed_CPd = 0.6756 # % - feed_NDF = 0.5690 # kg/kg_DM - feed_ST = 0.0000 # kg/kg_DM - feed_STd = 0.0000 # % - feed_EE = 0.0367 # kg/kg_DM -} -feed{ # Fresh mixed grass (meadow) - # Type of feed: FORAGE - # Maximum incorporation in diet: 100 %FM - # Representative INRA feed: FV0120 Fresh lowland grassland - name = FO.FGX - type = ingredient - feed_eD = 10.2424 # MJ_ME/kg_DM - feed_DMC = 0.1946 # kg_DM/kg_FM - feed_OM = 0.9057 # kg/kg_DM - feed_OMd = 0.6896 # % - feed_CP = 0.1444 # kg/kg_DM - feed_CPd = 0.6595 # % - feed_NDF = 0.5498 # kg/kg_DM - feed_ST = 0.0000 # kg/kg_DM - feed_STd = 0.0000 # % - feed_EE = 0.0265 # kg/kg_DM -} -feed{ # Fresh legume grass - # Type of feed: FORAGE - # Maximum incorporation in diet: 100 %FM - # Representative INRA feed: FV2370 Fresh red clover - name = FO.FGL - type = ingredient - feed_eD = 10.3243 # MJ_ME/kg_DM - feed_DMC = 0.1749 # kg_DM/kg_FM - feed_OM = 0.8844 # kg/kg_DM - feed_OMd = 0.7014 # % - feed_CP = 0.2046 # kg/kg_DM - feed_CPd = 0.7671 # % - feed_NDF = 0.4603 # kg/kg_DM - feed_ST = 0.0000 # kg/kg_DM - feed_STd = 0.0000 # % - feed_EE = 0.0287 # kg/kg_DM -} -feed{ # Grass silage > 50% DM - # Type of feed: FORAGE - # Maximum incorporation in diet: 100 %FM - # Representative INRA feed: FE2790 Wilted perennial ryegrass silage - name = FO.GSI50 - type = ingredient - feed_eD = 9.3078 # MJ_ME/kg_DM - feed_DMC = 0.5502 # kg_DM/kg_FM - feed_OM = 0.9056 # kg/kg_DM - feed_OMd = 0.6545 # % - feed_CP = 0.1351 # kg/kg_DM - feed_CPd = 0.6395 # % - feed_NDF = 0.5744 # kg/kg_DM - feed_ST = 0.0000 # kg/kg_DM - feed_STd = 0.0000 # % - feed_EE = 0.0337 # kg/kg_DM -} -feed{ # Grass silage - # Type of feed: FORAGE - # Maximum incorporation in diet: 100 %FM - # Representative INRA feed: FE2220 Perennial ryegrass silage - name = FO.GSI - type = ingredient - feed_eD = 10.3090 # MJ_ME/kg_DM - feed_DMC = 0.2234 # kg_DM/kg_FM - feed_OM = 0.8950 # kg/kg_DM - feed_OMd = 0.6952 # % - feed_CP = 0.1406 # kg/kg_DM - feed_CPd = 0.6469 # % - feed_NDF = 0.5425 # kg/kg_DM - feed_ST = 0.0000 # kg/kg_DM - feed_STd = 0.0000 # % - feed_EE = 0.0374 # kg/kg_DM -} -feed{ # Corn silage - # Type of feed: FORAGE - # Maximum incorporation in diet: 100 %FM - # Representative INRA feed: FE4710 Fine chop 30% DM corn silage - name = FO.CSI - type = ingredient - feed_eD = 10.6995 # MJ_ME/kg_DM - feed_DMC = 0.3109 # kg_DM/kg_FM - feed_OM = 0.9484 # kg/kg_DM - feed_OMd = 0.7061 # % - feed_CP = 0.0848 # kg/kg_DM - feed_CPd = 0.5300 # % - feed_NDF = 0.4415 # kg/kg_DM - feed_ST = 0.2754 # kg/kg_DM - feed_STd = 0.7660 # % - feed_EE = 0.0310 # kg/kg_DM -} -feed{ # Faba & pea forage - # Type of feed: FORAGE - # Maximum incorporation in diet: 100 %FM - # Representative INRA feed: FV2700 Fresh faba bean forage - name = FO.FPF - type = ingredient - feed_eD = 10.8203 # MJ_ME/kg_DM - feed_DMC = 0.2546 # kg_DM/kg_FM - feed_OM = 0.9115 # kg/kg_DM - feed_OMd = 0.7188 # % - feed_CP = 0.1578 # kg/kg_DM - feed_CPd = 0.7156 # % - feed_NDF = 0.4160 # kg/kg_DM - feed_ST = 0.0913 # kg/kg_DM - feed_STd = 0.7650 # % - feed_EE = 0.0288 # kg/kg_DM -} -feed{ # Vegetable fodder - # Type of feed: FORAGE - # Maximum incorporation in diet: 100 %FM - # Representative INRA feed: FV2840 Fresh kale - name = FO.VEG - type = ingredient - feed_eD = 12.0901 # MJ_ME/kg_DM - feed_DMC = 0.1348 # kg_DM/kg_FM - feed_OM = 0.8674 # kg/kg_DM - feed_OMd = 0.8260 # % - feed_CP = 0.1684 # kg/kg_DM - feed_CPd = 0.7794 # % - feed_NDF = 0.3382 # kg/kg_DM - feed_ST = 0.0000 # kg/kg_DM - feed_STd = 0.0000 # % - feed_EE = 0.0080 # kg/kg_DM -} -feed{ # Cereal seed & by-products - # Type of feed: CONCENTRATE - # Maximum incorporation in diet: 60 %FM - # Representative INRA feed: CS0160 Wheat middlings, starch 30-40% - name = CO.CER - type = ingredient - feed_eD = 12.3262 # MJ_ME/kg_DM - feed_DMC = 0.8835 # kg_DM/kg_FM - feed_OM = 0.9541 # kg/kg_DM - feed_OMd = 0.7712 # % - feed_CP = 0.1642 # kg/kg_DM - feed_CPd = 0.6629 # % - feed_NDF = 0.2909 # kg/kg_DM - feed_ST = 0.4008 # kg/kg_DM - feed_STd = 0.8041 # % - feed_EE = 0.0584 # kg/kg_DM -} -feed{ # Oilseed cake <5% oil - # Type of feed: CONCENTRATE - # Maximum incorporation in diet: 60 %FM - # Representative INRA feed: CX0050 Cottonseed meal, cr. fibre 15-20% - name = CO.OSC5 - type = ingredient - feed_eD = 12.0555 # MJ_ME/kg_DM - feed_DMC = 0.8907 # kg_DM/kg_FM - feed_OM = 0.9309 # kg/kg_DM - feed_OMd = 0.7747 # % - feed_CP = 0.4309 # kg/kg_DM - feed_CPd = 0.7740 # % - feed_NDF = 0.2931 # kg/kg_DM - feed_ST = 0.0527 # kg/kg_DM - feed_STd = 0.8200 # % - feed_EE = 0.0236 # kg/kg_DM -} -feed{ # Oilseed cake - # Type of feed: CONCENTRATE - # Maximum incorporation in diet: 60 %FM - # Representative INRA feed: CX0310 Sunflower meal, oil 5-20% - name = CO.OSC - type = ingredient - feed_eD = 12.6524 # MJ_ME/kg_DM - feed_DMC = 0.9207 # kg_DM/kg_FM - feed_OM = 0.9368 # kg/kg_DM - feed_OMd = 0.7350 # % - feed_CP = 0.3499 # kg/kg_DM - feed_CPd = 0.7570 # % - feed_NDF = 0.3477 # kg/kg_DM - feed_ST = 0.0444 # kg/kg_DM - feed_STd = 0.8200 # % - feed_EE = 0.1015 # kg/kg_DM -} -feed{ # Starchy tubers - # Type of feed: CONCENTRATE - # Maximum incorporation in diet: 60 %FM - # Representative INRA feed: CP0030 Cassava - name = CO.TUB - type = ingredient - feed_eD = 11.6622 # MJ_ME/kg_DM - feed_DMC = 0.6480 # kg_DM/kg_FM - feed_OM = 0.9510 # kg/kg_DM - feed_OMd = 0.8367 # % - feed_CP = 0.0750 # kg/kg_DM - feed_CPd = 0.4888 # % - feed_NDF = 0.1192 # kg/kg_DM - feed_ST = 0.6447 # kg/kg_DM - feed_STd = 0.7900 # % - feed_EE = 0.0062 # kg/kg_DM -} -feed{ # Vegetable roots - # Type of feed: CONCENTRATE - # Maximum incorporation in diet: 60 %FM - # Representative INRA feed: FR0040 Carrot - name = CO.ROO - type = ingredient - feed_eD = 12.8261 # MJ_ME/kg_DM - feed_DMC = 0.1568 # kg_DM/kg_FM - feed_OM = 0.9311 # kg/kg_DM - feed_OMd = 0.8900 # % - feed_CP = 0.0896 # kg/kg_DM - feed_CPd = 0.5710 # % - feed_NDF = 0.1295 # kg/kg_DM - feed_ST = 0.0050 # kg/kg_DM - feed_STd = 0.2000 # % - feed_EE = 0.0110 # kg/kg_DM -} -feed{ # Faba & pea bean - # Type of feed: CONCENTRATE - # Maximum incorporation in diet: 60 %FM - # Representative INRA feed: CN0060 Faba bean seeds - name = CO.FPB - type = ingredient - feed_eD = 13.6219 # MJ_ME/kg_DM - feed_DMC = 0.8721 # kg_DM/kg_FM - feed_OM = 0.9610 # kg/kg_DM - feed_OMd = 0.9057 # % - feed_CP = 0.2689 # kg/kg_DM - feed_CPd = 0.7843 # % - feed_NDF = 0.1550 # kg/kg_DM - feed_ST = 0.4601 # kg/kg_DM - feed_STd = 0.7586 # % - feed_EE = 0.0146 # kg/kg_DM -} -feed{ # Lupin - # Type of feed: CONCENTRATE - # Maximum incorporation in diet: 60 %FM - # Representative INRA feed: CN0130 White lupin seeds - name = CO.LUP - type = ingredient - feed_eD = 15.2995 # MJ_ME/kg_DM - feed_DMC = 0.8880 # kg_DM/kg_FM - feed_OM = 0.9617 # kg/kg_DM - feed_OMd = 0.8800 # % - feed_CP = 0.3657 # kg/kg_DM - feed_CPd = 0.8000 # % - feed_NDF = 0.2257 # kg/kg_DM - feed_ST = 0.0700 # kg/kg_DM - feed_STd = 0.8200 # % - feed_EE = 0.0850 # kg/kg_DM -} -feed{ # Oilseed - # Type of feed: CONCENTRATE - # Maximum incorporation in diet: 60 %FM - # Representative INRA feed: CN0110 Linseeds - name = CO.SDO - type = ingredient - feed_eD = 17.6063 # MJ_ME/kg_DM - feed_DMC = 0.9143 # kg_DM/kg_FM - feed_OM = 0.9539 # kg/kg_DM - feed_OMd = 0.7650 # % - feed_CP = 0.2647 # kg/kg_DM - feed_CPd = 0.7380 # % - feed_NDF = 0.2515 # kg/kg_DM - feed_ST = 0.0461 # kg/kg_DM - feed_STd = 0.8200 # % - feed_EE = 0.3208 # kg/kg_DM -} -feed{ # Compl. Minerals & Vitamins - # Type of feed: COMPLEMENT - # Maximum incorporation in diet: 5 %FM - # Representative INRA feed: MC0010 Crushed chalk - name = CPL.CMV - type = ingredient - feed_eD = 0.0000 # MJ_ME/kg_DM - feed_DMC = 0.9500 # kg_DM/kg_FM - feed_OM = 0.0000 # kg/kg_DM - feed_OMd = 0.0000 # % - feed_CP = 0.0000 # kg/kg_DM - feed_CPd = 0.0000 # % - feed_NDF = 0.0000 # kg/kg_DM - feed_ST = 0.0000 # kg/kg_DM - feed_STd = 0.0000 # % - feed_EE = 0.0000 # kg/kg_DM -} -feed{ # Amino acids - # Type of feed: COMPLEMENT - # Maximum incorporation in diet: 5 %FM - # Representative INRA feed: CAA020 L-threonin - name = CPL.AMA - type = ingredient - feed_eD = 0.0000 # MJ_ME/kg_DM - feed_DMC = 1.0000 # kg_DM/kg_FM - feed_OM = 0.9960 # kg/kg_DM - feed_OMd = 1.0000 # % - feed_CP = 0.7450 # kg/kg_DM - feed_CPd = 1.0000 # % - feed_NDF = 0.0000 # kg/kg_DM - feed_ST = 0.0000 # kg/kg_DM - feed_STd = 0.0000 # % - feed_EE = 0.0000 # kg/kg_DM -} -feed{ # Urea - # Type of feed: COMPLEMENT - # Maximum incorporation in diet: 5 %FM - # Representative INRA feed: CV0020 Urea - name = CPL.URE - type = ingredient - feed_eD = 3.3890 # MJ_ME/kg_DM - feed_DMC = 0.9940 # kg_DM/kg_FM - feed_OM = 1.0000 # kg/kg_DM - feed_OMd = 0.9900 # % - feed_CP = 2.8700 # kg/kg_DM - feed_CPd = 1.0000 # % - feed_NDF = 0.0000 # kg/kg_DM - feed_ST = 0.0000 # kg/kg_DM - feed_STd = 0.0000 # % - feed_EE = 0.0000 # kg/kg_DM -} -feed{ # Molasses - # Type of feed: COMPLEMENT - # Maximum incorporation in diet: 10 %FM - # Representative INRA feed: CP0170 Beet molasses - name = CPL.MOL - type = ingredient - feed_eD = 9.7906 # MJ_ME/kg_DM - feed_DMC = 0.7390 # kg_DM/kg_FM - feed_OM = 0.8660 # kg/kg_DM - feed_OMd = 0.8250 # % - feed_CP = 0.1000 # kg/kg_DM - feed_CPd = 0.5800 # % - feed_NDF = 0.0015 # kg/kg_DM - feed_ST = 0.0000 # kg/kg_DM - feed_STd = 0.0000 # % - feed_EE = 0.0070 # kg/kg_DM -} -feed{ # Beet pulp - # Type of feed: COMPLEMENT - # Maximum incorporation in diet: 10 %FM - # Representative INRA feed: CP0020 Pressed beet pulp - name = CPL.PLP - type = ingredient - feed_eD = 11.5046 # MJ_ME/kg_DM - feed_DMC = 0.4503 # kg_DM/kg_FM - feed_OM = 0.9243 # kg/kg_DM - feed_OMd = 0.8367 # % - feed_CP = 0.0913 # kg/kg_DM - feed_CPd = 0.6470 # % - feed_NDF = 0.4827 # kg/kg_DM - feed_ST = 0.0047 # kg/kg_DM - feed_STd = 0.5467 # % - feed_EE = 0.0097 # kg/kg_DM -} -feed{ # Milk - # Type of feed: COMPLEMENT - # Maximum incorporation in diet: 100 %FM - # Representative INRA feed: CL0020 Whole milk powder - name = CPL.MLK - type = ingredient - feed_eD = 18.8280 # MJ_ME/kg_DM - feed_DMC = 0.9600 # kg_DM/kg_FM - feed_OM = 0.9350 # kg/kg_DM - feed_OMd = 0.9400 # % - feed_CP = 0.2540 # kg/kg_DM - feed_CPd = 0.7800 # % - feed_NDF = 0.0000 # kg/kg_DM - feed_ST = 0.0000 # kg/kg_DM - feed_STd = 0.0000 # % - feed_EE = 0.2510 # kg/kg_DM -} -feed{ # Oil - # Type of feed: COMPLEMENT - # Maximum incorporation in diet: 5 %FM - # Representative INRA feed: CG0050 Soybean oil - name = CPL.OIL - type = ingredient - feed_eD = 36.6937 # MJ_ME/kg_DM - feed_DMC = 0.9980 # kg_DM/kg_FM - feed_OM = 0.9995 # kg/kg_DM - feed_OMd = 0.8900 # % - feed_CP = 0.0000 # kg/kg_DM - feed_CPd = 0.0000 # % - feed_NDF = 0.0000 # kg/kg_DM - feed_ST = 0.0000 # kg/kg_DM - feed_STd = 0.0000 # % - feed_EE = 0.9992 # kg/kg_DM -} - - -