Esempio n. 1
0
        public List <Line> GetTabulatedLines(List <double> quantity, double lastTime, double t, int queueLength, int periodData, int predictSteps,
                                             int maxCashbox, double serviceTime, bool infiniteQueue, bool limitedQueue, bool limitedTime)
        {
            List <Line>   lines         = new List <Line>();
            List <double> result        = new List <double>();
            QueuingSystem queuingSystem = new QueuingSystem();

            chQueuingSystems = new List <СharacteristicsQueuingSystem>();
            STM    = new SeasonalTrendModel();
            result = STM.Forecast(quantity, periodData, predictSteps);


            for (int i = 0; i < result.Count; i++)
            {
                lastTime++;
                if (lastTime >= 24)
                {
                    lastTime = 0;
                }
                if (limitedQueue)
                {
                    chQueuingSystems.Add(queuingSystem.MultiChannelLimitedQueue(1 / serviceTime, result[i] / 60, maxCashbox, queueLength));
                }
                else if (infiniteQueue)
                {
                    chQueuingSystems.Add(queuingSystem.MultiChannelInfiniteQueue(1 / serviceTime, result[i] / 60, maxCashbox));
                }
                else
                {
                    chQueuingSystems.Add(queuingSystem.MultiChannelLimitedQueueAndTime(1 / serviceTime, result[i] / 60, maxCashbox, queueLength, t));
                }

                lines.Add(new Line(i + 1, lastTime.ToString() + ":00", result[i].ToString(), chQueuingSystems.Last().n().ToString()));
            }

            return(lines);
        }
Esempio n. 2
0
 public BusinessLogic()
 {
     chQueuingSystems = new List <СharacteristicsQueuingSystem>();
     STM = new SeasonalTrendModel();
 }