示例#1
0
        public void CreatePhasorPairMatrix()
        {
            m_phasorPairMatrix = new PhasorPair[ExpectedVertexSet.Count, ExpectedVertexSet.Count];

            foreach (Node i in ExpectedVertexSet)
            {
                foreach (Node j in ExpectedVertexSet)
                {
                    PhasorPair pair = new PhasorPair(i.Voltage.PositiveSequence.Measurement, j.Voltage.PositiveSequence.Measurement);
                    m_phasorPairMatrix[ExpectedVertexSet.IndexOf(i), ExpectedVertexSet.IndexOf(j)] = pair;
                }
            }
        }
示例#2
0
 public bool CoherencyExistsBetween(VertexCluster fromVertexCluster, VertexCluster toVertexCluster)
 {
     foreach (int fromVertex in fromVertexCluster.Vertices)
     {
         Node fromNode = m_vertexSet.Find(x => x.InternalID == fromVertex);
         foreach (int toVertex in toVertexCluster.Vertices)
         {
             Node toNode = m_vertexSet.Find(x => x.InternalID == toVertex);
             if (fromNode.Voltage.PositiveSequence.Measurement.IncludeInEstimator &&
                 toNode.Voltage.PositiveSequence.Measurement.IncludeInEstimator)
             {
                 PhasorPair vertexPair = new PhasorPair(fromNode.Voltage.PositiveSequence.Measurement, toNode.Voltage.PositiveSequence.Measurement);
                 if (vertexPair.AbsoluteAngleDeltaInDegrees < AngleDeltaThresholdInDegrees)
                 {
                     return(true);
                 }
             }
         }
     }
     return(false);
 }