/// <summary>
        /// A verbose string representation of the <see cref="Switch"/>.
        /// </summary>
        /// <returns>A verbose string representation of the <see cref="Switch"/>.</returns>
        public new string ToVerboseString()
        {
            StringBuilder stringBuilder = new StringBuilder();

            stringBuilder.AppendLine();
            stringBuilder.AppendFormat("----- Switch -------------------------------------------------------------------");
            stringBuilder.AppendLine();
            stringBuilder.AppendFormat("      InternalID: " + InternalID.ToString() + "{0}", Environment.NewLine);
            stringBuilder.AppendFormat("          Number: " + Number.ToString() + "{0}", Environment.NewLine);
            stringBuilder.AppendFormat("            Name: " + Name + "{0}", Environment.NewLine);
            stringBuilder.AppendFormat("     Description: " + Description + "{0}", Environment.NewLine);
            stringBuilder.AppendFormat("        Normally: " + NormalState.ToString() + "{0}", Environment.NewLine);
            stringBuilder.AppendFormat("        Actually: " + ActualState.ToString() + "{0}", Environment.NewLine);
            stringBuilder.AppendFormat("          Manual: " + InManualOverrideMode.ToString() + "{0}", Environment.NewLine);
            stringBuilder.AppendFormat("        FromNode: " + FromNode.ToString() + "{0}", Environment.NewLine);
            stringBuilder.AppendFormat("          ToNode: " + ToNode.ToString() + "{0}", Environment.NewLine);
            if (m_parentSubstation != null)
            {
                stringBuilder.AppendFormat("ParentSubstation: " + m_parentSubstation.ToString() + "{0}", Environment.NewLine);
            }
            if (m_parentTransmissionLine != null)
            {
                stringBuilder.AppendFormat("ParntTrnsmsnLine: " + m_parentTransmissionLine.ToString() + "{0}", Environment.NewLine);
            }
            stringBuilder.AppendFormat("   InDefaultMode: " + m_isInDefaultMode.ToString() + "{0}", Environment.NewLine);
            stringBuilder.AppendLine();
            return(stringBuilder.ToString());
        }
Exemplo n.º 2
0
        /// <summary>
        /// A verbose string representation of the <see cref="LinearStateEstimator.Modeling.CircuitBreaker"/> and can be used for detailed text based output via a console or a text file.
        /// </summary>
        /// <returns>A verbose string representation of the <see cref="LinearStateEstimator.Modeling.CircuitBreaker"/>.</returns>
        public new string ToVerboseString()
        {
            StringBuilder stringBuilder = new StringBuilder();

            stringBuilder.AppendLine();
            stringBuilder.AppendFormat("----- Circuit Breaker ----------------------------------------------------------");
            stringBuilder.AppendLine();
            stringBuilder.AppendFormat("      InternalID: " + InternalID.ToString() + "{0}", Environment.NewLine);
            stringBuilder.AppendFormat("          Number: " + Number.ToString() + "{0}", Environment.NewLine);
            stringBuilder.AppendFormat("            Name: " + Name + "{0}", Environment.NewLine);
            stringBuilder.AppendFormat("     Description: " + Description + "{0}", Environment.NewLine);
            stringBuilder.AppendFormat(" Can Infer State: " + CanInferState.ToString() + "{0}", Environment.NewLine);
            stringBuilder.AppendFormat("Group A Reported: " + CrossDevicePhasors.GroupAWasReported + "{0}", Environment.NewLine);
            stringBuilder.AppendFormat("Group B Reported: " + CrossDevicePhasors.GroupBWasReported + "{0}", Environment.NewLine);
            stringBuilder.AppendFormat("          Normal: " + NormalState.ToString() + "{0}", Environment.NewLine);
            stringBuilder.AppendFormat("          Actual: " + ActualState.ToString() + "{0}", Environment.NewLine);
            stringBuilder.AppendFormat("        Measured: " + MeasuredState.ToString() + "{0}", Environment.NewLine);
            stringBuilder.AppendFormat("   Measured Open: " + IsMeasuredOpen.ToString() + "{0}", Environment.NewLine);
            stringBuilder.AppendFormat(" Measured Closed: " + IsMeasuredClosed.ToString() + "{0}", Environment.NewLine);
            stringBuilder.AppendFormat("   Inferred Open: " + IsInferredOpen.ToString() + "{0}", Environment.NewLine);
            stringBuilder.AppendFormat(" Inferred Closed: " + IsInferredClosed.ToString() + "{0}", Environment.NewLine);
            stringBuilder.AppendFormat("         Is Open: " + IsOpen.ToString() + "{0}", Environment.NewLine);
            stringBuilder.AppendFormat("       Is Closed: " + IsClosed.ToString() + "{0}", Environment.NewLine);
            stringBuilder.AppendFormat(" In Pruning Mode: " + InPruningMode.ToString() + "{0}", Environment.NewLine);
            stringBuilder.AppendFormat("          Manual: " + InManualOverrideMode.ToString() + "{0}", Environment.NewLine);
            stringBuilder.AppendFormat("        FromNode: " + FromNode.ToString() + "{0}", Environment.NewLine);
            stringBuilder.AppendFormat("          ToNode: " + ToNode.ToString() + "{0}", Environment.NewLine);
            stringBuilder.AppendFormat("ParentSubstation: " + m_parentSubstation.ToString() + "{0}", Environment.NewLine);
            stringBuilder.AppendFormat("          Status: {0}", Environment.NewLine);
            stringBuilder.AppendFormat(m_breakerStatus.ToStatusString() + "{0}", Environment.NewLine);
            stringBuilder.AppendLine();
            return(stringBuilder.ToString());
        }
