示例#1
0
        public override void PreRun()
        {
            base.PreRun();
            this.MaxAllowedRms               = namedFloatControl_maxAllowedRms.GetValue();
            MaxAllowedConvergenceTime        = namedFloatControl_maxAllowConvergTime.GetValue();
            MaxAllowedDifferAfterConvergence = namedFloatControl1MaxAllowedDifferAfterConvergence.GetValue();
            MaxDiffer            = this.namedFloatControl_maxDiffer.GetValue();
            SequentialEpochCount = this.namedIntControl_epochCount.GetValue();
            KeyLabelCharCount    = namedIntControl_labelCharCount.GetValue();
            ParamNamesString     = namedStringControl_paramNames.GetValue();

            Result     = new BaseConcurrentDictionary <string, BaseDictionary <string, Time> >("结果", (key) => new BaseDictionary <string, Time>());
            StartTimes = new BaseDictionary <string, Time>();

            var paramNames = ParamNamesString.Split(new char[] { ',', ';', ',', '\t', ' ' }, StringSplitOptions.RemoveEmptyEntries).ToList();

            paramAnalyzer = new EpochParamAnalyzer(new List <string>(paramNames),
                                                   SequentialEpochCount,
                                                   MaxDiffer, MaxAllowedConvergenceTime,
                                                   KeyLabelCharCount, MaxAllowedDifferAfterConvergence, MaxAllowedRms);

            //foreach (var inputPath in this.TotalPathes)
            //{
            //    var fileName = Path.GetFileName(inputPath);
            //    var dic = Result.GetOrCreate(fileName);//单线程建立,避免冲突
            //}
        }
示例#2
0
 /// <summary>
 /// 默认构造函数
 /// </summary>
 public ServiceHoulder(int MaxHoulderCount = 64)
 {
     this.Name            = "多系统服务池";
     this.MaxHoulderCount = MaxHoulderCount;
     LastVisitTime        = new BaseConcurrentDictionary <BufferedTimePeriod, DateTime>();
     MinExpireTime        = TimeSpan.FromMinutes(3);//3分钟,应该足够了
     IsCanBuffered        = true;
 }
示例#3
0
        public override void PreRun()
        {
            base.PreRun();
            LabelCharCount = namedIntControl_labelCharCount.GetValue();
            IsIgnoreCase   = this.checkBox_ignoreCase.Checked;
            IsMoveOrCopy   = this.checkBox1_moveOrCopy.Checked;

            Result = new BaseConcurrentDictionary <string, List <string> >("结果", (key) => new List <string>());
        }
示例#4
0
        /// <summary>
        /// 并行执行插值操作
        /// </summary>
        /// <param name="index"></param>
        /// <returns></returns>
        public IDictionaryClass <string, RatedValue> GetInterpolateValuesParallel(double index)
        {
            var vals = new BaseConcurrentDictionary <string, RatedValue>();
            var list = new List <NamedRatedValue>();

            Parallel.ForEach(this.Keys, new Action <string>(delegate(string key)
            {
                double y = 0, dydx = 0;
                Lagrange(Indexes, this[key], index, ref y, ref dydx);
                vals.Add(key, new NamedRatedValue(key, y, dydx));
            }));
            return(vals);
        }
示例#5
0
 /// <summary>
 /// 历元参数分析器
 /// </summary>
 /// <param name="ParamNames"></param>
 /// <param name="SequentialEpochCount"></param>
 /// <param name="MaxDiffer">判断是否收敛的标准</param>
 /// <param name="MaxAllowedConvergenceTime">判断是否合限,包括收敛时间,收敛后偏差和最大允许RMS</param>
 /// <param name="KeyLabelCharCount"></param>
 /// <param name="MaxAllowedDifferAfterConvergence">判断是否合限,包括收敛时间,收敛后偏差和最大允许RMS</param>
 /// <param name="MaxAllowedRms">判断是否合限,包括收敛时间,收敛后偏差和最大允许RMS</param>
 public EpochParamAnalyzer(
     List <string> ParamNames,
     int SequentialEpochCount                = 20,
     double MaxDiffer                        = 0.1,
     double MaxAllowedConvergenceTime        = 240,
     int KeyLabelCharCount                   = 4,
     double MaxAllowedDifferAfterConvergence = 0.1,
     double MaxAllowedRms                    = 0.1)
 {
     this.MaxAllowedDifferAfterConvergence = MaxAllowedDifferAfterConvergence;
     this.MaxAllowedConvergenceTime        = MaxAllowedConvergenceTime;
     this.KeyLabelCharCount    = KeyLabelCharCount;
     this.ParamNames           = ParamNames;
     this.MaxAllowedRms        = MaxAllowedRms;
     this.SequentialEpochCount = SequentialEpochCount;
     this.MaxDiffer            = MaxDiffer;
     ConvergenceResult         = new BaseConcurrentDictionary <string, BaseDictionary <string, TimePeriod> >("结果", (key) => new BaseDictionary <string, TimePeriod>());
     EpochParamDataTables      = new BaseConcurrentDictionary <string, ObjectTableStorage>();
 }
示例#6
0
        /// <summary>
        /// 所有可能的差分整数,所有卫星都做一遍基准星
        /// </summary>
        /// <returns></returns>
        public BaseDictionary <SatelliteNumber, MultiSitePeriodValueStorage> GetAllPossibleDifferInts()
        {
            var data = new BaseConcurrentDictionary <SatelliteNumber, MultiSitePeriodValueStorage>();
            List <SatelliteNumber> prns = GetAllPrns();

            if (true)
            {
                log.Info("即将并行宽巷模糊度固定,请系好安全带!");
                Parallel.ForEach(prns, new Action <SatelliteNumber>(prn => data[prn] = GetDifferInt(prn)));
            }
            else
            {
                foreach (var prn in prns)
                {
                    data[prn] = GetDifferInt(prn);
                }
            }
            return(new BaseDictionary <SatelliteNumber, MultiSitePeriodValueStorage>(data.Data));
        }