示例#1
0
文件: Plan.cs 项目: zfx1982/ATSPM
        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);
                }
            }
        }
示例#2
0
文件: Plan.cs 项目: zfx1982/ATSPM
        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);
                }
            }
        }
示例#3
0
 public void AddDetectorData(DetectorDataPoint ddp)
 {
     DetectorEvents.Add(ddp);
 }
示例#4
0
文件: Cycle.cs 项目: zfx1982/ATSPM
 public void AddPreempt(DetectorDataPoint ddp)
 {
     preemptCollection.Add(ddp);
 }
示例#5
0
文件: Cycle.cs 项目: zfx1982/ATSPM
 public void AddDetector(DetectorDataPoint ddp)
 {
     detectorCollection.Add(ddp);
 }