Ejemplo n.º 1
0
 public SplitFailPhase(Approach approach, SplitFailOptions options, bool getPermissivePhase)
 {
     Approach           = approach;
     GetPermissivePhase = getPermissivePhase;
     Cycles             = CycleFactory.GetSplitFailCycles(options, approach, getPermissivePhase);
     SetDetectorActivations(options);
     AddDetectorActivationsToCycles();
     Plans      = PlanFactory.GetSplitFailPlans(Cycles, options, Approach);
     TotalFails = Cycles.Count(c => c.IsSplitFail);
     Statistics = new Dictionary <string, string>();
     Statistics.Add("Total Split Failures", TotalFails.ToString());
     SetBinStatistics(options);
 }
Ejemplo n.º 2
0
        public SplitFailPhase(Approach approach, SplitFailOptions options, bool getPermissivePhase)
        {
            Approach           = approach;
            GetPermissivePhase = getPermissivePhase;
            PhaseNumberSort    = getPermissivePhase ? approach.PermissivePhaseNumber.Value.ToString() + "-1": approach.ProtectedPhaseNumber.ToString() + "-2";

            using (var db = new SPM())
            {
                Cycles = CycleFactory.GetSplitFailCycles(options, approach, getPermissivePhase, db);
                SetDetectorActivations(options, db);
                AddDetectorActivationsToCycles();
                Plans = PlanFactory.GetSplitFailPlans(Cycles, options, Approach, db);
            }
            TotalFails = Cycles.Count(c => c.IsSplitFail);
            Statistics = new Dictionary <string, string>();
            Statistics.Add("Total Split Failures", TotalFails.ToString());
            SetBinStatistics(options);
        }