public static bool UpdateInternalCondition_HDD(this TBD.InternalCondition internalCondition_TBD, InternalCondition internalCondition, ProfileLibrary profileLibrary)
        {
            if (internalCondition_TBD == null || internalCondition == null)
            {
                return(false);
            }

            internalCondition_TBD.description = internalCondition.Name + " - HDD";

            internalCondition_TBD.includeSolarInMRT = 0;

            TBD.Emitter emitter = null;
            double      value   = double.NaN;

            emitter = internalCondition_TBD.GetHeatingEmitter();
            if (emitter != null)
            {
                if (internalCondition.TryGetValue(InternalConditionParameter.HeatingEmitterRadiantProportion, out value))
                {
                    emitter.radiantProportion = System.Convert.ToSingle(value);
                }

                if (internalCondition.TryGetValue(InternalConditionParameter.HeatingEmitterCoefficient, out value))
                {
                    emitter.viewCoefficient = System.Convert.ToSingle(value);
                }
            }

            emitter = internalCondition_TBD.GetCoolingEmitter();
            if (emitter != null)
            {
                if (internalCondition.TryGetValue(InternalConditionParameter.CoolingEmitterRadiantProportion, out value))
                {
                    emitter.radiantProportion = System.Convert.ToSingle(value);
                }

                if (internalCondition.TryGetValue(InternalConditionParameter.CoolingEmitterCoefficient, out value))
                {
                    emitter.viewCoefficient = System.Convert.ToSingle(value);
                }
            }

            TBD.InternalGain internalGain = internalCondition_TBD.GetInternalGain();
            internalGain.name = internalCondition.Name + " - HDD";

            Profile profile = null;

            profile = internalCondition.GetProfile(ProfileType.Infiltration, profileLibrary);
            if (profile != null)
            {
                if (internalCondition.TryGetValue(InternalConditionParameter.InfiltrationAirChangesPerHour, out value))
                {
                    TBD.profile profile_TBD = internalGain.GetProfile((int)TBD.Profiles.ticI);
                    if (profile_TBD != null)
                    {
                        profile_TBD.name   = profile.Name;
                        profile_TBD.type   = TBD.ProfileTypes.ticValueProfile;
                        profile_TBD.factor = 1;
                        profile_TBD.value  = System.Convert.ToSingle(value);
                    }
                }
            }

            TBD.Thermostat thermostat = internalCondition_TBD.GetThermostat();
            if (thermostat != null)
            {
                thermostat.controlRange        = 0;
                thermostat.proportionalControl = 0;

                profile = internalCondition.GetProfile(ProfileType.Heating, profileLibrary);
                if (profile != null)
                {
                    thermostat.name = profile.Name;

                    TBD.profile profile_TBD = thermostat.GetProfile((int)TBD.Profiles.ticLL);
                    if (profile_TBD != null)
                    {
                        value = profile.MaxValue;
                        if (!double.IsNaN(value))
                        {
                            profile_TBD.name   = profile.Name;
                            profile_TBD.type   = TBD.ProfileTypes.ticValueProfile;
                            profile_TBD.factor = 1;
                            profile_TBD.value  = System.Convert.ToSingle(value);
                        }
                    }
                }
            }

            return(true);
        }
