public static void PopulateEquipmentProperties(Equipment cimEquipment, ResourceDescription rd) { if ((cimEquipment != null) && (rd != null)) { IES1Converter.PopulatePowerSystemResourceProperties(cimEquipment, rd); if (cimEquipment.AggregateHasValue) { rd.AddProperty(new Property(ModelCode.EQUIPMENT_AGGREGATE, cimEquipment.Aggregate)); } if (cimEquipment.NormallyInServiceHasValue) { rd.AddProperty(new Property(ModelCode.EQUIPMENT_NORMALLYINSERVICE, cimEquipment.NormallyInService)); } } }
public static void PopulateRegulatingControlProperties(RegulatingControl rc, ResourceDescription rd, ImportHelper importHelper, TransformAndLoadReport report) { if ((rc != null) && (rd != null)) { IES1Converter.PopulatePowerSystemResourceProperties(rc, rd); if (rc.DiscreteHasValue) { rd.AddProperty(new Property(ModelCode.REGULATING_CONTROL_DISCRETE, rc.Discrete)); } if (rc.ModeHasValue) { rd.AddProperty(new Property(ModelCode.REGULATING_CONTROL_MODE, (short)GetRegulatingControlModeKind(rc.Mode))); } if (rc.MonitoredPhaseHasValue) { rd.AddProperty(new Property(ModelCode.REGULATING_CONTROL_MONITORED_PHASE, (short)GetDMSPhaseCode(rc.MonitoredPhase))); } if (rc.TargetRangeHasValue) { rd.AddProperty(new Property(ModelCode.REGULATING_CONTROL_TARGET_RANGE, rc.TargetRange)); } if (rc.TargetValueHasValue) { rd.AddProperty(new Property(ModelCode.REGULATING_CONTROL_TARGET_VALUE, rc.TargetValue)); } if (rc.TerminalHasValue) { long gid = importHelper.GetMappedGID(rc.Terminal.ID); if (gid < 0) { report.Report.Append("WARNING: Convert ").Append(rc.GetType().ToString()).Append(" rdfID = \"").Append(rc.ID); report.Report.Append("\" - Failed to set reference to Terminal: rdfID \"").Append(rc.Terminal.ID).AppendLine(" \" is not mapped to GID!"); } rd.AddProperty(new Property(ModelCode.REGULATING_CONTROL_TERMINAL, gid)); } } }