duheng
2024-11-05 21dd2ae9704c484d5d75b2ed980e5402505da7dc
Hydro/Yw.EPAnet.Calcu.Core/01-network/02-node/03-junction/Junction.cs
@@ -3,7 +3,7 @@
    /// <summary>
    /// 连接节点
    /// </summary>
    public class Junction : Parter, IJunction
    public class Junction : Node, IJunction
    {
        /// <summary>
        /// 
@@ -21,7 +21,7 @@
            this.Elev = rhs.Elev;
            this.Demand = rhs.Demand;
            this.DemandPattern = rhs.DemandPattern;
            this.JunctionType=rhs.JunctionType;
        }
        
@@ -56,15 +56,22 @@
        /// </summary>
        public string DemandPattern { get; set; }
        /// <summary>
        /// 连接类型
        /// </summary>
        public string JunctionType { get; set; }
        /// <summary>
        /// 独立局部损失系数(该值优先级高于全局设置),允许为空, 未设置的Key类型使用全局设置
        /// Key为JunctionMinorLossType, Value为局部损失系数,未找到的Key类型使用全局设置的Key
        /// </summary>
        public Dictionary<string, double> MinorLossSettings { get; set; }
        public List<ILink> NextLinks {
            get
            {
                return Links.FindAll(l => l.StartNode == this ? l.Flow > 0 : l.Flow < 0);
            }
        }
        public List<ILink> PrevLinks
        {
            get
            {
                return Links.FindAll(l => l.StartNode == this ? l.Flow < 0 : l.Flow > 0);
            }
        }
    }
}