Пример #1
0
        public ActionResult GetAggregateDataTypes(int id)
        {
            List <AggregatedDataType> AggregatedDataTypes;

            switch (id)
            {
            case 16:
                AggregatedDataTypes = new DetectorVolumeAggregationOptions().AggregatedDataTypes;
                break;

            case 25:
                AggregatedDataTypes = new ApproachSpeedAggregationOptions().AggregatedDataTypes;
                break;

            case 18:
                AggregatedDataTypes = new ApproachPcdAggregationOptions().AggregatedDataTypes;
                break;

            case 19:
                AggregatedDataTypes = new ApproachCycleAggregationOptions().AggregatedDataTypes;
                break;

            case 20:
                AggregatedDataTypes = new ApproachSplitFailAggregationOptions().AggregatedDataTypes;
                break;

            case 26:
                AggregatedDataTypes = new ApproachYellowRedActivationsAggregationOptions().AggregatedDataTypes;
                break;

            case 22:
                AggregatedDataTypes = new SignalPreemptionAggregationOptions().AggregatedDataTypes;
                break;

            case 24:
                AggregatedDataTypes = new SignalPriorityAggregationOptions().AggregatedDataTypes;
                break;

            case 27:
                AggregatedDataTypes = new SignalEventCountAggregationOptions().AggregatedDataTypes;
                break;

            case 28:
                AggregatedDataTypes = new ApproachEventCountAggregationOptions().AggregatedDataTypes;
                break;

            case 29:
                AggregatedDataTypes = new PhaseTerminationAggregationOptions().AggregatedDataTypes;
                break;

            case 30:
                AggregatedDataTypes = new PhasePedAggregationOptions().AggregatedDataTypes;
                break;

            default:
                throw new Exception("Invalid Metric Type");
                break;
            }
            return(PartialView(AggregatedDataTypes));
        }
Пример #2
0
 public PcdAggregationBySignal(ApproachPcdAggregationOptions options, Models.Signal signal) : base(
         options, signal)
 {
     ApproachPcds = new List <PcdAggregationByApproach>();
     GetApproachPcdAggregationContainersForAllApporaches(options, signal);
     LoadBins(null, null);
 }
Пример #3
0
        public void SetAggregateData()
        {
            switch (SelectedMetricTypeId)
            {
            case 16:
                AggregatedDataTypes = new DetectorVolumeAggregationOptions().AggregatedDataTypes;
                break;

            case 18:
                AggregatedDataTypes = new ApproachPcdAggregationOptions().AggregatedDataTypes;
                break;

            case 19:
                AggregatedDataTypes = new ApproachCycleAggregationOptions().AggregatedDataTypes;
                break;

            case 20:
                AggregatedDataTypes = new ApproachSplitFailAggregationOptions().AggregatedDataTypes;
                break;

            case 22:
                AggregatedDataTypes = new SignalPreemptionAggregationOptions().AggregatedDataTypes;
                break;

            case 24:
                AggregatedDataTypes = new SignalPriorityAggregationOptions().AggregatedDataTypes;
                break;

            case 25:
                AggregatedDataTypes = new ApproachSpeedAggregationOptions().AggregatedDataTypes;
                break;

            case 26:
                AggregatedDataTypes = new ApproachYellowRedActivationsAggregationOptions().AggregatedDataTypes;
                break;

            case 27:
                AggregatedDataTypes = new SignalEventCountAggregationOptions().AggregatedDataTypes;
                break;

            case 28:
                AggregatedDataTypes = new ApproachEventCountAggregationOptions().AggregatedDataTypes;
                break;

            default:
                throw new Exception("Invalid Metric Type");
                break;
            }
        }
Пример #4
0
 private void GetApproachPcdAggregationContainersForAllApporaches(
     ApproachPcdAggregationOptions options, Models.Signal signal)
 {
     foreach (var approach in signal.Approaches)
     {
         ApproachPcds.Add(
             new PcdAggregationByApproach(approach, options, options.StartDate,
                                          options.EndDate,
                                          true, options.SelectedAggregatedDataType));
         if (approach.PermissivePhaseNumber != null)
         {
             ApproachPcds.Add(
                 new PcdAggregationByApproach(approach, options, options.StartDate,
                                              options.EndDate,
                                              false, options.SelectedAggregatedDataType));
         }
     }
 }
Пример #5
0
 public PcdAggregationBySignal(ApproachPcdAggregationOptions options, Models.Signal signal,
                               DirectionType direction) : base(options, signal)
 {
     ApproachPcds = new List <PcdAggregationByApproach>();
     foreach (var approach in signal.Approaches)
     {
         if (approach.DirectionType.DirectionTypeID == direction.DirectionTypeID)
         {
             ApproachPcds.Add(
                 new PcdAggregationByApproach(approach, options, options.StartDate,
                                              options.EndDate,
                                              true, options.SelectedAggregatedDataType));
             if (approach.PermissivePhaseNumber != null)
             {
                 ApproachPcds.Add(
                     new PcdAggregationByApproach(approach, options, options.StartDate,
                                                  options.EndDate,
                                                  false, options.SelectedAggregatedDataType));
             }
         }
     }
     LoadBins(null, null);
 }
Пример #6
0
        private ActionResult GetArrivalOnGreenChart(AggDataExportViewModel aggDataExportViewModel)
        {
            ApproachPcdAggregationOptions options = new ApproachPcdAggregationOptions();

            return(GetChart(aggDataExportViewModel, options));
        }
Пример #7
0
        public void CreateTimeMetricStartToFinishAllBinSizesAllAggregateDataTypesTest()
        {
            var options = new ApproachPcdAggregationOptions();

            base.CreateTimeMetricStartToFinishAllBinSizesAllAggregateDataTypesTest(options);
        }
Пример #8
0
 public PcdAggregationByApproach(Approach approach, ApproachPcdAggregationOptions options, DateTime startDate,
                                 DateTime endDate,
                                 bool getProtectedPhase, AggregatedDataType dataType) : base(approach, options, startDate, endDate,
                                                                                             getProtectedPhase, dataType)
 {
 }