lx
2025-11-24 e5a570db2036a6b155c2ddc289b42bd050b9ad3c
update 1.4
已修改6个文件
132 ■■■■■ 文件已修改
ErrorAnalysis.Service/COMergeCalcService.cs 76 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ErrorAnalysis.Service/ErrorRatioCalc.cs 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ErrorAnalysis.Service/PDEVCalcService.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ErrorAnalysis.UI/ErrorAnalysis.UI.csproj 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ErrorAnalysis.UI/FrmMain.Designer.cs 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ErrorAnalysis.UI/FrmMain.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ErrorAnalysis.Service/COMergeCalcService.cs
@@ -26,8 +26,9 @@
        //const double _coef = 1e8 * 2.54 * 2.54 * 4 * 6 * 2 * 11 * 77 * 0.2 / 0.6;
        private static (double, double) GetFarInterplolateResult(string modelId, double porosity, double sw, double speed, double depth, double yieldCounting)
        private static (double, double) GetFarInterplolateResult(string modelId, double porosity, double sw, double speed, double depth, double yieldCounting, int countStart, int countEnd)
        {
            var countLen = countEnd - countStart + 1;
            var cWinLength = _cWinEndIndex - _cWinStartIndex + 1;
            var oWinLength = _oWinEndIndex - _oWinStartIndex + 1;
            var oilLine = RepositoryInstance.Instance.COFarResultRepository?.GetCOFarResult(modelId, (int)porosity, 0);
@@ -37,14 +38,14 @@
            var oilLineValArr = oilLine.CInelasticSpec.Split(',').Select(v => Convert.ToDouble(v)).ToArray();
            var waterLineValArr = waterLine.CInelasticSpec.Split(',').Select(v => Convert.ToDouble(v)).ToArray();
            var oilLineCR = oilLineValArr.Skip(_cWinStartIndex - 1).Take(cWinLength).Sum() / oilLineValArr.Skip(17).Take(237).Sum();
            var oilLineOR = oilLineValArr.Skip(_oWinStartIndex - 1).Take(oWinLength).Sum() / oilLineValArr.Skip(17).Take(237).Sum();
            var oilLineCR = oilLineValArr.Skip(_cWinStartIndex - 1).Take(cWinLength).Sum() / oilLineValArr.Skip(countStart).Take(countLen).Sum();
            var oilLineOR = oilLineValArr.Skip(_oWinStartIndex - 1).Take(oWinLength).Sum() / oilLineValArr.Skip(countStart).Take(countLen).Sum();
            var oilLineC = 36d / 160d * oilLineCR * yieldCounting / speed * depth * 0.0762d;
            var oilLineO = 36d / 160d * oilLineOR * yieldCounting / speed * depth * 0.0762d;
            var waterLineCR = waterLineValArr.Skip(_cWinStartIndex - 1).Take(cWinLength).Sum() / waterLineValArr.Skip(17).Take(237).Sum();
            var waterLineOR = waterLineValArr.Skip(_oWinStartIndex - 1).Take(oWinLength).Sum() / waterLineValArr.Skip(17).Take(237).Sum();
            var waterLineCR = waterLineValArr.Skip(_cWinStartIndex - 1).Take(cWinLength).Sum() / waterLineValArr.Skip(countStart).Take(countLen).Sum();
            var waterLineOR = waterLineValArr.Skip(_oWinStartIndex - 1).Take(oWinLength).Sum() / waterLineValArr.Skip(countStart).Take(countLen).Sum();
            var waterLineC = 36d / 160d * waterLineCR * yieldCounting / speed * depth * 0.0762d;
            var waterLineO = 36d / 160d * waterLineOR * yieldCounting / speed * depth * 0.0762d;
@@ -67,8 +68,9 @@
            return (cRes, oRes);
        }
        private static (double, double) GetNearInterplolateResult(string modelId, double porosity, double sw, double speed, double depth, double yieldCounting)
        private static (double, double) GetNearInterplolateResult(string modelId, double porosity, double sw, double speed, double depth, double yieldCounting, int countStart, int countEnd)
        {
            var countLen = countEnd - countStart + 1;
            var cWinLength = _cWinEndIndex - _cWinStartIndex + 1;
            var oWinLength = _oWinEndIndex - _oWinStartIndex + 1;
            var oilLine = RepositoryInstance.Instance.CONearResultRepository?.GetCONearResult(modelId, (int)porosity, 0);
@@ -78,13 +80,13 @@
            var oilLineValArr = oilLine.CInelasticSpec.Split(',').Select(v => Convert.ToDouble(v)).ToArray();
            var waterLineValArr = waterLine.CInelasticSpec.Split(',').Select(v => Convert.ToDouble(v)).ToArray();
            var oilLineCR = oilLineValArr.Skip(_cWinStartIndex - 1).Take(cWinLength).Sum() / oilLineValArr.Skip(17).Take(237).Sum();
            var oilLineOR = oilLineValArr.Skip(_oWinStartIndex - 1).Take(oWinLength).Sum() / oilLineValArr.Skip(17).Take(237).Sum();
            var oilLineCR = oilLineValArr.Skip(_cWinStartIndex - 1).Take(cWinLength).Sum() / oilLineValArr.Skip(countStart).Take(countLen).Sum();
            var oilLineOR = oilLineValArr.Skip(_oWinStartIndex - 1).Take(oWinLength).Sum() / oilLineValArr.Skip(countStart).Take(countLen).Sum();
            var oilLineC = (36d / 160d) * oilLineCR * yieldCounting / speed * depth * 0.0762d;
            var oilLineO = (36d / 160d) * oilLineOR * yieldCounting / speed * depth * 0.0762d;
            var waterLineCR = waterLineValArr.Skip(_cWinStartIndex - 1).Take(cWinLength).Sum() / waterLineValArr.Skip(17).Take(237).Sum();
            var waterLineOR = waterLineValArr.Skip(_oWinStartIndex - 1).Take(oWinLength).Sum() / waterLineValArr.Skip(17).Take(237).Sum();
            var waterLineCR = waterLineValArr.Skip(_cWinStartIndex - 1).Take(cWinLength).Sum() / waterLineValArr.Skip(countStart).Take(countLen).Sum();
            var waterLineOR = waterLineValArr.Skip(_oWinStartIndex - 1).Take(oWinLength).Sum() / waterLineValArr.Skip(countStart).Take(countLen).Sum();
            var waterLineC = (36d / 160d) * waterLineCR * yieldCounting / speed * depth * 0.0762d;
            var waterLineO = (36d / 160d) * waterLineOR * yieldCounting / speed * depth * 0.0762d;
@@ -119,7 +121,7 @@
        /// <param name="depth">深度</param>
        /// <returns>碳和氧值</returns>
        /// <exception cref="InvalidDataException">孔隙度超过范围</exception>
        public static (double, double) GetFarMergeCOResult(string modelId, double porosity, double sw, double speed, double depth, double yieldCounting)
        public static (double, double) GetFarMergeCOResult(string modelId, double porosity, double sw, double speed, double depth, double yieldCounting, int countStart, int countEnd)
        {
            if (porosity > 40)
                throw new InvalidDataException("Porosity value out of range!");
@@ -127,15 +129,15 @@
            (double, double) result = (0, 0);
            if (porosity % 5 == 0)
            {
                result = GetFarInterplolateResult(modelId, porosity, sw, speed, depth, yieldCounting);
                result = GetFarInterplolateResult(modelId, porosity, sw, speed, depth, yieldCounting, countStart, countEnd);
            }
            else
            {
                var ceilingPorosity = Math.Ceiling(porosity / 5) * 5;
                var ceilingResult = GetFarInterplolateResult(modelId, ceilingPorosity, sw, speed, depth, yieldCounting);
                var ceilingResult = GetFarInterplolateResult(modelId, ceilingPorosity, sw, speed, depth, yieldCounting, countStart, countEnd);
                var floorPorosity = Math.Floor(porosity / 5) * 5;
                var floorResult = GetFarInterplolateResult(modelId, floorPorosity, sw, speed, depth, yieldCounting);
                var floorResult = GetFarInterplolateResult(modelId, floorPorosity, sw, speed, depth, yieldCounting, countStart, countEnd);
                result.Item1 = Utility.Interpolate(porosity, floorPorosity, floorResult.Item1, ceilingPorosity, ceilingResult.Item1);
                result.Item2 = Utility.Interpolate(porosity, floorPorosity, floorResult.Item2, ceilingPorosity, ceilingResult.Item2);
@@ -155,7 +157,7 @@
        /// <param name="depth">深度</param>
        /// <returns>碳或氧值</returns>
        /// <exception cref="InvalidDataException">孔隙度超过范围</exception>
        public static (double, double) GetNearMergeCOResult(string modelId, double porosity, double sw, double speed, double depth, double yieldCounting)
        public static (double, double) GetNearMergeCOResult(string modelId, double porosity, double sw, double speed, double depth, double yieldCounting, int countStart, int countEnd)
        {
            if (porosity > 40)
                throw new InvalidDataException("Porosity value out of range!");
@@ -163,15 +165,15 @@
            (double, double) result = (0, 0);
            if (porosity % 5 == 0)
            {
                result = GetNearInterplolateResult(modelId, porosity, sw, speed, depth, yieldCounting);
                result = GetNearInterplolateResult(modelId, porosity, sw, speed, depth, yieldCounting, countStart, countEnd);
            }
            else
            {
                var ceilingPorosity = Math.Ceiling(porosity / 5) * 5;
                var ceilingResult = GetNearInterplolateResult(modelId, ceilingPorosity, sw, speed, depth, yieldCounting);
                var ceilingResult = GetNearInterplolateResult(modelId, ceilingPorosity, sw, speed, depth, yieldCounting, countStart, countEnd);
                var floorPorosity = Math.Floor(porosity / 5) * 5;
                var floorResult = GetNearInterplolateResult(modelId, floorPorosity, sw, speed, depth, yieldCounting);
                var floorResult = GetNearInterplolateResult(modelId, floorPorosity, sw, speed, depth, yieldCounting, countStart, countEnd);
                result.Item1 = Utility.Interpolate(porosity, floorPorosity, floorResult.Item1, ceilingPorosity, ceilingResult.Item1);
                result.Item2 = Utility.Interpolate(porosity, floorPorosity, floorResult.Item2, ceilingPorosity, ceilingResult.Item2);
@@ -297,8 +299,9 @@
            return result;
        }
        public static (double, double) GetFarCROR(string modelId, double porosity, double sw)
        public static (double, double) GetFarCROR(string modelId, double porosity, double sw, int countStart, int countEnd)
        {
            int countLen = countEnd - countStart + 1;
            var cWinLength = _cWinEndIndex - _cWinStartIndex + 1;
            var oWinLength = _oWinEndIndex - _oWinStartIndex + 1;
            var oilLine = RepositoryInstance.Instance.COFarResultRepository?.GetCOFarResult(modelId, (int)porosity, 0);
@@ -308,11 +311,11 @@
            var oilLineValArr = oilLine.CInelasticSpec.Split(',').Select(v => Convert.ToDouble(v)).ToArray();
            var waterLineValArr = waterLine.CInelasticSpec.Split(',').Select(v => Convert.ToDouble(v)).ToArray();
            var oilLineCR = oilLineValArr.Skip(_cWinStartIndex - 1).Take(cWinLength).Sum() / oilLineValArr.Skip(17).Take(237).Sum();
            var oilLineOR = oilLineValArr.Skip(_oWinStartIndex - 1).Take(oWinLength).Sum() / oilLineValArr.Skip(17).Take(237).Sum();
            var oilLineCR = oilLineValArr.Skip(_cWinStartIndex - 1).Take(cWinLength).Sum() / oilLineValArr.Skip(countStart).Take(countLen).Sum();
            var oilLineOR = oilLineValArr.Skip(_oWinStartIndex - 1).Take(oWinLength).Sum() / oilLineValArr.Skip(countStart).Take(countLen).Sum();
            var waterLineCR = waterLineValArr.Skip(_cWinStartIndex - 1).Take(cWinLength).Sum() / waterLineValArr.Skip(17).Take(237).Sum();
            var waterLineOR = waterLineValArr.Skip(_oWinStartIndex - 1).Take(oWinLength).Sum() / waterLineValArr.Skip(17).Take(237).Sum();
            var waterLineCR = waterLineValArr.Skip(_cWinStartIndex - 1).Take(cWinLength).Sum() / waterLineValArr.Skip(countStart).Take(countLen).Sum();
            var waterLineOR = waterLineValArr.Skip(_oWinStartIndex - 1).Take(oWinLength).Sum() / waterLineValArr.Skip(countStart).Take(countLen).Sum();
            double cRes = 0, oRes = 0;
            if (sw == 0)
@@ -333,8 +336,9 @@
            return (cRes, oRes);
        }
        public static (double, double) GetNearCROR(string modelId, double porosity, double sw)
        public static (double, double) GetNearCROR(string modelId, double porosity, double sw, int countStart, int countEnd)
        {
            int countLen = countEnd - countStart + 1;
            var cWinLength = _cWinEndIndex - _cWinStartIndex + 1;
            var oWinLength = _oWinEndIndex - _oWinStartIndex + 1;
            var oilLine = RepositoryInstance.Instance.CONearResultRepository?.GetCONearResult(modelId, (int)porosity, 0);
@@ -344,11 +348,11 @@
            var oilLineValArr = oilLine.CInelasticSpec.Split(',').Select(v => Convert.ToDouble(v)).ToArray();
            var waterLineValArr = waterLine.CInelasticSpec.Split(',').Select(v => Convert.ToDouble(v)).ToArray();
            var oilLineCR = oilLineValArr.Skip(_cWinStartIndex - 1).Take(cWinLength).Sum() / oilLineValArr.Skip(17).Take(237).Sum();
            var oilLineOR = oilLineValArr.Skip(_oWinStartIndex - 1).Take(oWinLength).Sum() / oilLineValArr.Skip(17).Take(237).Sum();
            var oilLineCR = oilLineValArr.Skip(_cWinStartIndex - 1).Take(cWinLength).Sum() / oilLineValArr.Skip(countStart).Take(countLen).Sum();
            var oilLineOR = oilLineValArr.Skip(_oWinStartIndex - 1).Take(oWinLength).Sum() / oilLineValArr.Skip(countStart).Take(countLen).Sum();
            var waterLineCR = waterLineValArr.Skip(_cWinStartIndex - 1).Take(cWinLength).Sum() / waterLineValArr.Skip(17).Take(237).Sum();
            var waterLineOR = waterLineValArr.Skip(_oWinStartIndex - 1).Take(oWinLength).Sum() / waterLineValArr.Skip(17).Take(237).Sum();
            var waterLineCR = waterLineValArr.Skip(_cWinStartIndex - 1).Take(cWinLength).Sum() / waterLineValArr.Skip(countStart).Take(countLen).Sum();
            var waterLineOR = waterLineValArr.Skip(_oWinStartIndex - 1).Take(oWinLength).Sum() / waterLineValArr.Skip(countStart).Take(countLen).Sum();
            double crRes = 0, orRes = 0;
            if (sw == 0)
@@ -369,7 +373,7 @@
            return (crRes, orRes);
        }
        public static (double, double) GetFarCOORResult(string modelId, double porosity, double sw)
        public static (double, double) GetFarCOORResult(string modelId, double porosity, double sw, int countStart, int countEnd)
        {
            if (porosity > 40)
                throw new InvalidDataException("Porosity value out of range!");
@@ -377,15 +381,15 @@
            (double, double) result = (0, 0);
            if (porosity % 5 == 0)
            {
                result = GetFarCROR(modelId, porosity, sw);
                result = GetFarCROR(modelId, porosity, sw, countStart, countEnd);
            }
            else
            {
                var ceilingPorosity = Math.Ceiling(porosity / 5) * 5;
                var ceilingResult = GetFarCROR(modelId, ceilingPorosity, sw);
                var ceilingResult = GetFarCROR(modelId, ceilingPorosity, sw, countStart, countEnd);
                var floorPorosity = Math.Floor(porosity / 5) * 5;
                var floorResult = GetFarCROR(modelId, floorPorosity, sw);
                var floorResult = GetFarCROR(modelId, floorPorosity, sw, countStart, countEnd);
                result.Item1 = Utility.Interpolate(porosity, floorPorosity, floorResult.Item1, ceilingPorosity, ceilingResult.Item1);
                result.Item2 = Utility.Interpolate(porosity, floorPorosity, floorResult.Item2, ceilingPorosity, ceilingResult.Item2);
@@ -393,7 +397,7 @@
            return result;
        }
        public static (double, double) GetNearCOORResult(string modelId, double porosity, double sw)
        public static (double, double) GetNearCOORResult(string modelId, double porosity, double sw, int countStart, int countEnd)
        {
            if (porosity > 40)
                throw new InvalidDataException("Porosity value out of range!");
@@ -401,15 +405,15 @@
            (double, double) result = (0, 0);
            if (porosity % 5 == 0)
            {
                result = GetNearCROR(modelId, porosity, sw);
                result = GetNearCROR(modelId, porosity, sw, countStart, countEnd);
            }
            else
            {
                var ceilingPorosity = Math.Ceiling(porosity / 5) * 5;
                var ceilingResult = GetNearCROR(modelId, ceilingPorosity, sw);
                var ceilingResult = GetNearCROR(modelId, ceilingPorosity, sw, countStart, countEnd);
                var floorPorosity = Math.Floor(porosity / 5) * 5;
                var floorResult = GetNearCROR(modelId, floorPorosity, sw);
                var floorResult = GetNearCROR(modelId, floorPorosity, sw, countStart, countEnd);
                result.Item1 = Utility.Interpolate(porosity, floorPorosity, floorResult.Item1, ceilingPorosity, ceilingResult.Item1);
                result.Item2 = Utility.Interpolate(porosity, floorPorosity, floorResult.Item2, ceilingPorosity, ceilingResult.Item2);
ErrorAnalysis.Service/ErrorRatioCalc.cs
@@ -16,8 +16,14 @@
        private static (double slope, double intercept) _lineCoef;
        private static (double a, double b, double c) _parabolaCoef;
        public static ErrorRatioResult GetErrorRatioResult(string modelID, double porosity, double sw, double depth, bool lockSpeed, double speed, double yieldCounting, double targetErrorRatio, out double testSpeed, out ProcessingDataModel processingData, int pass = 0, double nearCofe = 0.65, double farCofe = 0.35)
        public static ErrorRatioResult GetErrorRatioResult(string modelID, double porosity, double sw, double depth, bool lockSpeed, double speed, double yieldCounting, double targetErrorRatio, string type, out double testSpeed, out ProcessingDataModel processingData, int pass = 0, double nearCofe = 0.65, double farCofe = 0.35)
        {
            int countStart = 9;
            int countEnd = 179;
            if (type == "SMRT")
            {
                countStart = 24;
            }
            processingData = new ProcessingDataModel { Depth = depth, NearPDEVCoef = nearCofe, FarPDEVCoef = farCofe, NearTO = yieldCounting };
            var result = new ErrorRatioResult
            {
@@ -33,8 +39,8 @@
            processingData.FarSpecData = COMergeCalcService.GetFarSpectrum(modelID, porosity, sw);
            processingData.NearSpecData = COMergeCalcService.GetNearSpectrum(modelID, porosity, sw);
            var nearCROR = COMergeCalcService.GetNearCOORResult(modelID, porosity, sw);
            var farCROR = COMergeCalcService.GetFarCOORResult(modelID, porosity, sw);
            var nearCROR = COMergeCalcService.GetNearCOORResult(modelID, porosity, sw, countStart, countEnd);
            var farCROR = COMergeCalcService.GetFarCOORResult(modelID, porosity, sw, countStart, countEnd);
            processingData.NearCR = nearCROR.Item1;
            processingData.NearOR = nearCROR.Item2;
            processingData.FarCR = farCROR.Item1;
@@ -95,7 +101,8 @@
        }
        private static ErrorRatio GetFirstErrorRatio(string modelID, double porosity, double sw, double speed, double depth, double yieldCounting, double nearCofe, double farCofe, out double oilPoint, out double waterPoint)
        //废弃
        private static ErrorRatio GetFirstErrorRatio(string modelID, double porosity, double sw, double speed, double depth, double yieldCounting, double nearCofe, double farCofe,int countStart,int countEnd, out double oilPoint, out double waterPoint)
        {
            if (porosity > 40)
                throw new InvalidDataException("Porosity value out of range!");
@@ -104,7 +111,7 @@
            {
                var mDelta = GetMDelta(porosity, out oilPoint, out waterPoint);
                var mergePDEVOld = PDEVCalcService.GetMergePDEV(modelID, porosity, sw, speed, depth, yieldCounting, nearCofe, farCofe);
                var mergePDEVOld = PDEVCalcService.GetMergePDEV(modelID, porosity, sw, speed, depth, yieldCounting, nearCofe, farCofe,countStart,countEnd);
                //var nearCROR = COMergeCalcService.GetNearCOORResult(modelID, porosity, sw);
                //var farCROR = COMergeCalcService.GetFarCOORResult(modelID, porosity, sw);
ErrorAnalysis.Service/PDEVCalcService.cs
@@ -9,12 +9,12 @@
    public class PDEVCalcService
    {
        //废弃
        public static double GetMergePDEV(string modelId, double porosity, double sw, double speed, double depth, double yieldCounting, double nearCofe, double farCofe)
        public static double GetMergePDEV(string modelId, double porosity, double sw, double speed, double depth, double yieldCounting, double nearCofe, double farCofe, int countStart, int countEnd)
        {
            var farResult = COMergeCalcService.GetFarMergeCOResult(modelId, porosity, sw, speed, depth, yieldCounting);
            var farResult = COMergeCalcService.GetFarMergeCOResult(modelId, porosity, sw, speed, depth, yieldCounting, countStart, countEnd);
            var farPDEV = CalcPDEV(farResult.Item1, farResult.Item2);
            var nearResult = COMergeCalcService.GetNearMergeCOResult(modelId, porosity, sw, speed, depth, yieldCounting);
            var nearResult = COMergeCalcService.GetNearMergeCOResult(modelId, porosity, sw, speed, depth, yieldCounting, countStart, countEnd);
            var nearPDEV = CalcPDEV(nearResult.Item1, nearResult.Item2);
            return Math.Sqrt(Math.Pow(nearPDEV * nearCofe, 2) + Math.Pow(farPDEV * farCofe, 2));
ErrorAnalysis.UI/ErrorAnalysis.UI.csproj
@@ -10,7 +10,7 @@
        <Authors>Casing Research Insitute</Authors>
        <Product>JobPlanner</Product>
        <Copyright>COSL</Copyright>
        <Version>1.3.1</Version>
        <Version>1.4.0</Version>
    </PropertyGroup>
    <ItemGroup>
ErrorAnalysis.UI/FrmMain.Designer.cs
@@ -129,10 +129,10 @@
            nudDepth = new NumericUpDown();
            nudTargetLoggingInterval = new NumericUpDown();
            label54 = new Label();
            txtToolType = new TextBox();
            label53 = new Label();
            label52 = new Label();
            pbLoadDB = new ProgressBar();
            cmbToolType = new ComboBox();
            ((System.ComponentModel.ISupportInitialize)nudSoPrecisionRequired).BeginInit();
            pnlLockPass.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)nudPass).BeginInit();
@@ -1099,6 +1099,7 @@
            // 
            // tpPlan
            // 
            tpPlan.Controls.Add(cmbToolType);
            tpPlan.Controls.Add(label7);
            tpPlan.Controls.Add(cmbTargetLoggingIntervalUnit);
            tpPlan.Controls.Add(label5);
@@ -1111,7 +1112,6 @@
            tpPlan.Controls.Add(nudTargetLoggingInterval);
            tpPlan.Controls.Add(nudSoPrecisionRequired);
            tpPlan.Controls.Add(label54);
            tpPlan.Controls.Add(txtToolType);
            tpPlan.Controls.Add(label53);
            tpPlan.Controls.Add(label52);
            tpPlan.Controls.Add(label21);
@@ -1207,14 +1207,6 @@
            label54.TabIndex = 12;
            label54.Text = "Alpha-processing window";
            // 
            // txtToolType
            //
            txtToolType.Location = new Point(185, 15);
            txtToolType.Name = "txtToolType";
            txtToolType.ReadOnly = true;
            txtToolType.Size = new Size(88, 23);
            txtToolType.TabIndex = 24;
            //
            // label53
            // 
            label53.AutoSize = true;
@@ -1241,6 +1233,16 @@
            pbLoadDB.Size = new Size(75, 23);
            pbLoadDB.TabIndex = 8;
            pbLoadDB.Visible = false;
            //
            // cmbToolType
            //
            cmbToolType.DropDownStyle = ComboBoxStyle.DropDownList;
            cmbToolType.FormattingEnabled = true;
            cmbToolType.Items.AddRange(new object[] { "RET", "SMRT" });
            cmbToolType.Location = new Point(183, 12);
            cmbToolType.Name = "cmbToolType";
            cmbToolType.Size = new Size(104, 25);
            cmbToolType.TabIndex = 32;
            // 
            // FrmMain
            // 
@@ -1388,7 +1390,6 @@
        private NumericUpDown nudGasDensity;
        private Label label51;
        private Label label50;
        private TextBox txtToolType;
        private Label label52;
        private NumericUpDown nudDepth;
        private Label label53;
@@ -1407,5 +1408,6 @@
        private RichTextBox txtAnalysisResult;
        private Label label7;
        private NumericUpDown nudYieldCounting;
        private ComboBox cmbToolType;
    }
}
ErrorAnalysis.UI/FrmMain.cs
@@ -33,6 +33,7 @@
        private void FrmMain_Load(object sender, EventArgs e)
        {
            cmbSpeedUnit.SelectedIndex = 0;
            cmbToolType.SelectedIndex = 0;
            cmbTargetLoggingIntervalUnit.SelectedIndex = 0;
        }
        private void InitInputControl()
@@ -61,7 +62,7 @@
                pbLoadDB.Show();
                pbLoadDB.Value = 0;
                txtDataPath.Text = fileDlg.FileName;
                txtToolType.Text = fileDlg.SafeFileName.Substring(0, fileDlg.SafeFileName.IndexOf("Mcnp"));
                //txtToolType.Text = fileDlg.SafeFileName.Substring(0, fileDlg.SafeFileName.IndexOf("Mcnp"));
                _connectionString = $"Data Source={fileDlg.FileName};";
                RepositoryInstance.Instance.ReLoad(_connectionString);
@@ -175,7 +176,7 @@
                }
                var calcSpeed = cmbSpeedUnit.Text == "ft/hr" ? UnitConvert.FtHr2MS(speed) : UnitConvert.MHR2MS(speed);
                var result = ErrorRatioCalc.GetErrorRatioResult(_model.ModelID, porosity, sw, depth, true, calcSpeed, yieldCounting, targetErrorRatio / 100, out _, out processingData);
                var result = ErrorRatioCalc.GetErrorRatioResult(_model.ModelID, porosity, sw, depth, true, calcSpeed, yieldCounting, targetErrorRatio / 100, cmbToolType.Text, out _, out processingData);
                Plot(result);
@@ -200,7 +201,7 @@
                    return;
                }
                double speed;
                var result = ErrorRatioCalc.GetErrorRatioResult(_model.ModelID, porosity, sw, depth, false, 0, yieldCounting, targetErrorRatio / 100, out speed, out processingData, pass);
                var result = ErrorRatioCalc.GetErrorRatioResult(_model.ModelID, porosity, sw, depth, false, 0, yieldCounting, targetErrorRatio / 100,cmbToolType.Text, out speed, out processingData, pass);
                Plot(result);
                double totalTime = Math.Round((targetLoggingInterval / speed / 60 / 60), 2);