Exemplo n.º 2
0
        public static double[] GetNumberOfPeople(TBD.TBDDocument tbdDocument, TBD.zone tbdZone)
        {
            if (tbdDocument == null)
            {
                return(null);
            }

            TBD.dayType[]      aDayTypeArray       = GetDayTypeArray(tbdDocument);
            List <TBD.dayType> aDayTypeList_Unique = GetUnique(aDayTypeArray);

            double[] aHourlyValues       = null;
            double[] aHourlyValuesLatent = null;
            double   aTotalPersonGain    = 0;

            Dictionary <string, double[]> aDictionary_DayType       = new Dictionary <string, double[]>();
            Dictionary <string, double[]> aDictionary_DayTypeLatent = new Dictionary <string, double[]>();

            foreach (TBD.dayType aDayType in aDayTypeList_Unique)
            {
                TBD.InternalCondition aInternalCondition = GetInternalCondition(tbdZone, aDayType);
                if (aInternalCondition == null)
                {
                    continue;
                }

                TBD.IInternalGain aInternalGain = aInternalCondition.GetInternalGain();
                aTotalPersonGain = aInternalGain.personGain;
                TBD.profile aProfile       = aInternalGain.GetProfile((int)TBD.Profiles.ticOSG);
                TBD.profile aProfileLatent = aInternalGain.GetProfile((int)TBD.Profiles.ticOLG);

                //check if profile hourly or yearly if yearly take it and skip next step
                aHourlyValues       = GetHourlyValues(aProfile);
                aHourlyValuesLatent = GetHourlyValues(aProfileLatent);

                //double[] result = x.Select(r => r * factor).ToArray();
                aHourlyValues       = MultiplyByFactor(aHourlyValues, aProfile.factor);
                aHourlyValuesLatent = MultiplyByFactor(aHourlyValuesLatent, aProfile.factor);
                aDictionary_DayType.Add(aDayType.name, aHourlyValues);
                aDictionary_DayTypeLatent.Add(aDayType.name, aHourlyValuesLatent);
            }

            double[] aYearlyValues = new double[8760];
            int      aCount        = 0;

            for (int i = 0; i < 365; i++)
            {
                TBD.dayType aDayType = aDayTypeArray[i];

                if (!aDictionary_DayType.ContainsKey(aDayType.name))
                {
                    break;
                }

                aHourlyValues = aDictionary_DayType[aDayType.name];
                for (int j = 0; j < 24; j++)
                {
                    aYearlyValues[aCount] = aHourlyValues[j];
                    aCount++;
                }
            }

            double[] aYearlyValuesLatent = new double[8760];
            aCount = 0;
            for (int i = 0; i < 365; i++)
            {
                TBD.dayType aDayType = aDayTypeArray[i];

                if (!aDictionary_DayType.ContainsKey(aDayType.name))
                {
                    break;
                }

                aHourlyValuesLatent = aDictionary_DayTypeLatent[aDayType.name];
                for (int j = 0; j < 24; j++)
                {
                    aYearlyValuesLatent[aCount] = aHourlyValuesLatent[j];
                    aCount++;
                }
            }

            double[] aNumberOfPeople = new double[7];

            double aMaxSpecificSensibleGain = aYearlyValues.Max();//Unit W/m2 sensible gain

            aNumberOfPeople[0] = aMaxSpecificSensibleGain;
            double aMaxSpecificLatentGain = aYearlyValuesLatent.Max();//Unit W/m2 latent gain

            aNumberOfPeople[1] = aMaxSpecificLatentGain;
            double aPeopleDesity = (aMaxSpecificLatentGain + aMaxSpecificSensibleGain) / aTotalPersonGain; //Unit people/m2

            aNumberOfPeople[2] = aPeopleDesity;
            double aPeople = tbdZone.floorArea * aPeopleDesity;

            aNumberOfPeople[3] = aPeople;
            double aPersonSensibleGain = aMaxSpecificSensibleGain / aPeopleDesity; //sensible gain per person

            aNumberOfPeople[4] = aPersonSensibleGain;
            double aPersonLatenteGain = aMaxSpecificLatentGain / aPeopleDesity; //sensible gain per person

            aNumberOfPeople[5] = aPersonLatenteGain;
            double aMetabolicRateCheck = aPersonSensibleGain + aPersonLatenteGain;

            aNumberOfPeople[6] = aMetabolicRateCheck;

            return(aYearlyValues);
        }
