/// <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()); }
/// <summary> /// A verbose string representation of the instance of the <see cref="SeriesBranchBase"/> class. /// </summary> /// <returns>A verbose string representation of the instance of the <see cref="SeriesBranchBase"/> class.</returns> public new string ToVerboseString() { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.AppendLine(); stringBuilder.AppendFormat("----- Transformer --------------------------------------------------------------"); stringBuilder.AppendLine(); stringBuilder.AppendFormat(" Internal ID: " + 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(" From Node: " + FromNode.ToString() + "{0}", Environment.NewLine); stringBuilder.AppendFormat(" To Node: " + ToNode.ToString() + "{0}", Environment.NewLine); stringBuilder.AppendFormat(" Parent Substation: " + m_parentSubstation.ToString() + "{0}", Environment.NewLine); stringBuilder.AppendFormat(" From Node Current: " + m_fromNodeCurrent.ToString() + "{0}", Environment.NewLine); stringBuilder.AppendFormat(" To Node Current: " + m_toNodeCurrent.ToString() + "{0}", Environment.NewLine); stringBuilder.AppendFormat(" From Node Connection Type: " + m_fromNodeConnectionType.ToString() + "{0}", Environment.NewLine); stringBuilder.AppendFormat(" To Node Connection Type: " + m_toNodeConnectionType.ToString() + "{0}", Environment.NewLine); stringBuilder.AppendFormat(" Tap Position Input Key: " + m_tapPositionInputKey + "{0}", Environment.NewLine); stringBuilder.AppendFormat(" Tap Position Measurement: " + m_tapPositionMeasurement + "{0}", Environment.NewLine); stringBuilder.AppendFormat(" Tap Position Output Key: " + m_tapPositionOutputKey + "{0}", Environment.NewLine); stringBuilder.AppendFormat(" Assumed Tap Position: " + AssumedTapPosition.ToString() + "{0}", Environment.NewLine); stringBuilder.AppendFormat(" Fixed Tap Position: " + m_fixedTapPosition.ToString() + "{0}", Environment.NewLine); stringBuilder.AppendFormat(" ULTC Is Enabled: " + m_ultcIsEnabled.ToString() + "{0}", Environment.NewLine); stringBuilder.AppendFormat(" Phase Shift (deg): " + ComputePhaseShift().ToString() + "{0}", Environment.NewLine); stringBuilder.AppendFormat("Off Nominal Tap Ratio (p.u.): " + ComputeOffNominalTapRatio().ToString() + "{0}", Environment.NewLine); stringBuilder.AppendFormat("Effective Complex Multiplier: " + EffectiveComplexMultiplier.ToString() + "{0}", Environment.NewLine); stringBuilder.AppendFormat(m_tapConfiguration.ToVerboseString()); stringBuilder.AppendFormat(RawImpedanceParameters.ToVerboseString()); stringBuilder.AppendLine(); return(stringBuilder.ToString()); }
/// <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()); }
/// <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()); }
/// <summary> /// A verbose string representation of the instance of the <see cref="SeriesBranchBase"/> class. /// </summary> /// <returns>A verbose string representation of the instance of the <see cref="SeriesBranchBase"/> class.</returns> public string ToVerboseString() { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.AppendLine(); stringBuilder.AppendFormat("----- Series Branch 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(" FromNode: " + FromNode.ToString() + "{0}", Environment.NewLine); stringBuilder.AppendFormat(" ToNode: " + ToNode.ToString() + "{0}", Environment.NewLine); stringBuilder.AppendFormat(m_impedance.ToVerboseString()); stringBuilder.AppendLine(); return(stringBuilder.ToString()); }
/// <summary> /// A verbose string representation of the instance of the <see cref="SynchrophasorAnalytics.Modeling.LineSegment"/> class and can be used for detailed text based output via a console or a text file. /// </summary> /// <returns>A verbose string representation of the instance of the <see cref="SynchrophasorAnalytics.Modeling.LineSegment"/> class.</returns> public new string ToVerboseString() { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.AppendLine(); stringBuilder.AppendFormat("----- Line Segment -------------------------------------------------------------"); 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("ParntTrnsmsnLine: " + m_parentTransmissionLine.ToString() + "{0}", Environment.NewLine); stringBuilder.AppendFormat(" FromNode: " + FromNode.ToString() + "{0}", Environment.NewLine); stringBuilder.AppendFormat(" ToNode: " + ToNode.ToString() + "{0}", Environment.NewLine); stringBuilder.AppendFormat(RawImpedanceParameters.ToVerboseString()); stringBuilder.AppendLine(); return(stringBuilder.ToString()); }
/// <summary> /// A verbose string representation of the <see cref="SynchrophasorAnalytics.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="SynchrophasorAnalytics.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()); }
// Check if this can be unified associative range expr public override string ToString() { StringBuilder buf = new StringBuilder(); string postfix = base.ToString(); if (!string.IsNullOrEmpty(postfix)) { buf.Append("("); } buf.Append(FromNode.ToString()); buf.Append(".."); if (HasRangeAmountOperator) { buf.Append("#"); } buf.Append(ToNode.ToString()); if (StepNode != null) { buf.Append(".."); if (DSASM.RangeStepOperator.approxsize == stepoperator) { buf.Append("~"); } else if (DSASM.RangeStepOperator.num == stepoperator) { buf.Append("#"); } buf.Append(StepNode.ToString()); } if (!string.IsNullOrEmpty(postfix)) { buf.Append(")"); } buf.Append(postfix); return(buf.ToString()); }
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()); }
/// <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()); }