namespace Yw.EPAnet
|
{
|
/// <summary>
|
/// 水力管网(方法)
|
/// </summary>
|
public partial class Network
|
{
|
|
/// <summary>
|
/// 获取所有组件
|
/// </summary>
|
public List<Parter> GetAllParters()
|
{
|
var list = new List<Parter>();
|
if (this.Reservoirs != null && this.Reservoirs.Count > 0)
|
{
|
list.AddRange(this.Reservoirs);
|
}
|
if (this.Tanks != null && this.Tanks.Count > 0)
|
{
|
list.AddRange(this.Tanks);
|
}
|
if (this.Waterboxs != null && this.Waterboxs.Count > 0)
|
{
|
list.AddRange(this.Waterboxs);
|
}
|
if (this.Junctions != null && this.Junctions.Count > 0)
|
{
|
list.AddRange(this.Junctions);
|
}
|
if (this.Nozzles != null && this.Nozzles.Count > 0)
|
{
|
list.AddRange(this.Nozzles);
|
}
|
if (this.Hydrants != null && this.Hydrants.Count > 0)
|
{
|
list.AddRange(this.Hydrants);
|
}
|
if (this.Bluntheads != null && this.Bluntheads.Count > 0)
|
{
|
list.AddRange(this.Bluntheads);
|
}
|
if (this.Elbows != null && this.Elbows.Count > 0)
|
{
|
list.AddRange(this.Elbows);
|
}
|
if (this.Threelinks != null && this.Threelinks.Count > 0)
|
{
|
list.AddRange(this.Threelinks);
|
}
|
if (this.Fourlinks != null && this.Fourlinks.Count > 0)
|
{
|
list.AddRange(this.Fourlinks);
|
}
|
if (this.Meters != null && this.Meters.Count > 0)
|
{
|
list.AddRange(this.Meters);
|
}
|
if (this.Flowmeters != null && this.Flowmeters.Count > 0)
|
{
|
list.AddRange(this.Flowmeters);
|
}
|
if (this.Pressmeters != null && this.Pressmeters.Count > 0)
|
{
|
list.AddRange(this.Pressmeters);
|
}
|
|
if (this.Pipes != null && this.Pipes.Count > 0)
|
{
|
list.AddRange(this.Pipes);
|
}
|
if (this.Translations != null && this.Translations.Count > 0)
|
{
|
list.AddRange(this.Translations);
|
}
|
if (this.Pumps != null && this.Pumps.Count > 0)
|
{
|
list.AddRange(this.Pumps);
|
}
|
if (this.Valves != null && this.Valves.Count > 0)
|
{
|
list.AddRange(this.Valves);
|
}
|
if (this.Exchangers != null && this.Exchangers.Count > 0)
|
{
|
list.AddRange(this.Exchangers);
|
}
|
if (this.Compressors != null && this.Compressors.Count > 0)
|
{
|
list.AddRange(this.Compressors);
|
}
|
|
if (this.Curves != null && this.Curves.Count > 0)
|
{
|
list.AddRange(this.Curves);
|
}
|
if (this.Patterns != null && this.Patterns.Count > 0)
|
{
|
list.AddRange(this.Patterns);
|
}
|
if (this.Rules != null && this.Rules.Count > 0)
|
{
|
list.AddRange(this.Rules);
|
}
|
|
return list;
|
}
|
|
/// <summary>
|
/// 获取所有可见组件
|
/// 节点与管段
|
/// </summary>
|
public List<Visual> GetAllVisuals()
|
{
|
var list = new List<Visual>();
|
if (this.Reservoirs != null && this.Reservoirs.Count > 0)
|
{
|
list.AddRange(this.Reservoirs);
|
}
|
if (this.Tanks != null && this.Tanks.Count > 0)
|
{
|
list.AddRange(this.Tanks);
|
}
|
if (this.Waterboxs != null && this.Waterboxs.Count > 0)
|
{
|
list.AddRange(this.Waterboxs);
|
}
|
if (this.Junctions != null && this.Junctions.Count > 0)
|
{
|
list.AddRange(this.Junctions);
|
}
|
if (this.Nozzles != null && this.Nozzles.Count > 0)
|
{
|
list.AddRange(this.Nozzles);
|
}
|
if (this.Hydrants != null && this.Hydrants.Count > 0)
|
{
|
list.AddRange(this.Hydrants);
|
}
|
if (this.Bluntheads != null && this.Bluntheads.Count > 0)
|
{
|
list.AddRange(this.Bluntheads);
|
}
|
if (this.Elbows != null && this.Elbows.Count > 0)
|
{
|
list.AddRange(this.Elbows);
|
}
|
if (this.Threelinks != null && this.Threelinks.Count > 0)
|
{
|
list.AddRange(this.Threelinks);
|
}
|
if (this.Fourlinks != null && this.Fourlinks.Count > 0)
|
{
|
list.AddRange(this.Fourlinks);
|
}
|
if (this.Meters != null && this.Meters.Count > 0)
|
{
|
list.AddRange(this.Meters);
|
}
|
if (this.Flowmeters != null && this.Flowmeters.Count > 0)
|
{
|
list.AddRange(this.Flowmeters);
|
}
|
if (this.Pressmeters != null && this.Pressmeters.Count > 0)
|
{
|
list.AddRange(this.Pressmeters);
|
}
|
|
if (this.Pipes != null && this.Pipes.Count > 0)
|
{
|
list.AddRange(this.Pipes);
|
}
|
if (this.Translations != null && this.Translations.Count > 0)
|
{
|
list.AddRange(this.Translations);
|
}
|
if (this.Pumps != null && this.Pumps.Count > 0)
|
{
|
list.AddRange(this.Pumps);
|
}
|
if (this.Valves != null && this.Valves.Count > 0)
|
{
|
list.AddRange(this.Valves);
|
}
|
if (this.Exchangers != null && this.Exchangers.Count > 0)
|
{
|
list.AddRange(this.Exchangers);
|
}
|
if (this.Compressors != null && this.Compressors.Count > 0)
|
{
|
list.AddRange(this.Compressors);
|
}
|
|
return list;
|
}
|
|
/// <summary>
|
/// 获取所有节点
|
/// </summary>
|
public List<Node> GetAllNodes()
|
{
|
var list = new List<Node>();
|
if (this.Reservoirs != null && this.Reservoirs.Count > 0)
|
{
|
list.AddRange(this.Reservoirs);
|
}
|
if (this.Tanks != null && this.Tanks.Count > 0)
|
{
|
list.AddRange(this.Tanks);
|
}
|
if (this.Waterboxs != null && this.Waterboxs.Count > 0)
|
{
|
list.AddRange(this.Waterboxs);
|
}
|
if (this.Junctions != null && this.Junctions.Count > 0)
|
{
|
list.AddRange(this.Junctions);
|
}
|
if (this.Nozzles != null && this.Nozzles.Count > 0)
|
{
|
list.AddRange(this.Nozzles);
|
}
|
if (this.Hydrants != null && this.Hydrants.Count > 0)
|
{
|
list.AddRange(this.Hydrants);
|
}
|
if (this.Bluntheads != null && this.Bluntheads.Count > 0)
|
{
|
list.AddRange(this.Bluntheads);
|
}
|
if (this.Elbows != null && this.Elbows.Count > 0)
|
{
|
list.AddRange(this.Elbows);
|
}
|
if (this.Threelinks != null && this.Threelinks.Count > 0)
|
{
|
list.AddRange(this.Threelinks);
|
}
|
if (this.Fourlinks != null && this.Fourlinks.Count > 0)
|
{
|
list.AddRange(this.Fourlinks);
|
}
|
if (this.Meters != null && this.Meters.Count > 0)
|
{
|
list.AddRange(this.Meters);
|
}
|
if (this.Flowmeters != null && this.Flowmeters.Count > 0)
|
{
|
list.AddRange(this.Flowmeters);
|
}
|
if (this.Pressmeters != null && this.Pressmeters.Count > 0)
|
{
|
list.AddRange(this.Pressmeters);
|
}
|
|
return list;
|
}
|
|
/// <summary>
|
/// 获取所有水源
|
/// </summary>
|
public List<Source> GetAllSources()
|
{
|
var list = new List<Source>();
|
if (this.Reservoirs != null && this.Reservoirs.Count > 0)
|
{
|
list.AddRange(this.Reservoirs);
|
}
|
if (this.Tanks != null && this.Tanks.Count > 0)
|
{
|
list.AddRange(this.Tanks);
|
}
|
if (this.Waterboxs != null && this.Waterboxs.Count > 0)
|
{
|
list.AddRange(this.Waterboxs);
|
}
|
|
return list;
|
}
|
|
/// <summary>
|
/// 获取所有水池
|
/// </summary>
|
public List<Tank> GetTanks()
|
{
|
var list = new List<Tank>();
|
if (this.Tanks != null && this.Tanks.Count > 0)
|
{
|
list.AddRange(this.Tanks);
|
}
|
if (this.Waterboxs != null && this.Waterboxs.Count > 0)
|
{
|
list.AddRange(this.Waterboxs);
|
}
|
|
return list;
|
}
|
|
/// <summary>
|
/// 获取所有连接节点
|
/// </summary>
|
public List<Junction> GetAllJunctions()
|
{
|
var list = new List<Junction>();
|
if (this.Junctions != null && this.Junctions.Count > 0)
|
{
|
list.AddRange(this.Junctions);
|
}
|
if (this.Nozzles != null && this.Nozzles.Count > 0)
|
{
|
list.AddRange(this.Nozzles);
|
}
|
if (this.Hydrants != null && this.Hydrants.Count > 0)
|
{
|
list.AddRange(this.Hydrants);
|
}
|
if (this.Bluntheads != null && this.Bluntheads.Count > 0)
|
{
|
list.AddRange(this.Bluntheads);
|
}
|
if (this.Elbows != null && this.Elbows.Count > 0)
|
{
|
list.AddRange(this.Elbows);
|
}
|
if (this.Threelinks != null && this.Threelinks.Count > 0)
|
{
|
list.AddRange(this.Threelinks);
|
}
|
if (this.Fourlinks != null && this.Fourlinks.Count > 0)
|
{
|
list.AddRange(this.Fourlinks);
|
}
|
if (this.Meters != null && this.Meters.Count > 0)
|
{
|
list.AddRange(this.Meters);
|
}
|
if (this.Flowmeters != null && this.Flowmeters.Count > 0)
|
{
|
list.AddRange(this.Flowmeters);
|
}
|
if (this.Pressmeters != null && this.Pressmeters.Count > 0)
|
{
|
list.AddRange(this.Pressmeters);
|
}
|
|
return list;
|
}
|
|
/// <summary>
|
/// 获取所有连接件
|
/// </summary>
|
public List<Coupling> GetAllCouplings()
|
{
|
var list = new List<Coupling>();
|
if (this.Bluntheads != null && this.Bluntheads.Count > 0)
|
{
|
list.AddRange(this.Bluntheads);
|
}
|
if (this.Elbows != null && this.Elbows.Count > 0)
|
{
|
list.AddRange(this.Elbows);
|
}
|
if (this.Threelinks != null && this.Threelinks.Count > 0)
|
{
|
list.AddRange(this.Threelinks);
|
}
|
if (this.Fourlinks != null && this.Fourlinks.Count > 0)
|
{
|
list.AddRange(this.Fourlinks);
|
}
|
|
return list;
|
}
|
|
/// <summary>
|
/// 获取所有扩散器
|
/// </summary>
|
public List<Emitter> GetAllEmitters()
|
{
|
var list = new List<Emitter>();
|
|
if (this.Nozzles != null && this.Nozzles.Count > 0)
|
{
|
list.AddRange(this.Nozzles);
|
}
|
if (this.Hydrants != null && this.Hydrants.Count > 0)
|
{
|
list.AddRange(this.Hydrants);
|
}
|
|
return list;
|
}
|
|
/// <summary>
|
/// 获取所有管段
|
/// </summary>
|
public List<Link> GetAllLinks()
|
{
|
var list = new List<Link>();
|
if (this.Pipes != null && this.Pipes.Count > 0)
|
{
|
list.AddRange(this.Pipes);
|
}
|
if (this.Translations != null && this.Translations.Count > 0)
|
{
|
list.AddRange(this.Translations);
|
}
|
if (this.Pumps != null && this.Pumps.Count > 0)
|
{
|
list.AddRange(this.Pumps);
|
}
|
if (this.Valves != null && this.Valves.Count > 0)
|
{
|
list.AddRange(this.Valves);
|
}
|
if (this.Exchangers != null && this.Exchangers.Count > 0)
|
{
|
list.AddRange(this.Exchangers);
|
}
|
if (this.Compressors != null && this.Compressors.Count > 0)
|
{
|
list.AddRange(this.Compressors);
|
}
|
|
return list;
|
}
|
|
/// <summary>
|
/// 获取所有管道
|
/// </summary>
|
public List<Pipe> GetAllPipes()
|
{
|
var list = new List<Pipe>();
|
if (this.Pipes != null && this.Pipes.Count > 0)
|
{
|
list.AddRange(this.Pipes);
|
}
|
if (this.Translations != null && this.Translations.Count > 0)
|
{
|
list.AddRange(this.Translations);
|
}
|
|
return list;
|
}
|
|
/// <summary>
|
/// 获取所有阻件
|
/// </summary>
|
public List<Resistance> GetAllResistances()
|
{
|
var list = new List<Resistance>();
|
if (this.Exchangers != null && this.Exchangers.Count > 0)
|
{
|
list.AddRange(this.Exchangers);
|
}
|
if (this.Compressors != null && this.Compressors.Count > 0)
|
{
|
list.AddRange(this.Compressors);
|
}
|
|
return list;
|
}
|
|
/// <summary>
|
/// 获取所有操作
|
/// </summary>
|
public List<Operation> GetAllOperations()
|
{
|
var list = new List<Operation>();
|
|
if (this.Curves != null && this.Curves.Count > 0)
|
{
|
list.AddRange(this.Curves);
|
}
|
if (this.Patterns != null && this.Patterns.Count > 0)
|
{
|
list.AddRange(this.Patterns);
|
}
|
if (this.Rules != null && this.Rules.Count > 0)
|
{
|
list.AddRange(this.Rules);
|
}
|
|
return list;
|
}
|
|
|
|
|
|
}
|
}
|