StockFunctions module¶
author: Young
- AfoLogic.StockFunctions.f_birthweight_cs(cx, w_b_yatf, w_f_dams, period_is_birth)¶
- AfoLogic.StockFunctions.f_birthweight_mu(cu1, cb1, cg, cx, ce, w_b, cf_w_b_dams, ffcfw_birth_dams, ebg_dams, days_period, gest_propn, period_between_joinscan, period_between_scanbirth, period_is_birth)¶
- AfoLogic.StockFunctions.f_chill_cs(cc, ck, ffcfw_start, rc_start, sl_start, mei, hp_total, meme, new, km, kg_supp, kg_fodd, kw, mei_propn_supp, mei_propn_herb, temp_ave, temp_max, temp_min, ws, rain_p1, index_m0, mei_propn_milk=0, nec=0, kc=1, nel=0, kl=1, gest_propn=0, lact_propn=0)¶
Calculate the impact of heat loss to the environment on the ME required for maintenance. CSIRO calculation uses lower critical temperature
- AfoLogic.StockFunctions.f_conception_cs(cf, cb1, relsize_mating, rc_mating, cpg_doy, nfoet_b1any, nyatf_b1any, period_is_mating, rev_trait_value, saa_rr, sam_rr)¶
‘ Calculation of dam conception using CSIRO equation system
Conception is the change in the numbers of animals in each slice of e & b as a proportion of the numbers in the NM slice (e[0]b[0]). The adjustment of the actual numbers occurs in f1_period_end_nums(). This function calculates the change in the proportions (the total should add to 0)
The general approach is to calculate the probability of conception greater than or equal to 1,2,3 foetuses Probability is calculated from a sigmoid relationship based on relative size * relative condition at joining The estimation of cumulative probability is scaled by a factor that varies with day of year that changes with litter size & latitude. The probability is an estimate of the number of dams carrying that number in the third trimester (or birth). Some dams conceive (and don’t return to service) but don’t carry to the third trimester due to abortion, this is taken into account. The values are altered by a sensitivity analysis on scanning percentage Conception (proportion of dams that are dry) and litter size (number of foetuses per pregnant dam) can be controlled for relative economic values
- Parameters:
cf –
cb1 – GrazPlan parameter stating the probability of conception with different number of foetuses.
relsize_mating – Relative size at mating. This is a separate variable to relsize_start because mating may occur mid-period. Note: the e and b axis have been handled before passing in.
rc_mating – Relative condition at mating. This is a separate variable to rc_start because mating may occur mid-period. Note: the e and b axis have been handled before passing in.
cpg_doy – A scalar for the proportion of dry, single, twins & triplets based on day of the year.
nfoet_b1any –
nyatf_b1any –
period_is_mating –
rev_trait_value –
saa_rr –
sam_rr –
- Returns:
Dam conception.
- AfoLogic.StockFunctions.f_conception_ltw(cf, cu0, relsize_mating, cs_mating, scan_std, doy_p, rr_doy, nfoet_b1any, nyatf_b1any, period_is_mating, rev_trait_value)¶
Conception is the change in the numbers of animals in each slice of e & b as a proportion of the numbers in the NM slice (e[0]b[0]). The adjustment of the actual numbers occurs in f1_period_end_nums() This function calculates the change in the proportions (the total should add to 0)
LTW system: The general calculation is scanning percentage is defined by a linear function of CS The standard value (CS 3) is determined by the genotype, relative size and adjusted based on day of the year. The slope with which RR is adjusted if CS is different from CS3 varies with day of year. The proportion of dry, single, twin & triplet is estimated as a function of the scanning percentage using f1_DSTw The proportion of ewes that implant but don’t retain to the third trimester is accounted for. Note: sa is not applied in this function because it is applied to the input scan_std (which is also used to determine the BTRT effect on fleece)
- Parameters:
relsize_mating – Relative size at mating. This is a separate variable to relsize_start because mating may occur mid-period. Note: the e and b axis have been handled before passing in.
cs_mating – Condition score at mating. Note: the e and b axis have been handled before passing in.
rr_doy – A scalar for reproductive rate based on day of the year. Based on GrazPlan cpg_doy relationship
- AfoLogic.StockFunctions.f_conception_mu2(cf, cb1, cu2, srw, maternallw_mating, lwc, age, nlb, doj, doj2, cs, lat, nfoet_b1any, nyatf_b1any, period_is_mating, rev_trait_value, saa_rr, sam_rr, saa_ls, saa_con, saa_preg_increment)¶
‘ Calculation of dam conception using a back transformed logistic function. Using coefficients developed in Murdoch University trials that mated for 2 cycles.
Conception is represented in the code as a change in the numbers of animals in each slice of e & b as a proportion of the numbers in the NM slice (e[0]b[0]). The adjustment of the actual numbers occurs in f1_period_end_nums() This function calculates the change in the proportions (the total should add to 0)
The general approach is to calculate the probability of conception less than or equal to 1,2,3 foetuses similar to f_conception_cs() except LMAT is “less than” and probability is calculated from a back transformed calculation with linear and quadratic terms. The calculation includes terms for LW at joining, Age at joining and LW change during joining. The estimation of cumulative probability as fitted in the LMAT trial is scaled by a day of joining factor. The probability is an estimate of the number of dams carrying that number of young to birth if mated for the number of cycles assessed in the trial. The parameters could be altered to represent a single cycle however this correction hasn’t been made (as of Apr 2022) and the adjustment is made in this function. Some dams conceive (and don’t return to service) but don’t carry to birth (the third trimester) due to abortion during pregnancy, this is taken into account. #todo The conversion of the prediction from 2 cycles back to one cycle doesn’t include this loss # which then increases the proportion of empty ewes and reduces the expected RR. # The correction has been removed for now. The values are altered by a sensitivity analysis on scanning percentage, litter size and conception Conception (proportion of dams that are dry) and litter size (number of foetuses per pregnant dam) can be controlled for relative economic values
- Parameters:
cf – Includes parameter for number of ewes that implant but don’t retain to birth (the 3rd trimester).
cb1 – Cut-off parameter for the probability of conception with different number of foetuses (remember the NM slice in b1)
cu2 – LMAT parameters controlling impact of LWJ, LWC during joining, NLB, Age at joining
srw – Standard reference weight of the dam genotype, not including the adjustment associated with BTRT
maternallw_mating – Maternal LW at mating. Allows that mating may occur mid-period. Note: the e and b axis have been handled before passing in.
lwc – Liveweight change of the dam during the generator period in g/hd/d.
age – age of dam mid-period in days. Indexed for p. The i axis can be non-singleton
nlb – Number of lambs born ASBV - mid-parent average (achieved by using nlb_g3).
doj – The average day of joining for the dams mated in this oestrus cycle. This represents seasonality of reproduction
doj2 – The average of the square of the day of joining for the dams mated in this oestrus cycle. This represents seasonality of reproduction
lat – Latitude of the location (in degrees). Which affects reproduction. Calibrated for range -28.5 to -34.6 (although it should work down to -37.6 for Hamilton)
nfoet_b1any – Number of foetuses = number of lambs born
nyatf_b1any – Number of lambs surviving the peri-natal period.
period_is_mating – Dams are mated in this generator period
rev_trait_value –
saa_rr –
sam_rr – combine sam on reproductive rate
saa_con – SA on the proportion empty
saa_ls – SA on litter size
saa_preg_increment –
- Returns:
Dam conception. Proportion of dams that conceive 0,1,2 or 3 for this oestrus cycle. Conceiving 0 means falls pregnant but loses the embryo after the joining period has ended (so can’t be remated)
- AfoLogic.StockFunctions.f_egraze(cm, lw, i_steepness, density, foo, confinement, intake_f, dmd)¶
Extra energy required for eating paddock feed than an equivalent feed in a pen (walking, chewing and ruminating) Energy required for walking around the paddock is estimated from distance being a function of feed available Low quality paddock feed is likely to be longer fibre length which might increase the energy to chew and ruminate.
The Aust feeding standards have a comment: For animals given feed in pens or yards it can generally be assumed that graze = 0.
- AfoLogic.StockFunctions.f_energy_cs(cx, cm, lw, ffcfw, mr_age, mei, km, i_steepness, density, foo, confinement, intake_f, dmd, mei_propn_milk=0, sam_mr=1)¶
- AfoLogic.StockFunctions.f_energy_mu(cx, cm, lw, lean, mr_age, mei, km, i_steepness, density, foo, confinement, intake_f, dmd, mei_propn_milk=0)¶
- AfoLogic.StockFunctions.f_energy_nfs(cm, cg, lw, fat, muscle, viscera, mei, km, i_steepness, density, foo, confinement, intake_f, dmd, mei_propn_milk=0)¶
Heat production associated with maintenance (fasting heat production and heat associated with feeding) & efficiency
- AfoLogic.StockFunctions.f_fibre_cs(cw_g, cc_g, ffcfw_start_g, relsize_start_g, d_cfw_history_start_p2g, mei_g, new_min_g, d_cfw_ave_g, sfd_a0e0b0xyg, wge_a0e0b0xyg, af_cfw_g, af_fd_g, dlf_wool_g, kw_g, days_period_g, age, sfw_ltwadj_g, sfd_ltwadj_g, rev_trait_value, nec_g1=0, kc_g1=1, nel_g1=0, kl_g1=1, gest_propn_g1=0, lact_propn_g1=0, sam_pi=1)¶
- AfoLogic.StockFunctions.f_fibre_mu(cw_g, cc_g, ffcfw_start_g, relsize_start_g, d_cfw_history_start_p2g, mei_g, new_min_g, d_cfw_ave_g, sfd_a0e0b0xyg, wge_a0e0b0xyg, af_cfw_g, af_fd_g, dlf_wool_g, kw_g, days_period_g, age, sfw_ltwadj_g, sfd_ltwadj_g, rev_trait_value, nec_g1=0, kc_g1=1, nel_g1=0, kl_g1=1, gest_propn_g1=0, lact_propn_g1=0, sam_pi=1)¶
- AfoLogic.StockFunctions.f_fibre_nfs(cw_g, cc_g, cg_g, ck_g, ffcfw_start_g, relsize_start_g, d_cfw_history_start_p2g, mei_g, new_min_g, d_cfw_ave_g, sfd_a0e0b0xyg, wge_a0e0b0xyg, af_cfw_g, af_fd_g, dlf_wool_g, days_period_g, age, sfw_ltwadj_g, sfd_ltwadj_g, rev_trait_value, dc_g1=0, bc_g1=0, dl_g1=0, gest_propn_g1=0, lact_propn_g1=0, sam_pi=1)¶
- AfoLogic.StockFunctions.f_foetus_cs(cb1, cp, nfoet, rc_start, w_b_std_y, w_b_exp_y, w_f_start, nw_f_start, guw_start, nwf_age_f, guw_age_f, dce_age_f, rev_trait_value)¶
- Parameters:
cb1 – Numpy array, sim parameters - parameters altered by LSLN (b1 axis).
cp – Numpy array, sim parameters - pregnancy requirements.
kc – Efficiency of use of energy for gain foetal weight (includes the energy required for the whole of conceptus)
nfoet – number of foetus (across the b1 axis)
rc_start – relative condition of the dam at the start of the period
w_b_std_y – standard birth weight of lambs for a dam of this age
w_b_exp_y – expected birth weight of lambs accounting for dam relative condition
w_f_start – weight of the foetus at the start of the period
nw_f_start – normal weight of the foetus at the start of the period
nwf_age_f – multiplier of BW to generate the normal weight of the foetus by age
guw_age_f – multiplier of BW to generate the normal weight of the conceptus by age (gravid uterus)
dce_age_f – multiplier of BW to generate the energy content of the conceptus on day 1 of pregnancy
rev_trait_value – Dictionary of the production levels for the sheep class and period
- Returns:
- AfoLogic.StockFunctions.f_foetus_nfs(cg, cp, step, c_start, muscle_start, d_muscle, nfoet, w_b_exp_y, w_f_start, guw_start, nwf_age_f, guw_age_f, dcdt_age_f, gest_propn, rev_trait_value)¶
- Parameters:
cg – Numpy array, sim parameters - weight change.
cp – Numpy array, sim parameters - pregnancy requirements.
step – number of days gestating in the generator period
c_start – energy in the foetus at the start of the period
muscle_start – muscle weight at the start of the period
d_muscle – change in muscle mass during the previous period (can’t use current period because not calculated yet)
nfoet – number of foetus (across the b1 axis)
w_b_exp_y – expected birth weight of lambs accounting for dam relative condition
w_f_start – weight of the foetus at the start of the period
nwf_age_f – multiplier of BW to generate the normal weight of the foetus by age
guw_age_f – multiplier of BW to generate the normal weight of the conceptus by age (gravid uterus)
dcdt_age_f – multiplier of conceptus energy content to generate the increase in energy content by age
bc – parameter for hp from gaining conceptus weight (like kc except accounts for HAF (heat associated with feeding))
gest_propn – Numpy array, optional, Proportion of the period that the dam is gestating. The default is 0.
rev_trait_value – Dictionary of the production levels for the sheep class and period
- Returns:
- AfoLogic.StockFunctions.f_heat_cs(cc, ck, mei, mem, new, km, kg_supp, kg_fodd, kw, mei_propn_supp, mei_propn_herb, guw=0, mei_propn_milk=0, nec=0, kc=1, nel=0, kl=1, gest_propn=0, lact_propn=0)¶
- AfoLogic.StockFunctions.f_heatloss_nfs(cc, ffcfw_start, rc_start, sl_start, temp_ave, temp_max, temp_min, ws, rain_p1, index_m0)¶
- AfoLogic.StockFunctions.f_husbandry(head_adjust, mobsize_pg, o_ffcfw_tpg, o_cfw_tpg, operations_triggerlevels_h5h7h2tpg, index_pg, age_start, period_is_shear_pg, period_is_wean_pg, gender, o_ebg_tpg, wool_genes, husb_operations_muster_propn_h2tpg, husb_requisite_cost_h6tpg, husb_operations_requisites_prob_h6h2tpg, operations_per_hour_l2h2tpg, husb_operations_infrastructurereq_h1h2tpg, husb_operations_contract_cost_h2tpg, husb_muster_requisites_prob_h6h4tpg, musters_per_hour_l2h4tpg, husb_muster_infrastructurereq_h1h4tpg, a_t_g=array([0]), a_nyatf_b1g=0, period_is_joining_pg=False, animal_mated=False, scan_option=0, period_is_endmating_pg=False, dtype=None)¶
- AfoLogic.StockFunctions.f_insulation(cc, ffcfw_start, rc_start, sl_start, ws, rain_p1, index_m0)¶
- AfoLogic.StockFunctions.f_intake(pi, ri, md_herb, confinement, intake_s, i_md_supp, mp2=0)¶
- AfoLogic.StockFunctions.f_lwc_cs(cg, rc_start, mei, mem, new, zf1, zf2, kg, kw, rev_trait_value, nec=0, kc=1, nel=0, kl=1, gest_propn=0, lact_propn=0)¶
- AfoLogic.StockFunctions.f_lwc_mu(cg, ck, rc_start, mei_initial, nem_ee, km, hp_mei, new, kw, zf1, zf2, heat_loss_m0p1, age, rev_trait_value, days_period, b_mask=1, nec=0, kc=1, nel=0, kl=1, gest_propn=0, lact_propn=0, mei_propn_milk=0, sam_kg=1, scenario='-')¶
- AfoLogic.StockFunctions.f_lwc_nfs(cg, ck, muscle, viscera, muscle_target, mei_initial, km, md, hp_maint, hp_mei, dw, heat_loss_m0p1, step, rev_trait_value, dc=0, bc=0, dl=0, gest_propn=0, lact_propn=0)¶
- AfoLogic.StockFunctions.f_milk_cs(cl, srw, relsize_start, rc_birth_start, mei, meme, rc_start, ffcfw75_exp_yatf, lb_start, ldr_start, age_yatf, mp_age_y, mp2_age_y, i_x_pos, days_period_yatf, kl, lact_nut_effect, rev_trait_value)¶
- AfoLogic.StockFunctions.f_milk_nfs(cl, srw, relsize_start, rc_birth_start, mei, hp_maint, rc_start, ffcfw75_exp_yatf, lb_start, ldr_start, age_yatf, mp_age_y, mp2_age_y, i_x_pos, days_period_yatf, lact_nut_effect, rev_trait_value)¶
- AfoLogic.StockFunctions.f_mortality_base_cs(cd, cg, rc_start, cv_weight, ebg_start, sd_ebg, d_nw_max, days_period, age, rev_trait_value, sap_mortalityb, saa_mortalityb, saa_rev_mortalityb)¶
- AfoLogic.StockFunctions.f_mortality_base_mu(cd, cg, rc_start, cv_weight, ebg_start, sd_ebg, d_nw_max, days_period, age, rev_trait_value, sap_mortalityb, saa_mortalityb, saa_rev_mortalityb)¶
- Parameters:
cd –
cg –
rc_start –
cv_weight –
ebg_start –
sd_ebg –
d_nw_max –
days_period –
age – age of animal mid period (used to determine the age stage of the animal for rev)
rev_trait_value –
sap_mortalityb –
saa_mortalityb –
saa_rev_mortalityb –
- Returns:
- AfoLogic.StockFunctions.f_mortality_dam_EL(cu6, cb1, cf_value, lw, lwc, cv_lw, nfoet_b1, days_period, saa_mortalitye, is_mating, is_prebirth, between_mated90, between_d90birth)¶
Peri natal Dam mortality of ewe lambs due to: LW at birth, LW change during pregnancy & birth type. The mortality is incurred at the pre-birth period and can’t be incurred each period because of the back transformation.
- AfoLogic.StockFunctions.f_mortality_dam_cs()¶
Peri natal (at birth) Dam mortality. Currently, the CSIRO system includes dam mortality due to PregTox (f_mortality_pregtox_cs) and dam mortality due to dystocia (included in f_mortality_progeny_cs) but there is no calculation of deaths from other causes, such as those that might affect twin & triplet bearing dams at birth.
- AfoLogic.StockFunctions.f_mortality_dam_mu(cu2, ce, cb1, cs, cv_cs, period_is_birth, nfoet_b1, saa_mortalitye)¶
- AfoLogic.StockFunctions.f_mortality_dam_mu2(cu2, ce, cb1, cf_csc, csc, cs, cv_cs, period_between_scanprebirth, period_is_prebirth, nfoet_b1, days_period, saa_mortalitye)¶
Peri natal Dam mortality due to: CS at birth, CS change scanning to pre lambing, birth type & age of the dam. The mortality is incurred at the pre-birth period and can’t be incurred each period because of the back transformation.
- AfoLogic.StockFunctions.f_mortality_pregtox_cs(cb1, cg, nw_start, ebg, sd_ebg, days_period, period_is_pregtox, gest_propn, saa_mortalitye)¶
(Twin) Dam mortality in last 6 weeks (preg tox). This increments mortality associated with LWL in the base mortality function.
Preg tox is short for pregnancy toxaemia. It is associated with ketosis where the ewe switches into burning fat (rather than carbohydrates) because they are losing weight. It is predominantly a problem for multiple bearing ewes because they have the highest energy demands close to lambing and the least capacity to eat more (because stomach capacity is restricted due to the volume of the conceptus). It is usually also more of a problem for ewes that start out in better condition.
- AfoLogic.StockFunctions.f_mortality_pregtox_mu(cb1, cg, nw_start, ebg, sd_ebg, days_period, period_is_pregtox, gest_propn)¶
Mortality of multiple bearing dams in late pregnancy. This increments mortality associated with LWL in the base mortality function.
This is a copy of the CSIRO function except that the period has been reduced because the MU relationships include ewe mortality associated with loss of CS from scanning to pre-lambing (about day 135). The CSIRO Preg Tox relationship is only active after that point instead of for the full 6 week period in f_mortality_pregtox_cs(). The saa on ewe mortality has been removed because it has been applied in the pre-lambing calculation.
Preg tox is short for pregnancy toxaemia. It is associated with ketosis where the ewe switches into burning fat (rather than carbohydrates) because they are losing weight. It is predominantly a problem for multiple bearing ewes because they have the highest energy demands close to lambing and the least capacity to eat more (because stomach capacity is restricted due to the volume of the conceptus). It is usually also more of a problem for ewes that start out in better condition.
- AfoLogic.StockFunctions.f_mortality_progeny_EL(cu6, cb1, cx, cf_value, lw, lwc, cv_lw, foo, chill_index_p1, mob_size, days_period, rev_trait_value, sap_mortalityp, saa_mortalityx, is_mating, is_birth, between_mated90, between_d90birth)¶
Calculate the mortality of progeny at birth due to mis-mothering and exposure using the equations developed in P.PSH.1180 – More lambs from ewes lambs through developing and extending best practice Chill index, FOO and mob size were added using other data. Calculates twin lamb survival from proportion of twin ewes lactating.
- AfoLogic.StockFunctions.f_mortality_progeny_cs(cd, cb1, w_b, rc_birth, cv_weight, w_b_exp_y, period_is_birth, chill_index_p1, nfoet_b1, rev_trait_value, sap_mortalityp, saa_mortalityx)¶
Progeny losses due to large progeny or slow birth process (dystocia)
Dystocia definition is a difficult birth that leads to brain damage, which can be due to physical trauma but also lack of oxygen. The difficult birth can be a larger single lamb, however, it is also quite prevalent in twins due to a slow birth because the ewe is lacking energy to push.
- AfoLogic.StockFunctions.f_mortality_progeny_mu(cu2, cb1, cx, ce, w_b, w_b_std, cv_weight, foo, chill_index_p1, mob_size, period_is_birth, rev_trait_value, sap_mortalityp, saa_mortalityx)¶
Calculate the mortality of progeny at birth due to mis-mothering and exposure using the LTW & LMAT prediction equations (Oldham et al. 2011) with inclusion of chill index, FOO and mob size. Uses BW as a proportion of SRW (which is passed as the w_b argument)
# Removed - The paddock level scalar is added (Young et al 2011) however, this is not calibrated for high chill environments (>1000) # The scalar adjusts the difference in survival if birth weight is different from the standard birthweight # this is to reflect the difference in survival observed in the LTW paddock trial compared with the plot scale trials.
- AfoLogic.StockFunctions.f_mortality_weaner_cs(cd, cg, age, ebg_start, sd_ebg, d_nw_max, days_period)¶
- AfoLogic.StockFunctions.f_mortality_weaner_mu(cu2, ce=0)¶
- AfoLogic.StockFunctions.f_potential_intake_cs(ci, srw, relsize_start, rc_start, temp_lc, temp_ave, temp_max, temp_min, rain_intake, rev_trait_value, rc_birth_start=1, pi_age_y=0, lb_start=0, piyf=1, period_between_birthwean=1, sam_pi=1)¶
- Parameters:
ci: srw: relsize_start: rc_start: temp_lc: temp_ave: temp_max: temp_min: rain_intake: rev_trait_value: Dictionary of the production levels for the sheep class and period rc_birth_start: pi_age_y: lb_start: piyf: period_between_birthwean: sam_pi: sensitivity multiplier on PI. Applied as an intermediate SAM so that it can be differentially applied by age
- Return:
pi: daily potential intake
- AfoLogic.StockFunctions.f_potential_intake_mu(srw)¶
- AfoLogic.StockFunctions.f_progenycfw_mu(cu1, cg, cfw_adj, cf_cfw_dams, ffcfw_birth_dams, ffcfw_birth_std_dams, ebg_dams, days_period, gest_propn, period_between_mated90, period_between_d90birth, period_is_birth)¶
- AfoLogic.StockFunctions.f_progenyfd_mu(cu1, cg, fd_adj, cf_fd_dams, ffcfw_birth_dams, ffcfw_birth_std_dams, ebg_dams, days_period, gest_propn, period_between_mated90, period_between_d90birth, period_is_birth)¶
- AfoLogic.StockFunctions.f_sale_value(cn, cx, o_rc_tpg, o_ffcfw_tpg, dressp_adj_yg, dresspercent_adj_s6tpg, dresspercent_adj_s7tpg, grid_price_s7s5s6tpg, price_scalar_c1s7tpg, month_scalar_s7tpg, month_discount_s7tpg, price_type_s7tpg, cvlw_s7s5tpg, cvscore_s7s6tpg, grid_weightrange_s7s5tpg, grid_scorerange_s7s6tpg, age_end_pg1, discount_age_s7tpg, sale_cost_pc_s7tpg, sale_cost_hd_s7tpg, mask_s7x_s7tpg, sale_agemax_s7tpg1, sale_agemin_s7tpg1, sale_ffcfw_min_s7tpg, sale_ffcfw_max_s7tpg, mask_s7g_s7tpg, rev_trait_value, dtype=None)¶
- AfoLogic.StockFunctions.f_sire_req(sire_propn_a1e1b1nwzida0e0b0xyg1g0, sire_periods_g0p8, i_sire_recovery, date_end_p, period_is_prejoin_a1e1b1nwzida0e0b0xyg1)¶
- AfoLogic.StockFunctions.f_templc(cc, ffcfw_start, rc_start, sl_start, hp_total, temp_ave, temp_max, temp_min, ws, rain_p1, index_m0)¶
- AfoLogic.StockFunctions.f_treatment_unit_numbers(head_adjust, mobsize_pg, o_ffcfw_pg, o_cfw_pg, a_nyatf_b1g=0)¶
- AfoLogic.StockFunctions.f_wbe_mu(cg, fat, muscle, viscera=0)¶
- AfoLogic.StockFunctions.f_weanweight_cs(cg, cn, ebw_w_yatf, ffcfw_start_yatf, nyatf, srw, md, period_is_wean, eqn_system)¶
Calculates the weight at weaning from the ffcfw_yatf at the start of the period plus any growth during the period. Weaning occurs at the start of the period so there is no growth during the period when period_is_wean. Returns empty body weight of the weaner using the conversion function Note: ebw has not been calculated for yatf prior to weaning because the conversion isn’t accurate
- AfoLogic.StockFunctions.f_weanweight_mu(cb1, ce, cg, cn, cu1, cx, nyatf, ebw_w, cf_w_w_dams, ffcfw_wean_dams, ebg_dams, srw, md, foo, foo_ave_start, days_period, day_of_lactation, period_between_joinscan, period_between_scanbirth, period_between_birthwean, period_is_wean, eqn_system)¶
- AfoLogic.StockFunctions.f_wool_hauteur(fd, sl, ss, vm, pmb, cvfd=0.22, cvsl=0.18)¶
Calculate predicted hauteur, CVH & romaine using the selected equation option: CSIRO, TEAM 1, TEAM2 & TEAM3
- AfoLogic.StockFunctions.f_wool_sl(fd_pg, sl_pg)¶
Calculate price scalar for sl See AFO SS & SL.xlsx for the derivation of the parameters The discounts for SL is assumed to be zero in the optimum range of SL between ‘bottom’ & ‘top’ The optimum range of SL across the range of FD is estimated using a bounded increasing exponential. The discount per mm above ‘top’ is ‘above’. The discount below ‘bottom’ is ‘below’. Note: slope_below is a positive value because it is the change in price per mm increase in SL At a threshold SL (threshold = 50mm) there is a ‘drop’ in the discount. Below the threshold the discount increases at the same rate as above the threshold. The slopes and the threshold_drop are adjusted for FD using a decreasing exponential (a & b) that was fitted with to data with 17u = 1 The exponential is scaled by the 17u value and bound in the range from ‘lower’ to ‘upper’ (the sensible range from the data)
- AfoLogic.StockFunctions.f_wool_ss(fd_pg, ss_pg)¶
Calculate price scalar for ss and sl See AFO SS & SL.xlsx for the derivation of the parameters The P&D for SS is assumed to be linear (slope) between a minimum value (min) and a maximum (max) The intercept is defined by the intersection with the x axis (ss_pd0) min, max & slope are adjusted for FD using a decreasing exponential (a & b) that was fitted with to data with 17u = 1 The exponential is scaled by the 17u value and bound in the range from ‘lower’ to ‘upper’ (the sensible range from the data)
- AfoLogic.StockFunctions.f_wool_value(stb_mpg_w4, wool_price_scalar_c1tpg, cfw_pg, fd_pg, sl_pg, ss_pg, vm_pg, pmb_pg, dtype=None)¶
Calculate the net value of the wool on the sheep’s back (cost of shearing is not included in these calculations) Includes adjusting price for FD, level of fault (VM & predicted hauteur) and all components of the clip (STB) FNF is ‘free or nearly free’ i.e. wool with no fault (low VM & high SS) STB is sweep the board i.e. including all the wool types that are produced (fleece, pieces, bellies …) NIB is net in the bank i.e. all selling, testing & freight costs removed
- AfoLogic.StockFunctions.f_ws_adjust(relative_ws_c, numbers_b1, dse_per_hd, nfoet_b1, scan, propn_carrying_capacity_c)¶
Calculate the adjustment of wind speed across the b1 axis based on differential allocation of single-, twin- and triplet-bearing dams to sheltered paddocks.
Assumes that the order of priority for allocation to sheltered paddocks is based on largest litter size. Differential allocation is dependent on the dams being scanned for multiples or litter size.
Assumes the offspring are in separate paddocks and not competing for sheltered paddocks.
Note: This code will not work for scanning for foetal age (Scan == 4). With Scan4 it is necessary to consider if the sheltered paddocks can be utilised for each lambing cycle.