From 801a451429b294a435e1c69db55c70e20c45444d Mon Sep 17 00:00:00 2001 From: cloudflight <cloudflight@126.com> Date: 星期二, 24 十二月 2024 23:54:11 +0800 Subject: [PATCH] 换热器、普通控制阀状态问题 --- Hydro/Yw.EPAnet.Calcu.Core/04-Inp/InpInteropHelper.cs | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/Hydro/Yw.EPAnet.Calcu.Core/04-Inp/InpInteropHelper.cs b/Hydro/Yw.EPAnet.Calcu.Core/04-Inp/InpInteropHelper.cs index a143881..2c0bf51 100644 --- a/Hydro/Yw.EPAnet.Calcu.Core/04-Inp/InpInteropHelper.cs +++ b/Hydro/Yw.EPAnet.Calcu.Core/04-Inp/InpInteropHelper.cs @@ -155,7 +155,17 @@ valveSb.AppendLine(";ID Node1 Node2 Diameter Type Setting MinorLoss "); network.Valves?.ForEach(x => { - valveSb.AppendLine($"{x.Id}\t{x.StartNode.Id}\t{x.EndNode.Id}\t{x.Diameter:F4}\t{x.ValveType}\t{x.ValveSetting}\t{x.MinorLoss:F4}\t;\t");// + $"0"); + string settings; + if (x.LinkStatus == ValveStatus.None ) + { + settings = x.ValveSetting; + } + else + { + settings = "Undefined"; + } + if (string.IsNullOrEmpty(settings)) settings = "Undefined"; + valveSb.AppendLine($"{x.Id}\t{x.StartNode.Id}\t{x.EndNode.Id}\t{x.Diameter:F4}\t{x.ValveType}\t{settings}\t{x.MinorLoss:F4}\t;\t");// + $"0"); if (!string.IsNullOrEmpty(x.LinkStatus)) { statusSb.AppendLine(x.Id + "\t" + x.LinkStatus); -- Gitblit v1.9.3