Exemplo n.º 3
0
        public static InternalCondition ToSAM(this TBD.InternalCondition internalCondition, double area = double.NaN)
        {
            if (internalCondition == null)
            {
                return(null);
            }

            InternalCondition result = new InternalCondition(internalCondition.name);

            TBD.Emitter emitter = null;

            emitter = internalCondition.GetHeatingEmitter();
            if (emitter != null)
            {
                result.SetValue(InternalConditionParameter.HeatingEmitterRadiantProportion, emitter.radiantProportion);
                result.SetValue(InternalConditionParameter.HeatingEmitterCoefficient, emitter.viewCoefficient);
            }

            emitter = internalCondition.GetCoolingEmitter();
            if (emitter != null)
            {
                result.SetValue(InternalConditionParameter.CoolingEmitterRadiantProportion, emitter.radiantProportion);
                result.SetValue(InternalConditionParameter.CoolingEmitterCoefficient, emitter.viewCoefficient);
            }

            TBD.InternalGain internalGain = internalCondition.GetInternalGain();
            if (internalGain != null)
            {
                result.SetValue(InternalConditionParameter.LightingRadiantProportion, internalGain.lightingRadProp);
                result.SetValue(InternalConditionParameter.OccupancyRadiantProportion, internalGain.occupantRadProp);
                result.SetValue(InternalConditionParameter.EquipmentRadiantProportion, internalGain.equipmentRadProp);

                result.SetValue(InternalConditionParameter.LightingViewCoefficient, internalGain.lightingViewCoefficient);
                result.SetValue(InternalConditionParameter.OccupancyViewCoefficient, internalGain.occupantViewCoefficient);
                result.SetValue(InternalConditionParameter.EquipmentViewCoefficient, internalGain.equipmentViewCoefficient);

                TBD.profile profile_TBD = null;
                profile_TBD = internalGain.GetProfile((int)TBD.Profiles.ticI);
                if (profile_TBD != null)
                {
                    result.SetValue(InternalConditionParameter.InfiltrationProfileName, string.Format("{0} [{1}]", internalCondition.name, profile_TBD.name));
                    result.SetValue(InternalConditionParameter.InfiltrationAirChangesPerHour, profile_TBD.GetExtremeValue(true));
                }

                profile_TBD = internalGain.GetProfile((int)TBD.Profiles.ticLG);
                if (profile_TBD != null)
                {
                    result.SetValue(InternalConditionParameter.LightingProfileName, string.Format("{0} [{1}]", internalCondition.name, profile_TBD.name));
                    result.SetValue(InternalConditionParameter.LightingGainPerArea, profile_TBD.GetExtremeValue(true));
                    result.SetValue(InternalConditionParameter.LightingLevel, internalGain.targetIlluminance);
                }

                double personGain = internalGain.personGain;
                double gain       = 0;

                profile_TBD = internalGain.GetProfile((int)TBD.Profiles.ticOSG);
                if (profile_TBD != null)
                {
                    double value = profile_TBD.GetExtremeValue(true);
                    result.SetValue(InternalConditionParameter.OccupancySensibleGainPerPerson, value);
                    gain += value;
                }

                profile_TBD = internalGain.GetProfile((int)TBD.Profiles.ticOLG);
                if (profile_TBD != null)
                {
                    double value = profile_TBD.GetExtremeValue(true);
                    result.SetValue(InternalConditionParameter.OccupancyProfileName, string.Format("{0} [{1}]", internalCondition.name, profile_TBD.name));
                    result.SetValue(InternalConditionParameter.OccupancyLatentGainPerPerson, value);
                    gain += value;
                }

                if (!double.IsNaN(area) && !double.IsNaN(gain))
                {
                    double occupancy = (gain * area) / personGain;
                    result.SetValue(InternalConditionParameter.AreaPerPerson, area / occupancy);
                }

                profile_TBD = internalGain.GetProfile((int)TBD.Profiles.ticESG);
                if (profile_TBD != null)
                {
                    result.SetValue(InternalConditionParameter.EquipmentSensibleProfileName, string.Format("{0} [{1}]", internalCondition.name, profile_TBD.name));
                    result.SetValue(InternalConditionParameter.EquipmentSensibleGainPerArea, profile_TBD.GetExtremeValue(true));
                }

                profile_TBD = internalGain.GetProfile((int)TBD.Profiles.ticELG);
                if (profile_TBD != null)
                {
                    result.SetValue(InternalConditionParameter.EquipmentLatentProfileName, string.Format("{0} [{1}]", internalCondition.name, profile_TBD.name));
                    result.SetValue(InternalConditionParameter.EquipmentLatentGainPerArea, profile_TBD.GetExtremeValue(true));
                }

                profile_TBD = internalGain.GetProfile((int)TBD.Profiles.ticCOG);
                if (profile_TBD != null)
                {
                    result.SetValue(InternalConditionParameter.PollutantProfileName, string.Format("{0} [{1}]", internalCondition.name, profile_TBD.name));
                    result.SetValue(InternalConditionParameter.PollutantGenerationPerArea, profile_TBD.GetExtremeValue(true));
                }
            }

            TBD.Thermostat thermostat = internalCondition.GetThermostat();
            if (internalGain != null)
            {
                TBD.profile profile_TBD = null;

                profile_TBD = thermostat.GetProfile((int)TBD.Profiles.ticUL);
                if (profile_TBD != null)
                {
                    result.SetValue(InternalConditionParameter.CoolingProfileName, string.Format("{0} [{1}]", internalCondition.name, profile_TBD.name));
                }

                profile_TBD = thermostat.GetProfile((int)TBD.Profiles.ticLL);
                if (profile_TBD != null)
                {
                    result.SetValue(InternalConditionParameter.HeatingProfileName, string.Format("{0} [{1}]", internalCondition.name, profile_TBD.name));
                }

                profile_TBD = thermostat.GetProfile((int)TBD.Profiles.ticHLL);
                if (profile_TBD != null)
                {
                    result.SetValue(InternalConditionParameter.HumidificationProfileName, string.Format("{0} [{1}]", internalCondition.name, profile_TBD.name));
                }

                profile_TBD = thermostat.GetProfile((int)TBD.Profiles.ticHUL);
                if (profile_TBD != null)
                {
                    result.SetValue(InternalConditionParameter.DehumidificationProfileName, string.Format("{0} [{1}]", internalCondition.name, profile_TBD.name));
                }
            }

            return(result);
        }
