/// <summary> /// Returns the valid fleece-free weight range associated with stock of a given /// age etc, along with expected basal weight assuming that the current weight /// /// is the highest weight reached so far(BWFA, or "base weight for age"). /// This is complicated in younger animals by the fact that a given condition /// score may be relative to any of a range of normal weights. /// </summary> /// <param name="mainParams"></param> /// <param name="BreedInfo"></param> /// <param name="iGenotype"></param> /// <param name="Repro"></param> public void ValidFFWeightRange(AnimalParamSet mainParams, SingleGenotypeInits[] BreedInfo, int iGenotype, GrazType.ReproType Repro, int AgeDays, double dLowBC, double dHighBC, out double LowWt, out double HighWt) { GrazType.ReproType[] SexRepro = { GrazType.ReproType.Castrated, GrazType.ReproType.Empty }; int[] MatureMonths = { 24, 36 }; AnimalParamSet Genotype; double MaxNormWt, MinNormWt; Genotype = stock.ParamsFromGenotypeInits(mainParams, BreedInfo, iGenotype); MaxNormWt = AnimalGroup.GrowthCurve(AgeDays, Repro, Genotype); if ((AgeDays < MatureAge[(int)Genotype.Animal]) && (dLowBC <= 1.0)) // Allow for the possibility of a sub- { MinNormWt = 0.7 * MaxNormWt; // optimal normal weight in young } else // animals { MinNormWt = MaxNormWt; } LowWt = MinNormWt * (dLowBC - 0.5 * BC_STEP); HighWt = MaxNormWt * (dHighBC + 0.499 * BC_STEP); if ((Repro == GrazType.ReproType.EarlyPreg) || (Repro == GrazType.ReproType.LatePreg)) // Allowance for conceptus in ewes & cows { HighWt = HighWt * 1.15; } }
/// <summary> /// Standard reference weight /// </summary> /// <param name="Repro"></param> /// <returns></returns> public double SexStdRefWt(GrazType.ReproType Repro) { if ((Repro == GrazType.ReproType.Castrated) || (Repro == GrazType.ReproType.Male)) { return(SRWScalars[(int)Repro] * BreedSRW); } else { return(BreedSRW); } }
/// <summary> /// Default fibre diameter as a function of age, sex, time since shearing and fleece weight /// </summary> /// <param name="Params"></param> /// <param name="iAgeDays"></param> /// <param name="Repr"></param> /// <param name="iFleeceDays"></param> /// <param name="fGFW"></param> /// <returns></returns> static public double DefaultMicron(Genotype Params, int iAgeDays, GrazType.ReproType Repr, int iFleeceDays, double fGFW) { double fPotFleece; if ((iFleeceDays > 0) && (fGFW > 0.0)) { fPotFleece = DefaultFleece(Params, iAgeDays, Repr, iFleeceDays); return(Params.MaxFleeceDiam * Math.Pow(fGFW / fPotFleece, Params.WoolC[13])); } else { return(Params.MaxFleeceDiam); } }
/// <summary> /// Default fleece weight as a function of age, sex and time since shearing /// </summary> /// <param name="Params"></param> /// <param name="iAgeDays"></param> /// <param name="Repr"></param> /// <param name="iFleeceDays"></param> /// <returns></returns> static public double DefaultFleece(Genotype Params, int iAgeDays, GrazType.ReproType Repr, int iFleeceDays) { double Result; double fMeanAgeFactor; iFleeceDays = Math.Min(iFleeceDays, iAgeDays); if ((Params.Animal == GrazType.AnimalType.Sheep) && (iFleeceDays > 0)) { fMeanAgeFactor = 1.0 - (1.0 - Params.WoolC[5]) * (Math.Exp(-Params.WoolC[12] * (iAgeDays - iFleeceDays)) - Math.Exp(-Params.WoolC[12] * iAgeDays)) / (Params.WoolC[12] * iFleeceDays); Result = Params.FleeceRatio * Params.SexStdRefWt(Repr) * fMeanAgeFactor * iFleeceDays / 365.0; } else { Result = 0.0; } return(Result); }
public ReproRecord(string name, GrazType.ReproType repro) { Name = name; Repro = repro; }