Mercurial > repos > siwaa > insilicow
diff test-data/input/ALIEN/farmer-plan_ALIEN.txt @ 3:3fe3e1e6a40b draft default tip
"planemo upload for repository https://forgemia.inra.fr/insilicow/insilicow-tool commit b530a8209615f225696abe3e0ba49093ff3dc4ad"
author | siwaa |
---|---|
date | Mon, 25 Aug 2025 16:37:43 +0000 |
parents | |
children |
line wrap: on
line diff
--- /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 # +################################################################################################################# + +