Exemplo n.º 4
0
        public static bool UpdateInternalCondition(this TBD.InternalCondition internalCondition_TBD, Space space, ProfileLibrary profileLibrary)
        {
            if (space == null || internalCondition_TBD == null)
            {
                return(false);
            }

            InternalCondition internalCondition = space.InternalCondition;

            if (internalCondition == null)
            {
                return(false);
            }

            internalCondition_TBD.name        = space.Name;
            internalCondition_TBD.description = internalCondition.Name;

            internalCondition_TBD.includeSolarInMRT = 1;

            TBD.Emitter emitter = null;
            double      value   = double.NaN;

            emitter = internalCondition_TBD.GetHeatingEmitter();
            if (emitter != null)
            {
                emitter.name = internalCondition.GetSystemTypeName <HeatingSystemType>();

                if (internalCondition.TryGetValue(InternalConditionParameter.HeatingEmitterRadiantProportion, out value))
                {
                    emitter.radiantProportion = System.Convert.ToSingle(value);
                }

                if (internalCondition.TryGetValue(InternalConditionParameter.HeatingEmitterCoefficient, out value))
                {
                    emitter.viewCoefficient = System.Convert.ToSingle(value);
                }
            }

            emitter = internalCondition_TBD.GetCoolingEmitter();
            if (emitter != null)
            {
                emitter.name = internalCondition.GetSystemTypeName <CoolingSystemType>();

                if (internalCondition.TryGetValue(InternalConditionParameter.CoolingEmitterRadiantProportion, out value))
                {
                    emitter.radiantProportion = System.Convert.ToSingle(value);
                }

                if (internalCondition.TryGetValue(InternalConditionParameter.CoolingEmitterCoefficient, out value))
                {
                    emitter.viewCoefficient = System.Convert.ToSingle(value);
                }
            }

            TBD.InternalGain internalGain = internalCondition_TBD.GetInternalGain();

            if (internalCondition.TryGetValue(InternalConditionParameter.LightingRadiantProportion, out value))
            {
                internalGain.lightingRadProp = System.Convert.ToSingle(value);
            }

            if (internalCondition.TryGetValue(InternalConditionParameter.OccupancyRadiantProportion, out value))
            {
                internalGain.occupantRadProp = System.Convert.ToSingle(value);
            }

            if (internalCondition.TryGetValue(InternalConditionParameter.EquipmentRadiantProportion, out value))
            {
                internalGain.equipmentRadProp = System.Convert.ToSingle(value);
            }

            if (internalCondition.TryGetValue(InternalConditionParameter.LightingViewCoefficient, out value))
            {
                internalGain.lightingViewCoefficient = System.Convert.ToSingle(value);
            }

            if (internalCondition.TryGetValue(InternalConditionParameter.OccupancyViewCoefficient, out value))
            {
                internalGain.occupantViewCoefficient = System.Convert.ToSingle(value);
            }

            if (internalCondition.TryGetValue(InternalConditionParameter.EquipmentViewCoefficient, out value))
            {
                internalGain.equipmentViewCoefficient = System.Convert.ToSingle(value);
            }

            internalGain.domesticHotWater = (float)0.197;

            internalGain.name        = internalCondition.Name;
            internalGain.description = internalCondition.GetSystemTypeName <VentilationSystemType>();

            if (internalCondition.TryGetValue(InternalConditionParameter.LightingLevel, out value))
            {
                internalGain.targetIlluminance = System.Convert.ToSingle(value);
            }

            internalGain.personGain = 0;
            double occupancyGainPerPerson = Analytical.Query.OccupancyGainPerPerson(space);

            if (!double.IsNaN(occupancyGainPerPerson))
            {
                internalGain.personGain = System.Convert.ToSingle(occupancyGainPerPerson);
            }

            Profile profile = null;

            profile = internalCondition.GetProfile(ProfileType.Infiltration, profileLibrary);
            if (profile != null)
            {
                if (internalCondition.TryGetValue(InternalConditionParameter.InfiltrationAirChangesPerHour, out value))
                {
                    TBD.profile profile_TBD = internalGain.GetProfile((int)TBD.Profiles.ticI);
                    if (profile_TBD != null)
                    {
                        Update(profile_TBD, profile, value);
                    }
                }
            }

            double area = double.NaN;

            if (!space.TryGetValue(SpaceParameter.Area, out area))
            {
                area = double.NaN;
            }

            profile = internalCondition.GetProfile(ProfileType.Lighting, profileLibrary);
            if (profile != null)
            {
                TBD.profile profile_TBD = internalGain.GetProfile((int)TBD.Profiles.ticLG);
                if (profile_TBD != null)
                {
                    double gain = Analytical.Query.CalculatedLightingGain(space);
                    if (double.IsNaN(area) || area == 0 || double.IsNaN(gain))
                    {
                        gain = 0;
                    }
                    else
                    {
                        gain = gain / area;
                    }

                    Update(profile_TBD, profile, gain);
                }
            }

            profile = internalCondition.GetProfile(ProfileType.Occupancy, profileLibrary);
            if (profile != null)
            {
                TBD.profile profile_TBD = null;

                profile_TBD = internalGain.GetProfile((int)TBD.Profiles.ticOLG);
                if (profile_TBD != null)
                {
                    double gain = Analytical.Query.OccupancyLatentGain(space);
                    if (double.IsNaN(area) || area == 0 || double.IsNaN(gain))
                    {
                        gain = 0;
                    }
                    else
                    {
                        gain = gain / area;
                    }

                    Update(profile_TBD, profile, gain);
                }

                profile_TBD = internalGain.GetProfile((int)TBD.Profiles.ticOSG);
                if (profile_TBD != null)
                {
                    double gain = Analytical.Query.OccupancySensibleGain(space);
                    if (double.IsNaN(area) || area == 0 || double.IsNaN(gain))
                    {
                        gain = 0;
                    }
                    else
                    {
                        gain = gain / area;
                    }

                    Update(profile_TBD, profile, gain);
                }
            }

            profile = internalCondition.GetProfile(ProfileType.EquipmentSensible, profileLibrary);
            if (profile != null)
            {
                TBD.profile profile_TBD = internalGain.GetProfile((int)TBD.Profiles.ticESG);
                if (profile_TBD != null)
                {
                    double gain = Analytical.Query.CalculatedEquipmentSensibleGain(space);
                    if (double.IsNaN(area) || area == 0 || double.IsNaN(gain))
                    {
                        gain = 0;
                    }
                    else
                    {
                        gain = gain / area;
                    }

                    Update(profile_TBD, profile, gain);
                }
            }

            profile = internalCondition.GetProfile(ProfileType.EquipmentLatent, profileLibrary);
            if (profile != null)
            {
                TBD.profile profile_TBD = internalGain.GetProfile((int)TBD.Profiles.ticELG);
                if (profile_TBD != null)
                {
                    double gain = Analytical.Query.CalculatedEquipmentLatentGain(space);
                    if (double.IsNaN(area) || area == 0 || double.IsNaN(gain))
                    {
                        gain = 0;
                    }
                    else
                    {
                        gain = gain / area;
                    }

                    Update(profile_TBD, profile, gain);
                }
            }

            profile = internalCondition.GetProfile(ProfileType.Pollutant, profileLibrary);
            if (profile != null)
            {
                TBD.profile profile_TBD = internalGain.GetProfile((int)TBD.Profiles.ticCOG);
                if (profile_TBD != null)
                {
                    double generation = Analytical.Query.CalculatedPollutantGeneration(space);
                    if (double.IsNaN(area) || area == 0 || double.IsNaN(generation))
                    {
                        generation = 0;
                    }
                    else
                    {
                        generation = generation / area;
                    }

                    Update(profile_TBD, profile, generation);
                }
            }

            TBD.Thermostat thermostat = internalCondition_TBD.GetThermostat();
            if (thermostat != null)
            {
                List <string> names = new List <string>();

                thermostat.controlRange        = 0;
                thermostat.proportionalControl = 0;

                profile = internalCondition.GetProfile(ProfileType.Cooling, profileLibrary);
                if (profile != null)
                {
                    names.Add(profile.Name);

                    TBD.profile profile_TBD = thermostat.GetProfile((int)TBD.Profiles.ticUL);
                    if (profile_TBD != null)
                    {
                        Update(profile_TBD, profile, 1);
                    }
                }

                profile = internalCondition.GetProfile(ProfileType.Heating, profileLibrary);
                if (profile != null)
                {
                    names.Add(profile.Name);

                    TBD.profile profile_TBD = thermostat.GetProfile((int)TBD.Profiles.ticLL);
                    if (profile_TBD != null)
                    {
                        Update(profile_TBD, profile, 1);
                    }
                }

                profile = internalCondition.GetProfile(ProfileType.Humidification, profileLibrary);
                if (profile != null)
                {
                    names.Add(profile.Name);

                    TBD.profile profile_TBD = thermostat.GetProfile((int)TBD.Profiles.ticHLL);
                    if (profile_TBD != null)
                    {
                        Update(profile_TBD, profile, 1);
                    }
                }

                profile = internalCondition.GetProfile(ProfileType.Dehumidification, profileLibrary);
                if (profile != null)
                {
                    names.Add(profile.Name);

                    TBD.profile profile_TBD = thermostat.GetProfile((int)TBD.Profiles.ticHUL);
                    if (profile_TBD != null)
                    {
                        Update(profile_TBD, profile, 1);
                    }
                }

                names.RemoveAll(x => string.IsNullOrWhiteSpace(x));

                if (names.Count != 0)
                {
                    thermostat.name = string.Join(" & ", names);
                }
            }

            return(true);
        }
