Exemple #1
0
        private void GetSignalPhaseData(DateTime startDate, DateTime endDate, bool showVolume, int binSize, bool usePermissivePhase)
        {
            DateTime redLightTimeStamp = DateTime.MinValue;

            MOE.Common.Models.Repositories.IControllerEventLogRepository controllerRepository =
                MOE.Common.Models.Repositories.ControllerEventLogRepositoryFactory.Create();
            List <Models.Controller_Event_Log> cycleEvents;

            if (!usePermissivePhase)
            {
                PhaseNumber = Approach.ProtectedPhaseNumber;
            }
            else
            {
                PhaseNumber = Approach.PermissivePhaseNumber ?? 0;
            }

            totalVolume = controllerRepository.GetTMCVolume(startDate, endDate, Approach.SignalID, PhaseNumber);
            cycleEvents = controllerRepository.GetEventsByEventCodesParam(Approach.SignalID,
                                                                          startDate, endDate, new List <int>()
            {
                1, 8, 9, 10, 11
            }, PhaseNumber);

            plans = new RLMPlanCollection(cycleEvents, startDate, endDate, this.SRLVSeconds, Approach);
            if (plans.PlanList.Count == 0)
            {
                plans.AddItem(new RLMPlan(startDate, endDate, 0, cycleEvents, this.SRLVSeconds, Approach));
            }
        }
Exemple #2
0
        private void GetSignalOverlapData(DateTime startDate, DateTime endDate, bool showVolume, int binSize)
        {
            DateTime   redLightTimeStamp = DateTime.MinValue;
            List <int> li = new List <int> {
                62, 63, 64
            };

            MOE.Common.Models.Repositories.IControllerEventLogRepository controllerRepository =
                MOE.Common.Models.Repositories.ControllerEventLogRepositoryFactory.Create();
            var cycleEvents = controllerRepository.GetEventsByEventCodesParam(Approach.SignalID,
                                                                              startDate, endDate, li, Approach.ProtectedPhaseNumber);

            plans = new RLMPlanCollection(cycleEvents, startDate, endDate, this.SRLVSeconds, Approach);
            if (plans.PlanList.Count == 0)
            {
                Plans.AddItem(new RLMPlan(startDate, endDate, 0, cycleEvents, this.SRLVSeconds, Approach));
            }
        }