示例#1
0
 public static void PopulateDayTypeProperties(DayType dt, ResourceDescription rd)
 {
     if ((dt != null) && (rd != null))
     {
         IES1Converter.PopulateIdentifiedObjectProperties(dt, rd);
     }
 }
示例#2
0
 public static void PopulateConductingEquipmentProperties(ConductingEquipment ce, ResourceDescription rd)
 {
     if ((ce != null) && (rd != null))
     {
         IES1Converter.PopulateEquipmentProperties(ce, rd);
     }
 }
示例#3
0
 public static void PopulatePowerSystemResourceProperties(FTN.PowerSystemResource cimPowerSystemResource, ResourceDescription rd)
 {
     if ((cimPowerSystemResource != null) && (rd != null))
     {
         IES1Converter.PopulateIdentifiedObjectProperties(cimPowerSystemResource, rd);
     }
 }
示例#4
0
 public static void PopulateRegularIntervalSchedule(RegularIntervalSchedule regularIntervalSchedule, ResourceDescription rd)
 {
     if ((regularIntervalSchedule != null) && (rd != null))
     {
         IES1Converter.PopulateBasicIntervalScheduleProperties(regularIntervalSchedule, rd);
     }
 }
示例#5
0
 public static void PopulateShuntCompensatorProperties(ShuntCompensator sc, ResourceDescription rd, ImportHelper importHelper, TransformAndLoadReport report)
 {
     if ((sc != null) && (rd != null))
     {
         IES1Converter.PopulateRegulatingCondEqProperties(sc, rd, importHelper, report);
     }
 }
示例#6
0
        public static void PopulateBasicIntervalScheduleProperties(FTN.BasicIntervalSchedule cimBasicIntervalSchedule, ResourceDescription rd)
        {
            if ((cimBasicIntervalSchedule != null) && rd != null)
            {
                IES1Converter.PopulateIdentifiedObjectProperties(cimBasicIntervalSchedule, rd);

                if (cimBasicIntervalSchedule.StartTimeHasValue)
                {
                    rd.AddProperty(new Property(ModelCode.BASIC_INT_SCHED_STARTTIME, cimBasicIntervalSchedule.StartTime));
                }
                if (cimBasicIntervalSchedule.Value1MultiplierHasValue)
                {
                    rd.AddProperty(new Property(ModelCode.BASIC_INT_SCHED_VAL1MUL, (short)GetUnitMultiplier(cimBasicIntervalSchedule.Value1Multiplier)));
                }
                if (cimBasicIntervalSchedule.Value1UnitHasValue)
                {
                    rd.AddProperty(new Property(ModelCode.BASIC_INT_SCHED_VAL1UNIT, (short)GetUnitSymbol(cimBasicIntervalSchedule.Value1Unit)));
                }
                if (cimBasicIntervalSchedule.Value2MultiplierHasValue)
                {
                    rd.AddProperty(new Property(ModelCode.BASIC_INT_SCHED_VAL2MUL, (short)GetUnitMultiplier(cimBasicIntervalSchedule.Value2Multiplier)));
                }
                if (cimBasicIntervalSchedule.Value2UnitHasValue)
                {
                    rd.AddProperty(new Property(ModelCode.BASIC_INT_SCHED_VAL2UNIT, (short)GetUnitSymbol(cimBasicIntervalSchedule.Value2Unit)));
                }
            }
        }
示例#7
0
        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));
                }
            }
        }
示例#8
0
        /// <summary>
        /// Generic method to create resource description based on DMSType
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="cimObj"></param>
        /// <param name="dmsType"></param>
        /// <returns></returns>
        private ResourceDescription CreateResourceDescription <T>(T cimObj, DMSType dmsType) where T : IdentifiedObject
        {
            if (cimObj == null)
            {
                return(null);
            }

            long gid = ModelCodeHelper.CreateGlobalId(0, (short)dmsType,
                                                      importHelper.CheckOutIndexForDMSType(dmsType));

            var rd = new ResourceDescription(gid);

            importHelper.DefineIDMapping(cimObj.ID, gid);

            IES1Converter.PopulateProperties(cimObj, rd, importHelper, report);

            return(rd);
        }
示例#9
0
        public static void PopulateRegulatingCondEqProperties(RegulatingCondEq rc, ResourceDescription rd, ImportHelper importHelper, TransformAndLoadReport report)
        {
            if ((rc != null) && (rd != null))
            {
                IES1Converter.PopulateConductingEquipmentProperties(rc, rd);

                if (rc.RegulatingControlHasValue)
                {
                    long gid = importHelper.GetMappedGID(rc.RegulatingControl.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 RegulatingControl: rdfID \"").Append(rc.RegulatingControl.ID).AppendLine(" \" is not mapped to GID!");
                    }

                    rd.AddProperty(new Property(ModelCode.REGULATING_CONDEQ_REG_CONTROL, gid));
                }
            }
        }
示例#10
0
        public static void PopulateSeasonDayTypeScheduleProperties(SeasonDayTypeSchedule schedule, ResourceDescription rd, ImportHelper importHelper, TransformAndLoadReport report)
        {
            if ((schedule != null) && (rd != null))
            {
                IES1Converter.PopulateRegularIntervalSchedule(schedule, rd);

                if (schedule.DayTypeHasValue)
                {
                    long gid = importHelper.GetMappedGID(schedule.DayType.ID);
                    if (gid < 0)
                    {
                        report.Report.Append("WARNING: Convert ").Append(schedule.GetType().ToString()).Append(" rdfID = \"").Append(schedule.ID);
                        report.Report.Append("\" - Failed to set reference to DayType: rdfID \"").Append(schedule.DayType.ID).AppendLine(" \" is not mapped to GID!");
                    }

                    rd.AddProperty(new Property(ModelCode.SEASON_DAY_TYPE_SCHEDULE_DAYTYPE, gid));
                }
            }
        }
示例#11
0
        public static void PopulateTerminalProperties(Terminal t, ResourceDescription rd, ImportHelper importHelper, TransformAndLoadReport report)
        {
            if ((t != null) && (rd) != null)
            {
                IES1Converter.PopulateIdentifiedObjectProperties(t, rd);

                if (t.ConductingEquipmentHasValue)
                {
                    long gid = importHelper.GetMappedGID(t.ConductingEquipment.ID);

                    if (gid < 0)
                    {
                        report.Report.Append("WARNING: Convert ").Append(t.GetType().ToString()).Append(" rdfID = \"").Append(t.ID);
                        report.Report.Append("\" - Failed to set reference to ConductingEquipment: rdfID \"").Append(t.ConductingEquipment.ID).AppendLine(" \" is not mapped to GID!");
                    }

                    rd.AddProperty(new Property(ModelCode.TERMINAL_CONDEQ, gid));
                }
            }
        }
示例#12
0
        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));
                }
            }
        }