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); } } }
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); } } }
public void AddDetectorData(DetectorDataPoint ddp) { DetectorEvents.Add(ddp); }
public void AddPreempt(DetectorDataPoint ddp) { preemptCollection.Add(ddp); }
public void AddDetector(DetectorDataPoint ddp) { detectorCollection.Add(ddp); }