Exemplo n.º 3
0
Arquivo: Switch.cs Projeto: lulzzz/lse
        /// <summary>
        /// A verbose string representation of the <see cref="Switch"/>.
        /// </summary>
        /// <returns>A verbose string representation of the <see cref="Switch"/>.</returns>
        public new string ToVerboseString()
        {
            StringBuilder stringBuilder = new StringBuilder();

            stringBuilder.AppendLine();
            stringBuilder.AppendFormat("----- Switch -------------------------------------------------------------------");
            stringBuilder.AppendLine();
            stringBuilder.AppendFormat("      InternalID: " + InternalID.ToString() + "{0}", Environment.NewLine);
            stringBuilder.AppendFormat("          Number: " + Number.ToString() + "{0}", Environment.NewLine);
            stringBuilder.AppendFormat("            Name: " + Name + "{0}", Environment.NewLine);
            stringBuilder.AppendFormat("     Description: " + Description + "{0}", Environment.NewLine);
            stringBuilder.AppendFormat(" Can Infer State: " + CanInferState.ToString() + "{0}", Environment.NewLine);
            stringBuilder.AppendFormat("Group A Reported: " + CrossDevicePhasors.GroupAWasReported + "{0}", Environment.NewLine);
            stringBuilder.AppendFormat("Group B Reported: " + CrossDevicePhasors.GroupBWasReported + "{0}", Environment.NewLine);
            stringBuilder.AppendFormat("        Normally: " + NormalState.ToString() + "{0}", Environment.NewLine);
            stringBuilder.AppendFormat("        Actually: " + ActualState.ToString() + "{0}", Environment.NewLine); stringBuilder.AppendFormat("   Inferred Open: " + IsInferredOpen.ToString() + "{0}", Environment.NewLine);
            stringBuilder.AppendFormat(" Inferred Closed: " + IsInferredClosed.ToString() + "{0}", Environment.NewLine);
            stringBuilder.AppendFormat("         Is Open: " + IsOpen.ToString() + "{0}", Environment.NewLine);
            stringBuilder.AppendFormat("       Is Closed: " + IsClosed.ToString() + "{0}", Environment.NewLine);
            stringBuilder.AppendFormat(" In Pruning Mode: " + InPruningMode.ToString() + "{0}", Environment.NewLine);
            stringBuilder.AppendFormat("          Manual: " + InManualOverrideMode.ToString() + "{0}", Environment.NewLine);
            stringBuilder.AppendFormat("        FromNode: " + FromNode.ToString() + "{0}", Environment.NewLine);
            stringBuilder.AppendFormat("          ToNode: " + ToNode.ToString() + "{0}", Environment.NewLine);
            if (m_parentSubstation != null)
            {
                stringBuilder.AppendFormat("ParentSubstation: " + m_parentSubstation.ToString() + "{0}", Environment.NewLine);
            }
            if (m_parentTransmissionLine != null)
            {
                stringBuilder.AppendFormat("ParntTrnsmsnLine: " + m_parentTransmissionLine.ToString() + "{0}", Environment.NewLine);
            }
            stringBuilder.AppendFormat("   InDefaultMode: " + m_isInDefaultMode.ToString() + "{0}", Environment.NewLine);
            stringBuilder.AppendLine();
            return(stringBuilder.ToString());
        }
