Beispiel #1
0
        /// <summary>
        /// Add a group of animals to the list                                           
        /// Returns the group index of the group that was added. 0->n                    
        /// </summary>
        /// <param name="aGroup"></param>
        /// <param name="PaddInfo"></param>
        /// <param name="iTagVal"></param>
        /// <param name="iPriority"></param>
        /// <returns></returns>
        public int Add(TAnimalGroup aGroup, TPaddockInfo PaddInfo, int iTagVal, int iPriority)
        {
            int Idx;

            aGroup.Calc_IntakeLimit();

            Idx = FStock.Length;
            Array.Resize(ref FStock, Idx + 1);
            FStock[Idx] = new TStockContainer();
            FStock[Idx].Animals = aGroup.Copy();
            FStock[Idx].PaddOccupied = PaddInfo;
            FStock[Idx].iTag = iTagVal;
            FStock[Idx].iPriority = iPriority;

            setInitialStockInputs(Idx);
            return Idx;
        }
Beispiel #2
0
 /// <summary>
 /// Calculate the intake limit
 /// </summary>
 /// <param name="aGroup"></param>
 public void computeIntakeLimit(TAnimalGroup aGroup)
 {
     aGroup.Calc_IntakeLimit();
     if (aGroup.Young != null)
         aGroup.Young.Calc_IntakeLimit();
 }