From 7a315cf6e03f54ab62324dae29fe436f0d20520c Mon Sep 17 00:00:00 2001
From: lixiaojun <1287241240@qq.com>
Date: 星期二, 13 八月 2024 11:24:35 +0800
Subject: [PATCH] 计算修改

---
 Hydro/Yw.EPAnet.Core/02-hydraulic/HydraulicCore.cs            |   81 +---------------------------------------
 Hydro/Yw.EPAnet.Core/Yw.EPAnet.Core.csproj                    |    4 ++
 Hydro/Yw.EPAnet.Calcu.Core/Yw.EPAnet.Calcu.Core.csproj        |    6 +++
 Hydro/Yw.EPAnet.Core/01-enum/eOutputType.cs                   |    9 ----
 Hydro/Yw.EPAnet.Core/02-hydraulic/EpanetBase2.2.cs            |    5 --
 Hydro/Yw.EPAnet.Calcu.Core/03-calcu/NetworkCalcuExtensions.cs |    6 +-
 6 files changed, 17 insertions(+), 94 deletions(-)

diff --git a/Hydro/Yw.EPAnet.Calcu.Core/03-calcu/NetworkCalcuExtensions.cs b/Hydro/Yw.EPAnet.Calcu.Core/03-calcu/NetworkCalcuExtensions.cs
index 385870f..50a2250 100644
--- a/Hydro/Yw.EPAnet.Calcu.Core/03-calcu/NetworkCalcuExtensions.cs
+++ b/Hydro/Yw.EPAnet.Calcu.Core/03-calcu/NetworkCalcuExtensions.cs
@@ -27,7 +27,7 @@
             File.WriteAllText(inpFilePath, inpString);
 
             //鍔犺浇绠$綉
