lx
2025-11-24 e5a570db2036a6b155c2ddc289b42bd050b9ad3c
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);