Exemplo n.º 5
0
        public static List <Profile> ToSAM_Profiles(this TBD.InternalCondition internalCondition)
        {
            if (internalCondition == null)
            {
                return(null);
            }

            List <Profile> result = new List <Profile>();

            TBD.InternalGain internalGain = internalCondition.GetInternalGain();
            if (internalGain != null)
            {
                Profile profile = null;

                profile = ToSAM(internalGain, TBD.Profiles.ticI, ProfileType.Infiltration, internalCondition.name);
                if (profile != null)
                {
                    result.Add(profile);
                }

                profile = ToSAM(internalGain, TBD.Profiles.ticLG, ProfileType.Lighting, internalCondition.name);
                if (profile != null)
                {
                    result.Add(profile);
                }

                profile = ToSAM(internalGain, TBD.Profiles.ticOLG, ProfileType.Occupancy, internalCondition.name);
                if (profile != null)
                {
                    result.Add(profile);
                }

                profile = ToSAM(internalGain, TBD.Profiles.ticOSG, ProfileType.Occupancy, internalCondition.name);
                if (profile != null)
                {
                    result.Add(profile);
                }

                profile = ToSAM(internalGain, TBD.Profiles.ticESG, ProfileType.EquipmentSensible, internalCondition.name);
                if (profile != null)
                {
                    result.Add(profile);
                }

                profile = ToSAM(internalGain, TBD.Profiles.ticELG, ProfileType.EquipmentLatent, internalCondition.name);
                if (profile != null)
                {
                    result.Add(profile);
                }

                profile = ToSAM(internalGain, TBD.Profiles.ticCOG, ProfileType.Pollutant, internalCondition.name);
                if (profile != null)
                {
                    result.Add(profile);
                }
            }

            TBD.Thermostat thermostat = internalCondition.GetThermostat();
            if (thermostat != null)
            {
                Profile profile = null;

                profile = ToSAM(thermostat, TBD.Profiles.ticUL, ProfileType.Cooling, internalCondition.name);
                if (profile != null)
                {
                    result.Add(profile);
                }

                profile = ToSAM(thermostat, TBD.Profiles.ticLL, ProfileType.Heating, internalCondition.name);
                if (profile != null)
                {
                    result.Add(profile);
                }

                profile = ToSAM(thermostat, TBD.Profiles.ticHLL, ProfileType.Humidification, internalCondition.name);
                if (profile != null)
                {
                    result.Add(profile);
                }

                profile = ToSAM(thermostat, TBD.Profiles.ticHUL, ProfileType.Dehumidification, internalCondition.name);
                if (profile != null)
                {
                    result.Add(profile);
                }
            }

            return(result);
        }