Ejemplo n.º 1
0
        private void AddPreemptData(List <Models.Controller_Event_Log> preemptEvents)
        {
            foreach (MOE.Common.Models.Controller_Event_Log row in preemptEvents)
            {
                var query = from item in CycleCollection
                            where item.StartTime <row.Timestamp && item.EndTime> row.Timestamp
                            select item;


                foreach (var pcd in query)
                {
                    DetectorDataPoint ddp = new DetectorDataPoint(pcd.StartTime, row.Timestamp,
                                                                  pcd.GreenEvent, pcd.EndTime);
                    pcd.AddPreempt(ddp);
                }
            }
        }
Ejemplo n.º 2
0
        private void AddDetectorData(List <Models.Controller_Event_Log> detectorEvents)
        {
            totalArrivalOnRed   = -1;
            totalVolume         = -1;
            totalGreenTime      = -1;
            totalArrivalOnGreen = -1;

            //TODO:This goes through all detector activations for each plan. It may be quicker to only
            //go through relevant detectors
            foreach (MOE.Common.Models.Controller_Event_Log row in detectorEvents)
            {
                var query = from item in CycleCollection
                            where item.StartTime <row.Timestamp && item.EndTime> row.Timestamp
                            select item;


                foreach (var pcd in query)
                {
                    DetectorDataPoint ddp = new DetectorDataPoint(pcd.StartTime, row.Timestamp,
                                                                  pcd.GreenEvent, pcd.EndTime);
                    pcd.AddDetector(ddp);
                }
            }
        }
Ejemplo n.º 3
0
 public void AddDetectorData(DetectorDataPoint ddp)
 {
     DetectorEvents.Add(ddp);
 }
Ejemplo n.º 4
0
 public void AddPreempt(DetectorDataPoint ddp)
 {
     preemptCollection.Add(ddp);
 }
Ejemplo n.º 5
0
 public void AddDetector(DetectorDataPoint ddp)
 {
     detectorCollection.Add(ddp);
 }