Example #1
0
 public void Recycle()
 {
     Release();
     foreach (var chain in TripChains)
     {
         chain.Recycle();
     }
     foreach (var chain in AuxTripChains)
     {
         chain.Recycle();
     }
     TripChains.Clear();
     AuxTripChains.Clear();
 }
Example #2
0
        public void PopulateData(ITashaPerson person)
        {
            IterationSuccessful = true;
            TripChains.AddRange(person.TripChains);
            TripChains.AddRange(person.AuxTripChains);
            //setting this persons trip chains for this iteration

            foreach (var tc in TripChains)
            {
                foreach (var t in tc.Trips)
                {
                    TripModes.Add(t, t.Mode);
                }
            }
        }
Example #3
0
        public void Recycle()
        {
            Release();
            var chain = TripChains;

            for (int i = 0; i < chain.Count; i++)
            {
                chain[i].Recycle();
            }
            chain = AuxTripChains;
            for (int i = 0; i < chain.Count; i++)
            {
                chain[i].Recycle();
            }
            TripChains.Clear();
            AuxTripChains.Clear();
            if (People.Count < 100)
            {
                People.Add(this);
            }
        }