| | |
| | | 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); |