Example #1
0
        private void GenerateRandomLot(CSSLEvent e)
        {
            while (toyFab.CurrentWIP < TargetWIP)
            {
                string randomPT = productTypes[rnd.Next(productTypes.Length)];

                Lot newLot = new Lot(GetTime, toyFab.Sequences[randomPT]);

                toyFab.HandleGeneration(newLot);

                newLot.SendToNextWorkStation();
            }
        }
Example #2
0
        public void HandleDeparture(CSSLEvent e)
        {
            Lot lot = LotInService;

            if (!lot.HasNextStep)
            {
                lot.EndTime = GetTime;
                NotifyObservers(this);
                ToyFab.HandleDeparture(lot);
            }

            LotInService            = null;
            StartTimeCurrentService = -1;

            lot.SendToNextWorkStation();

            ScheduleEvent(GetTime, HandleDispatchRequest);
        }