From bfd1c4927bc3210dff1e26e70750f574c75c92d5 Mon Sep 17 00:00:00 2001
From: tangxu <tangxu76880903>
Date: 星期四, 05 九月 2024 10:22:22 +0800
Subject: [PATCH] 修正

---
 Library/Newtonsoft.Json.dll                                   |    0 
 Desktop/IStation.Desktop.ChCalc/Program.cs                    |    2 
 Calc/IStation.Calc.Core/递归计算2/ErQuCalcHelper_2_递归_定水位_任意时间.cs |   58 ++++++++++++++--------------
 Calc/IStation.Calc.Core/递归计算2/ErQuCalcHelper_2_递归.cs          |    3 -
 Calc/IStation.Calc.Core/递归计算2/ErQuCalcHelper_2_递归_定水位_指定时间.cs |    3 -
 5 files changed, 32 insertions(+), 34 deletions(-)

diff --git "a/Calc/IStation.Calc.Core/\351\200\222\345\275\222\350\256\241\347\256\2272/ErQuCalcHelper_2_\351\200\222\345\275\222.cs" "b/Calc/IStation.Calc.Core/\351\200\222\345\275\222\350\256\241\347\256\2272/ErQuCalcHelper_2_\351\200\222\345\275\222.cs"
index 57140cc..b8f48e7 100644
--- "a/Calc/IStation.Calc.Core/\351\200\222\345\275\222\350\256\241\347\256\2272/ErQuCalcHelper_2_\351\200\222\345\275\222.cs"
+++ "b/Calc/IStation.Calc.Core/\351\200\222\345\275\222\350\256\241\347\256\2272/ErQuCalcHelper_2_\351\200\222\345\275\222.cs"
@@ -23,8 +23,7 @@
         /// <param name="opt_bundle"></param>
         /// <returns></returns>
         protected IStation.CalcModel.AnaPrj ToAnaPrj(BlockItemList opt_bundle)
