Example #1
0
        private void RunRefill()
        {
            SetTestingTime();
            WorldTime.TenMinutesInRealMilliSeconds = 1000 / _timeaccelerate;
            RunTime();
            _refillwindow.RunClock();
            Pricing.Margin      = _marginpercentage;
            Pricing.Coefficient = 1.0 / _timeaccelerate;
            AGAM = new AutoGenerationAndManagement(_numberdispensers, _maximumautosinqueue, _marginpercentage, _timeinterval, _refillwindow);
            ListDispenserAndDequeue ListDAQ = new ListDispenserAndDequeue(_numberdispensers, _refillwindow);

            AGAM.GenerateAutos();
        }
Example #2
0
 private void CheckReadyProperty()
 {
     foreach (QueueOnRefill q in ListDispenserAndDequeue.GetQueueList())
     {
         Auto[] temp = q.ToArray();
         for (int i = 0; i < temp.Length; i++)
         {
             if (i > 0 && temp[i - 1].Ready != temp[i].Ready)
             {
                 temp[i - 1].Ready = true;
                 temp[i].Ready     = true;
             }
         }
     }
 }
Example #3
0
        private int AssessmentOfSituation(Auto auto)
        {
            List <QueueOnRefill> tempQueue = ListDispenserAndDequeue.GetQueueList();
            List <Dispenser>     tempDisp  = ListDispenserAndDequeue.GetDispList();
            int MinimumAutoInQueue         = 10;
            int WhereMinimumAutoInQueue    = 10;

            for (int i = 0; i < tempDisp.Count; i++)
            {
                if (tempDisp[i].Has(auto))
                {
                    if (tempQueue[i].NumberOfAuto < _maximumautosinqueue && tempQueue[i].NumberOfAuto < MinimumAutoInQueue)
                    {
                        MinimumAutoInQueue      = tempQueue[i].NumberOfAuto;
                        WhereMinimumAutoInQueue = i;
                    }
                }
            }
            return(WhereMinimumAutoInQueue);
        }