| | |
| | | var pTemp = o.DemandPattern; |
| | | if (string.IsNullOrEmpty(pTemp) || pTemp == ";" || pTemp == "_") pTemp = ""; |
| | | junctionStringBuilder.AppendLine($"{o.Id}\t{o.Elev}\t{o.Demand}\t{pTemp}\t;\t" + $"0\tNozzle\t{o.Coefficient}"); |
| | | emitterStringBuilder.AppendLine(o.Id + " " + o.Coefficient); |
| | | double Coe = o.Coefficient * Math.Pow(10 / 101.972, 0.5) / 1000 * 60; |
| | | emitterStringBuilder.AppendLine(o.Id + " " + Coe); |
| | | coorStringBuilder.AppendLine(o.Id + " " + o.Position.X + " " + o.Position.Y); |
| | | }); |
| | | |
| | |
| | | var net = new Network(); |
| | | if (InpPath == null || !File.Exists(InpPath)) return null; |
| | | List<InpCoor> points = new List<InpCoor>(); |
| | | |
| | | StreamReader sr = new StreamReader(InpPath); |
| | | //try |
| | | { |
| | |
| | | } |
| | | } |
| | | break; |
| | | case "EMITTERS": |
| | | { |
| | | string id = parts[0]; |
| | | if (double.TryParse(parts[1], out double x)) |
| | | { |
| | | double Coefficient = x / Math.Pow(10 / 101.972, 0.5) * 1000 / 60; |
| | | net.Nozzles.Find(o => o.Id == id).Coefficient = Coefficient; |
| | | } |
| | | } |
| | | break; |
| | | } |
| | | } |
| | | } |