-        {
- 
+        { 
             if (this._startOpenPumpCount == -1 || _startOpenPumpArray == null)
             {//涓嶇煡閬撳紑濮嬬殑鐘舵��
                 return ToAnaPrj鏈煡寮�濮嬬姸鎬�(opt_bundle);
diff --git "a/Calc/IStation.Calc.Core/\351\200\222\345\275\222\350\256\241\347\256\2272/ErQuCalcHelper_2_\351\200\222\345\275\222_\345\256\232\346\260\264\344\275\215_\344\273\273\346\204\217\346\227\266\351\227\264.cs" "b/Calc/IStation.Calc.Core/\351\200\222\345\275\222\350\256\241\347\256\2272/ErQuCalcHelper_2_\351\200\222\345\275\222_\345\256\232\346\260\264\344\275\215_\344\273\273\346\204\217\346\227\266\351\227\264.cs"
index ba2951b..d1a4eb9 100644
--- "a/Calc/IStation.Calc.Core/\351\200\222\345\275\222\350\256\241\347\256\2272/ErQuCalcHelper_2_\351\200\222\345\275\222_\345\256\232\346\260\264\344\275\215_\344\273\273\346\204\217\346\227\266\351\227\264.cs"
+++ "b/Calc/IStation.Calc.Core/\351\200\222\345\275\222\350\256\241\347\256\2272/ErQuCalcHelper_2_\351\200\222\345\275\222_\345\256\232\346\260\264\344\275\215_\344\273\273\346\204\217\346\227\266\351\227\264.cs"
@@ -8,12 +8,12 @@
 {
     internal partial class ErQuCalcHelper_2_閫掑綊_瀹氭按浣峗浠绘剰鏃堕棿 : ErQuCalcHelper_2_閫掑綊_瀹氭按閲�
     {
- 
+
         /// <summary>
         /// 
         /// </summary>
         /// <returns></returns>
-        protected override AnaPrj  CalcOptPrjsCore()
+        protected override AnaPrj CalcOptPrjsCore()
         {
             _minTimeCountOpenPump = this.MinOpenPumpMinute / this.CalcSpaceMinute;
             _minTimeCountSwitch = this.MinSwitchPumpMinute / this.CalcSpaceMinute;
@@ -22,12 +22,12 @@
             var result瀹氭按閲� = CalcOptPrjsBlockItems瀹氭按閲�();
             if (result瀹氭按閲� == null)
                 return null;
- 
-            foreach(var item in result瀹氭按閲�.Items)
+
+            foreach (var item in result瀹氭按閲�.Items)
             {
-                if(item.ReservoirStartHeight>= _maxReservoirHeight || item.ReservoirEndHeight>= _maxReservoirHeight)
+                if (item.ReservoirStartHeight >= _maxReservoirHeight || item.ReservoirEndHeight >= _maxReservoirHeight)
                 {
-                    return ToAnaPrj(result瀹氭按閲�);  
+                    return ToAnaPrj(result瀹氭按閲�);
                 }
             }
 
@@ -43,7 +43,7 @@
         /// </summary>
         /// <returns></returns>
         private BlockItemList CalcOptPrjsBlockItems_瀹氭按浣峗浠绘剰鏃堕棿()
-        { 
+        {
             var result = RecursionFind鍒濆_瀹氭按浣峗浠绘剰鏃堕棿();
             if (result == null || result.Items == null)
                 return null;
@@ -109,7 +109,7 @@
 
             return result;
         }
-        
+
         /// <summary>
         /// 
         /// </summary>
@@ -119,7 +119,7 @@
             _maxReservoirHeight = level姘村簱姘翠綅 - 0.02;  //鏀剧偣浣欓噺
         }
         protected double _maxReservoirHeight = 0;
-        private bool CheckMaxLevel(double start_level,double end_level)
+        private bool CheckMaxLevel(double start_level, double end_level)
         {
             if (start_level >= this._maxReservoirHeight || end_level >= this._maxReservoirHeight)
                 return true;
@@ -128,21 +128,21 @@
         }
         private bool CheckMaxLevel(double start_level, List<RunBlock> Items)
         {
-            if (start_level >= this._maxReservoirHeight  )
+            if (start_level >= this._maxReservoirHeight)
                 return true;
-            if(Items != null)
+            if (Items != null)
             {
-                foreach(var item in Items)
+                foreach (var item in Items)
                 {
                     if (item.ReservoirStartHeight >= this._maxReservoirHeight || item.ReservoirEndHeight >= this._maxReservoirHeight)
                         return true;
                 }
             }
-              
-            
+
+
             return false;
         }
-        
+
         private bool CheckMaxLevel(double start_level, double middle_level, double end_level)
         {
             if (start_level >= this._maxReservoirHeight || middle_level >= this._maxReservoirHeight || end_level >= this._maxReservoirHeight)
@@ -194,7 +194,7 @@
                         }
                         current_best_solution.TotalCompare = sumCompareWhole;
                         current_best_solution.TotalFlow = sumFlowWhole;
- 
+
                         current_best_solution.Items = new List<RunBlock>()
                         {
                             new RunBlock()
@@ -239,7 +239,7 @@
                         {//妫�鏌ユ按浣�
                             continue;
                         }
-    
+
                         current_best_solution.TotalCompare = right_solutions.TotalCompare;
                         current_best_solution.TotalFlow = right_solutions.TotalFlow;
                         current_best_solution.Items = new List<RunBlock>(right_solutions.Items);
@@ -272,7 +272,7 @@
 
 
                     if (sumFlowLeft >= this._stationTotalFlow)
-                    { 
+                    {
                         #region 宸︿晶宸茬粡鑳借揪鍒拌姹備簡,鍙宠竟鐨勫叏鍏虫満
                         if (current_best_solution.TotalCompare > sumCompareLeft)
                         {
@@ -288,7 +288,7 @@
 
                             current_best_solution.TotalCompare = sumCompareLeft;
                             current_best_solution.TotalFlow = sumFlowLeft;
-     
+
                             current_best_solution.Items = new List<RunBlock>() {//鍙湁涓�涓椂闂村潡
                                         new RunBlock(){
                                             PumpCount = pumpNum_left ,
@@ -299,14 +299,14 @@
                                             ReservoirStartHeight = _start_level姘村簱姘翠綅,
                                             ReservoirEndHeight = left_end_level
                         } };
-                        } 
+                        }
                         #endregion
                         break;//涓嶇敤鍐嶇户缁簡,鍐嶇户缁� 鍔熺巼鍙細瓒婃潵瓒婂ぇ
                     }
                     else
                     {
                         //宸︿晶缁撴潫鏃剁殑姘翠綅
-                        var left_end_level = CalcReservoirHeight( 
+                        var left_end_level = CalcReservoirHeight(
                                0,
                                splitIndx,
                                sumFlowLeft, this._start_level姘村簱姘翠綅);
@@ -342,7 +342,7 @@
                                     TotalFlow = sumFlowLeft,
                                     ReservoirStartHeight = _start_level姘村簱姘翠綅,
                                     ReservoirEndHeight = left_end_level
-                                }); 
+                                });
                         }
                     }
                 }
@@ -406,14 +406,14 @@
                         return null;
                     if (cache_model.Items.First().PumpCount == lastOpenPumpCount)
                         return null;
-                     
+
                     if (cache_model.TotalFlow + lastTotalFlow >= this._stationTotalFlow)
-                    { 
+                    {
                         BlockItemList cache_model_copy = new BlockItemList();
                         cache_model_copy.TotalCompare = cache_model.TotalCompare;
                         cache_model_copy.TotalFlow = cache_model.TotalFlow;
                         cache_model_copy.Items = new List<RunBlock>(cache_model.Items);
-                        return cache_model_copy; 
+                        return cache_model_copy;
                     }
                 }
             }
@@ -479,7 +479,7 @@
                     }
                     current_best_solution.TotalCompare = sumCompareWhole;
                     current_best_solution.TotalFlow = sumFlowWhole;