Exemplo n.º 4
0
        /// <summary>
        /// A verbose string representation of the <see cref="LinearStateEstimator.Modeling.SwitchingDeviceBase"/>  and can be used for detailed text based output via a console or a text file.
        /// </summary>
        /// <returns>A verbose string representation of the <see cref="LinearStateEstimator.Modeling.SwitchingDeviceBase"/>.</returns>
        public string ToVerboseString()
        {
            StringBuilder stringBuilder = new StringBuilder();

            stringBuilder.AppendLine();
            stringBuilder.AppendFormat("----- Switching Device Base ----------------------------------------------------");
            stringBuilder.AppendLine();
            stringBuilder.AppendFormat("      InternalID: " + InternalID.ToString() + "{0}", Environment.NewLine);
            stringBuilder.AppendFormat("          Number: " + Number.ToString() + "{0}", Environment.NewLine);
            stringBuilder.AppendFormat("            Name: " + Name + "{0}", Environment.NewLine);
            stringBuilder.AppendFormat("     Description: " + Description + "{0}", Environment.NewLine);
            stringBuilder.AppendFormat("        Normally: " + NormalState.ToString() + "{0}", Environment.NewLine);
            stringBuilder.AppendFormat("        Actually: " + ActualState.ToString() + "{0}", Environment.NewLine);
            stringBuilder.AppendFormat("          Manual: " + InManualOverrideMode.ToString() + "{0}", Environment.NewLine);
            stringBuilder.AppendFormat("        FromNode: " + FromNode.ToString() + "{0}", Environment.NewLine);
            stringBuilder.AppendFormat("          ToNode: " + ToNode.ToString() + "{0}", Environment.NewLine);
            stringBuilder.AppendLine();
            return(stringBuilder.ToString());
        }
Exemplo n.º 5
0
Arquivo: Switch.cs Projeto: lulzzz/lse
        public new string ToCsvLineString()
        {
            StringBuilder csvLine = new StringBuilder();

            csvLine.AppendFormat($"{InternalID.ToString()},");
            csvLine.AppendFormat($"{Number.ToString()},");
            csvLine.AppendFormat($"{Name},");
            csvLine.AppendFormat($"{Description},");
            csvLine.AppendFormat($"{CanInferState.ToString()},");
            csvLine.AppendFormat($"{CrossDevicePhasors.GroupAWasReported},");
            csvLine.AppendFormat($"{CrossDevicePhasors.GroupBWasReported},");
            csvLine.AppendFormat($"{NormalState.ToString()},");
            csvLine.AppendFormat($"{ActualState.ToString()},");
            csvLine.AppendFormat($"{IsInferredOpen.ToString()},");
            csvLine.AppendFormat($"{IsInferredClosed.ToString()},");
            csvLine.AppendFormat($"{IsOpen.ToString()},");
            csvLine.AppendFormat($"{IsClosed.ToString()},");
            csvLine.AppendFormat($"{InPruningMode.ToString()},");
            csvLine.AppendFormat($"{InManualOverrideMode.ToString()},");
            csvLine.AppendFormat($"{FromNode.ToString()},");
            csvLine.AppendFormat($"{ToNode.ToString()},");
            if (ParentSubstation != null)
            {
                csvLine.AppendFormat($"{ParentSubstation.Name},");
            }
            else
            {
                csvLine.AppendFormat("None,");
            }
            if (m_parentTransmissionLine != null)
            {
                csvLine.AppendFormat($"{ParentTransmissionLine.Name},");
            }
            else
            {
                csvLine.AppendFormat("None,");
            }
            csvLine.AppendFormat($"{IsInDefaultMode}{Environment.NewLine}");
            return(csvLine.ToString());
        }
Exemplo n.º 6
0
        /// <summary>
        /// A verbose string representation of the <see cref="LinearStateEstimator.Modeling.CircuitBreaker"/> and can be used for detailed text based output via a console or a text file.
        /// </summary>
        /// <returns>A verbose string representation of the <see cref="LinearStateEstimator.Modeling.CircuitBreaker"/>.</returns>
        public new string ToVerboseString()
        {
            StringBuilder stringBuilder = new StringBuilder();

            stringBuilder.AppendLine();
            stringBuilder.AppendFormat("----- Circuit Breaker ----------------------------------------------------------");
            stringBuilder.AppendLine();
            stringBuilder.AppendFormat("      InternalID: " + InternalID.ToString() + "{0}", Environment.NewLine);
            stringBuilder.AppendFormat("          Number: " + Number.ToString() + "{0}", Environment.NewLine);
            stringBuilder.AppendFormat("            Name: " + Name + "{0}", Environment.NewLine);
            stringBuilder.AppendFormat("     Description: " + Description + "{0}", Environment.NewLine);
            stringBuilder.AppendFormat("        Normally: " + NormalState.ToString() + "{0}", Environment.NewLine);
            stringBuilder.AppendFormat("        Actually: " + ActualState.ToString() + "{0}", Environment.NewLine);
            stringBuilder.AppendFormat("          Manual: " + InManualOverrideMode.ToString() + "{0}", Environment.NewLine);
            stringBuilder.AppendFormat("        FromNode: " + FromNode.ToString() + "{0}", Environment.NewLine);
            stringBuilder.AppendFormat("          ToNode: " + ToNode.ToString() + "{0}", Environment.NewLine);
            stringBuilder.AppendFormat("ParentSubstation: " + m_parentSubstation.ToString() + "{0}", Environment.NewLine);
            stringBuilder.AppendFormat("          Status: {0}", Environment.NewLine);
            stringBuilder.AppendFormat(m_breakerStatus.ToStatusString() + "{0}", Environment.NewLine);
            stringBuilder.AppendLine();
            return(stringBuilder.ToString());
        }