-            var epanet = new EPAcore.Core.HydraulicCore(true);
+            var epanet = new HydraulicCore(true);
             var errOpen = epanet.open(inpFilePath, "", "");
             if (errOpen != 0)
             {
@@ -78,7 +78,7 @@
                 for (var j = 0; j < arr.Length; j++)
                 {
                     float v = 0;
-                    var t = (EPAcore.Core.NodeValueType)j;
+                    //var t = (EPAcore.Core.NodeValueType)j;
                     epanet.getnodevalue(i, arrnum[j], ref v);
                     switch (arr[j])
                     {
@@ -109,7 +109,7 @@
                 for (var j = 0; j < arr.Length; j++)
                 {
                     float v = 0;
-                    var t = (EPAcore.Core.NodeValueType)j;
+                    //var t = (EPAcore.Core.NodeValueType)j;
                     epanet.getnodevalue(i, arrnum[j], ref v);
                     switch (arr[j])
                     {
diff --git a/Hydro/Yw.EPAnet.Calcu.Core/Yw.EPAnet.Calcu.Core.csproj b/Hydro/Yw.EPAnet.Calcu.Core/Yw.EPAnet.Calcu.Core.csproj
index d7e4335..a1f1a26 100644
--- a/Hydro/Yw.EPAnet.Calcu.Core/Yw.EPAnet.Calcu.Core.csproj
+++ b/Hydro/Yw.EPAnet.Calcu.Core/Yw.EPAnet.Calcu.Core.csproj
@@ -7,6 +7,12 @@
   </PropertyGroup>
 
   <ItemGroup>
+    <Compile Remove="Node\**" />
+    <EmbeddedResource Remove="Node\**" />
+    <None Remove="Node\**" />
+  </ItemGroup>
+
+  <ItemGroup>
     <Compile Remove="NetWork\NetWork.cs" />
   </ItemGroup>
 
diff --git a/Hydro/Yw.EPAnet.Core/01-enum/eOutputType.cs b/Hydro/Yw.EPAnet.Core/01-enum/eOutputType.cs
index 6501ff5..80b2996 100644
--- a/Hydro/Yw.EPAnet.Core/01-enum/eOutputType.cs
+++ b/Hydro/Yw.EPAnet.Core/01-enum/eOutputType.cs
@@ -1,11 +1,4 @@
-锘縰sing System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Yw.EPAcore.Core;
-
-namespace Yw.EPAnet
+锘縩amespace Yw.EPAnet
 {
     /// <summary>
     /// 杈撳嚭绫诲瀷
diff --git a/Hydro/Yw.EPAnet.Core/02-hydraulic/EpanetBase2.2.cs b/Hydro/Yw.EPAnet.Core/02-hydraulic/EpanetBase2.2.cs
index a3b8085..5131536 100644
--- a/Hydro/Yw.EPAnet.Core/02-hydraulic/EpanetBase2.2.cs
+++ b/Hydro/Yw.EPAnet.Core/02-hydraulic/EpanetBase2.2.cs
@@ -1,13 +1,10 @@
 锘�#define EPA2_2  //EPA2_0
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
 using System.Runtime.InteropServices;
 using System.Text;
 
 
-namespace Yw.EPAcore.Core
+namespace Yw.EPAnet
 {
 
     class HydraulicCoreBase
diff --git a/Hydro/Yw.EPAnet.Core/02-hydraulic/HydraulicCore.cs b/Hydro/Yw.EPAnet.Core/02-hydraulic/HydraulicCore.cs
index 5fa9e59..bd44374 100644
--- a/Hydro/Yw.EPAnet.Core/02-hydraulic/HydraulicCore.cs
+++ b/Hydro/Yw.EPAnet.Core/02-hydraulic/HydraulicCore.cs
@@ -1,86 +1,9 @@
 锘�
 using System.Text;
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using Yw.EPAnet;
 
-namespace Yw.EPAcore.Core
+namespace Yw.EPAnet
 {
-    //public enum NodeValueType
-    //{
-    //    EN_ELEVATION = 0,  //  { Mode parameters }
-    //    EN_BASEDEMAND = 1,
-    //    EN_PATTERN = 2,
-    //    EN_EMITTER = 3,
-    //    EN_INITQUAL = 4,
-    //    EN_SOURCEQUAL = 5,
-    //    EN_SOURCEPAT = 6,
-    //    EN_SOURCETYPE = 7,
-    //    EN_TANKLEVEL = 8,
-    //    EN_DEMAND = 9,
-    //    EN_HEAD = 10,
-    //    EN_PRESSURE = 11,
-    //    EN_QUALITY = 12,
-    //    EN_SOURCEMASS = 13,
-    //    EN_INITVOLUME = 14,
-    //    EN_MIXMODEL = 15,
-    //    EN_MIXZONEVOL = 16,
-    //}
-    //public enum LinkValueType
-    //{
-    //    EN_DIAMETER = 0,  // { Link parameters }
-    //    EN_LENGTH = 1,
-    //    EN_ROUGHNESS = 2,
-    //    EN_MINORLOSS = 3,
-    //    EN_INITSTATUS = 4,
-    //    EN_INITSETTING = 5,
-    //    EN_KBULK = 6,
-    //    EN_KWALL = 7,
-    //    EN_FLOW = 8,
-    //    EN_VELOCITY = 9,
-    //    EN_HEADLOSS = 10,
-    //    EN_STATUS = 11,
-    //    EN_SETTING = 12,
-    //    EN_ENERGY = 13,
-    //}
-    public enum NodeValueType
-    {
-        鏍囬珮 = 0,  //  { Mode parameters }
-        鍩烘湰闇�姘撮噺 = 1,
-        闇�姘撮噺妯″紡 = 2,
-        鎵╂暎鍣ㄧ郴鏁� = 3,
-        鍒濆鐗╄川娴撳害 = 4,
-        杈撳叆鐗╄川娴撳害 = 5,
-        娴撳害妯″紡 = 6,
-        姘存簮绫诲瀷 = 7,
-        姘存睜姘翠綅 = 8,
-        闇�姘撮噺 = 9,
-        缁濆鍘嬪姏 = 10,
-        鑷敱鍘嬪姏 = 11,
-        鐗╄川娴撳害 = 12,
-        鐗╄川鎵╂暎娴撳害 = 13,
-        鍒濆瀹圭Н = 14,
-        澶氱墿璐ㄦ贩鍚堟ā鍨� = 15,
-        澶氱墿璐ㄦ贩鍚堝绉� = 16,
-    }
-    public enum LinkValueType
-    {
-        绠″緞 = 0,  // { Link parameters }
-        绠¢暱 = 1,
-        娴锋.濞佸粔绯绘暟 = 2,
-        灞�閮ㄦ按澶存崯澶� = 3,
-        鍒濆鐘舵�� = 4,
-        鍒濆璁剧疆 = 5,
-        姘翠綋鍙嶅簲绯绘暟 = 6,
-        绠″鍙嶅簲绯绘暟 = 7,
-        娴侀噺 = 8,
-        娴侀�� = 9,
-        姘存崯 = 10,
-        鐘舵�� = 11,
-        璁剧疆 = 12,
-        鍔熺巼 = 13,
-    }
+
     public sealed class HydraulicCore
     {
         public static class Const_class
diff --git a/Hydro/Yw.EPAnet.Core/Yw.EPAnet.Core.csproj b/Hydro/Yw.EPAnet.Core/Yw.EPAnet.Core.csproj
index fdf17fe..b970f31 100644
--- a/Hydro/Yw.EPAnet.Core/Yw.EPAnet.Core.csproj
+++ b/Hydro/Yw.EPAnet.Core/Yw.EPAnet.Core.csproj
@@ -7,4 +7,8 @@
     <PlatformTarget>x64</PlatformTarget>
   </PropertyGroup>
 
+  <ItemGroup>
+    <Compile Remove="EPAmodel.cs" />
+  </ItemGroup>
+
 </Project>

--
Gitblit v1.9.3