- 
+
                     current_best_solution.Items = new List<RunBlock>()
                     {
                         new RunBlock()
@@ -532,7 +532,7 @@
 
                             current_best_solution.TotalCompare = right_solutions.TotalCompare;
                             current_best_solution.TotalFlow = right_solutions.TotalFlow;
-                            current_best_solution.Items = new List<RunBlock>(right_solutions.Items.Count + 1); 
+                            current_best_solution.Items = new List<RunBlock>(right_solutions.Items.Count + 1);
                             current_best_solution.Items.Add(new RunBlock()
                             {
                                 PumpCount = 0,
@@ -586,7 +586,7 @@
                                         continue;
                                     }
                                     current_best_solution.TotalCompare = left_sumCompareLeft;
-                                    current_best_solution.TotalFlow = left_sumFlowLeft; 
+                                    current_best_solution.TotalFlow = left_sumFlowLeft;
                                     current_best_solution.Items = new List<RunBlock>() {
                                         new RunBlock(){
                                             PumpCount = pumpNum_left ,
@@ -624,7 +624,7 @@
                                     }
                                     current_best_solution.TotalCompare = cur_sumPower;
                                     current_best_solution.TotalFlow = left_sumFlowLeft + right_solutions.TotalFlow;
-  
+
                                     current_best_solution.Items = new List<RunBlock>(right_solutions.Items);
                                     current_best_solution.Items.Insert(0,//鍦ㄥ墠闈㈡彃鍏ュ乏渚ф椂闂村潡
                                         new RunBlock()
diff --git "a/Calc/IStation.Calc.Core/\351\200\222\345\275\222\350\256\241\347\256\2272/ErQuCalcHelper_2_\351\200\222\345\275\222_\345\256\232\346\260\264\344\275\215_\346\214\207\345\256\232\346\227\266\351\227\264.cs" "b/Calc/IStation.Calc.Core/\351\200\222\345\275\222\350\256\241\347\256\2272/ErQuCalcHelper_2_\351\200\222\345\275\222_\345\256\232\346\260\264\344\275\215_\346\214\207\345\256\232\346\227\266\351\227\264.cs"
index 48449ec..fc4d50a 100644
--- "a/Calc/IStation.Calc.Core/\351\200\222\345\275\222\350\256\241\347\256\2272/ErQuCalcHelper_2_\351\200\222\345\275\222_\345\256\232\346\260\264\344\275\215_\346\214\207\345\256\232\346\227\266\351\227\264.cs"
+++ "b/Calc/IStation.Calc.Core/\351\200\222\345\275\222\350\256\241\347\256\2272/ErQuCalcHelper_2_\351\200\222\345\275\222_\345\256\232\346\260\264\344\275\215_\346\214\207\345\256\232\346\227\266\351\227\264.cs"
@@ -7,8 +7,7 @@
 namespace IStation.Calc
 {
     internal partial class ErQuCalcHelper_2_閫掑綊_瀹氭按浣峗鎸囧畾鏃堕棿 : ErQuCalcHelper_2_閫掑綊_瀹氭按閲�
-    {
-
+    { 
         /// <summary>
         /// 
         /// </summary>
diff --git a/Desktop/IStation.Desktop.ChCalc/Program.cs b/Desktop/IStation.Desktop.ChCalc/Program.cs
index 5cf451b..849edae 100644
--- a/Desktop/IStation.Desktop.ChCalc/Program.cs
+++ b/Desktop/IStation.Desktop.ChCalc/Program.cs
@@ -38,7 +38,7 @@
             System.Windows.Forms.Application.EnableVisualStyles();
             System.Windows.Forms.Application.SetCompatibleTextRenderingDefault(false);
 
-            IStation.LogHelper.Initial();
+            //IStation.LogHelper.Initial();
 
             //字体
             var font = new System.Drawing.Font("微软雅黑", 10);
diff --git a/Library/Newtonsoft.Json.dll b/Library/Newtonsoft.Json.dll
index 7af125a..341d08f 100644
--- a/Library/Newtonsoft.Json.dll
+++ b/Library/Newtonsoft.Json.dll
Binary files differ

--
Gitblit v1.9.3