Beispiel #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="DOASBase" /> class.
        /// </summary>
        /// <param name="vintage">Text for the vintage of the template system. This will be used to set efficiencies for various pieces of equipment within the system. Further information about these defaults can be found in the version of ASHRAE 90.1 corresponding to the selected vintage. Read-only versions of the standard can be found at: https://www.ashrae.org/technical-resources/standards-and-guidelines/read-only-versions-of-ashrae-standards.</param>
        /// <param name="sensibleHeatRecovery">A number between 0 and 1 for the effectiveness of sensible heat recovery within the system. If None or Autosize, it will be whatever is recommended for the given vintage..</param>
        /// <param name="latentHeatRecovery">A number between 0 and 1 for the effectiveness of latent heat recovery within the system. If None or Autosize, it will be whatever is recommended for the given vintage..</param>
        /// <param name="identifier">Text string for a unique object ID. This identifier remains constant as the object is mutated, copied, and serialized to different formats (eg. dict, idf, osm). This identifier is also used to reference the object across a Model. It must be &lt; 100 characters, use only ASCII characters and exclude (, ; ! \\n \\t). (required).</param>
        /// <param name="displayName">Display name of the object with no character restrictions..</param>
        public DOASBase
        (
            string identifier,                                                                                                                                                       // Required parameters
            string displayName = default, Vintages vintage = default, AnyOf <Autosize, double> sensibleHeatRecovery = default, AnyOf <Autosize, double> latentHeatRecovery = default // Optional parameters
        ) : base(identifier: identifier, displayName: displayName)                                                                                                                   // BaseClass
        {
            this.Vintage = vintage;
            this.SensibleHeatRecovery = sensibleHeatRecovery;
            this.LatentHeatRecovery   = latentHeatRecovery;

            // Set non-required readonly properties with defaultValue
            this.Type = "_DOASBase";
        }
Beispiel #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ScheduleTypeLimit" /> class.
        /// </summary>
        /// <param name="name">Name of the object. Must use only ASCII characters and exclude (, ; ! \\n \\t). It cannot be longer than 100 characters. (required).</param>
        /// <param name="type">type (default to &quot;ScheduleTypeLimit&quot;).</param>
        /// <param name="lowerLimit">Lower limit for the schedule type or NoLimit..</param>
        /// <param name="upperLimit">Upper limit for the schedule type or NoLimit..</param>
        /// <param name="numericType">numericType (default to NumericTypeEnum.Continuous).</param>
        /// <param name="unitType">unitType (default to UnitTypeEnum.Dimensionless).</param>
        public ScheduleTypeLimit(string name, string type = "ScheduleTypeLimit", AnyOf <NoLimit, double> lowerLimit = default, AnyOf <NoLimit, double> upperLimit = default, NumericTypeEnum?numericType = NumericTypeEnum.Continuous, UnitTypeEnum?unitType = UnitTypeEnum.Dimensionless)
        {
            // to ensure "name" is required (not null)
            if (name == null)
            {
                throw new InvalidDataException("name is a required property for ScheduleTypeLimit and cannot be null");
            }
            else
            {
                this.Name = name;
            }

            // use default value if no "type" provided
            if (type == null)
            {
                this.Type = "ScheduleTypeLimit";
            }
            else
            {
                this.Type = type;
            }
            this.LowerLimit = lowerLimit;
            this.UpperLimit = upperLimit;
            // use default value if no "numericType" provided
            if (numericType == null)
            {
                this.NumericType = NumericTypeEnum.Continuous;
            }
            else
            {
                this.NumericType = numericType;
            }
            // use default value if no "unitType" provided
            if (unitType == null)
            {
                this.UnitType = UnitTypeEnum.Dimensionless;
            }
            else
            {
                this.UnitType = unitType;
            }
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="Story" /> class.
        /// </summary>
        /// <param name="room2ds">An array of dragonfly Room2D objects that together form an entire story of a building. (required).</param>
        /// <param name="properties">Extension properties for particular simulation engines (Radiance, EnergyPlus). (required).</param>
        /// <param name="floorToFloorHeight">A number for the distance from the floor plate of this story to the floor of the story above this one (if it exists). If Autocalculate, this value will be the maximum floor_to_ceiling_height of the input room_2ds..</param>
        /// <param name="floorHeight">A number to indicate the height of the floor plane in the Z axis.If Autocalculate, this will be the minimum floor height of all the room_2ds, which is suitable for cases where there are no floor plenums..</param>
        /// <param name="multiplier">An integer that denotes the number of times that this Story is repeated over the height of the building. (default to 1).</param>
        /// <param name="identifier">Text string for a unique object ID. This identifier remains constant as the object is mutated, copied, and serialized to different formats (eg. dict, idf, rad). This identifier is also used to reference the object across a Model. It must be &lt; 100 characters and not contain any spaces or special characters. (required).</param>
        /// <param name="displayName">Display name of the object with no character restrictions..</param>
        /// <param name="userData">Optional dictionary of user data associated with the object.All keys and values of this dictionary should be of a standard data type to ensure correct serialization of the object (eg. str, float, int, list)..</param>
        public Story
        (
            string identifier, List <Room2D> room2ds, StoryPropertiesAbridged properties,                                                                                                                // Required parameters
            string displayName = default, Object userData = default, AnyOf <Autocalculate, double> floorToFloorHeight = default, AnyOf <Autocalculate, double> floorHeight = default, int multiplier = 1 // Optional parameters
        ) : base(identifier: identifier, displayName: displayName, userData: userData)                                                                                                                   // BaseClass
        {
            // to ensure "room2ds" is required (not null)
            this.Room2ds = room2ds ?? throw new ArgumentNullException("room2ds is a required property for Story and cannot be null");
            // to ensure "properties" is required (not null)
            this.Properties         = properties ?? throw new ArgumentNullException("properties is a required property for Story and cannot be null");
            this.FloorToFloorHeight = floorToFloorHeight;
            this.FloorHeight        = floorHeight;
            this.Multiplier         = multiplier;

            // Set non-required readonly properties with defaultValue
            this.Type = "Story";

            // check if object is valid
            if (this.GetType() == typeof(Story))
            {
                this.IsValid(throwException: true);
            }
        }
Beispiel #4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="PeopleAbridged" /> class.
        /// </summary>
        /// <param name="name">Name of the object. Must use only ASCII characters and exclude (, ; ! \\n \\t). It cannot be longer than 100 characters. (required).</param>
        /// <param name="peoplePerArea">People per floor area expressed as [people/m2] (required).</param>
        /// <param name="occupancySchedule">Name of a schedule for the occupancy over the course of the year. The type of this schedule should be Fractional and the fractional values will get multiplied by the people_per_area to yield a complete occupancy profile. (required).</param>
        /// <param name="activitySchedule">Name of a schedule for the activity of the occupants over the course of the year. The type of this schedule should be Power and the values of the schedule equal to the number of Watts given off by an individual person in the room. (required).</param>
        /// <param name="type">type (default to &quot;PeopleAbridged&quot;).</param>
        /// <param name="radiantFraction">The radiant fraction of sensible heat released by people. The defaultvalue is 0.30. (default to 0.3).</param>
        /// <param name="latentFraction">Number for the latent fraction of heat gain due to people or an Autocalculate object..</param>
        public PeopleAbridged(string name, double peoplePerArea, string occupancySchedule, string activitySchedule, string type = "PeopleAbridged", double radiantFraction = 0.3, AnyOf <Autocalculate, double> latentFraction = default)
        {
            // to ensure "name" is required (not null)
            if (name == null)
            {
                throw new InvalidDataException("name is a required property for PeopleAbridged and cannot be null");
            }
            else
            {
                this.Name = name;
            }

            // to ensure "peoplePerArea" is required (not null)
            if (peoplePerArea == null)
            {
                throw new InvalidDataException("peoplePerArea is a required property for PeopleAbridged and cannot be null");
            }
            else
            {
                this.PeoplePerArea = peoplePerArea;
            }

            // to ensure "occupancySchedule" is required (not null)
            if (occupancySchedule == null)
            {
                throw new InvalidDataException("occupancySchedule is a required property for PeopleAbridged and cannot be null");
            }
            else
            {
                this.OccupancySchedule = occupancySchedule;
            }

            // to ensure "activitySchedule" is required (not null)
            if (activitySchedule == null)
            {
                throw new InvalidDataException("activitySchedule is a required property for PeopleAbridged and cannot be null");
            }
            else
            {
                this.ActivitySchedule = activitySchedule;
            }

            // use default value if no "type" provided
            if (type == null)
            {
                this.Type = "PeopleAbridged";
            }
            else
            {
                this.Type = type;
            }
            // use default value if no "radiantFraction" provided
            if (radiantFraction == null)
            {
                this.RadiantFraction = 0.3;
            }
            else
            {
                this.RadiantFraction = radiantFraction;
            }
            this.LatentFraction = latentFraction;
        }
Beispiel #5
0
        /// <summary>
        /// Initializes a new instance of the <see cref="IdealAirSystemAbridged" /> class.
        /// </summary>
        /// <param name="name">Name of the object. Must use only ASCII characters and exclude (, ; ! \\n \\t). It cannot be longer than 100 characters. (required).</param>
        /// <param name="type">type (default to &quot;IdealAirSystemAbridged&quot;).</param>
        /// <param name="economizerType">Text to indicate the type of air-side economizer used on the ideal air system. Economizers will mix in a greater amount of outdoor air to cool the zone (rather than running the cooling system) when the zone needs cooling and the outdoor air is cooler than the zone. (default to EconomizerTypeEnum.DifferentialDryBulb).</param>
        /// <param name="demandControlledVentilation">Boolean to note whether demand controlled ventilation should be used on the system, which will vary the amount of ventilation air according to the occupancy schedule of the zone. (default to false).</param>
        /// <param name="sensibleHeatRecovery">A number between 0 and 1 for the effectiveness of sensible heat recovery within the system. (default to 0).</param>
        /// <param name="latentHeatRecovery">A number between 0 and 1 for the effectiveness of latent heat recovery within the system. (default to 0).</param>
        /// <param name="heatingAirTemperature">A number for the maximum heating supply air temperature [C]. (default to 50).</param>
        /// <param name="coolingAirTemperature">A number for the minimum cooling supply air temperature [C]. (default to 13).</param>
        /// <param name="heatingLimit">A number for the maximum heating capacity in Watts. This can also be an Autosize object to indicate that the capacity should be determined during the EnergyPlus sizing calculation. This can also be a NoLimit boject to indicate no upper limit to the heating capacity..</param>
        /// <param name="coolingLimit">A number for the maximum cooling capacity in Watts. This can also be an Autosize object to indicate that the capacity should be determined during the EnergyPlus sizing calculation. This can also be a NoLimit boject to indicate no upper limit to the cooling capacity..</param>
        /// <param name="heatingAvailability">An optional name of a schedule to set the availability of heating over the course of the simulation..</param>
        /// <param name="coolingAvailability">An optional name of a schedule to set the availability of cooling over the course of the simulation..</param>
        public IdealAirSystemAbridged(string name, string type = "IdealAirSystemAbridged", EconomizerTypeEnum?economizerType = EconomizerTypeEnum.DifferentialDryBulb, bool demandControlledVentilation = false, double sensibleHeatRecovery = 0, double latentHeatRecovery = 0, double heatingAirTemperature = 50, double coolingAirTemperature = 13, AnyOf <NoLimit, Autosize, double> heatingLimit = default, AnyOf <NoLimit, Autosize, double> coolingLimit = default, string heatingAvailability = default, string coolingAvailability = default)
        {
            // to ensure "name" is required (not null)
            if (name == null)
            {
                throw new InvalidDataException("name is a required property for IdealAirSystemAbridged and cannot be null");
            }
            else
            {
                this.Name = name;
            }

            // use default value if no "type" provided
            if (type == null)
            {
                this.Type = "IdealAirSystemAbridged";
            }
            else
            {
                this.Type = type;
            }
            // use default value if no "economizerType" provided
            if (economizerType == null)
            {
                this.EconomizerType = EconomizerTypeEnum.DifferentialDryBulb;
            }
            else
            {
                this.EconomizerType = economizerType;
            }
            // use default value if no "demandControlledVentilation" provided
            if (demandControlledVentilation == null)
            {
                this.DemandControlledVentilation = false;
            }
            else
            {
                this.DemandControlledVentilation = demandControlledVentilation;
            }
            // use default value if no "sensibleHeatRecovery" provided
            if (sensibleHeatRecovery == null)
            {
                this.SensibleHeatRecovery = 0;
            }
            else
            {
                this.SensibleHeatRecovery = sensibleHeatRecovery;
            }
            // use default value if no "latentHeatRecovery" provided
            if (latentHeatRecovery == null)
            {
                this.LatentHeatRecovery = 0;
            }
            else
            {
                this.LatentHeatRecovery = latentHeatRecovery;
            }
            // use default value if no "heatingAirTemperature" provided
            if (heatingAirTemperature == null)
            {
                this.HeatingAirTemperature = 50;
            }
            else
            {
                this.HeatingAirTemperature = heatingAirTemperature;
            }
            // use default value if no "coolingAirTemperature" provided
            if (coolingAirTemperature == null)
            {
                this.CoolingAirTemperature = 13;
            }
            else
            {
                this.CoolingAirTemperature = coolingAirTemperature;
            }
            this.HeatingLimit        = heatingLimit;
            this.CoolingLimit        = coolingLimit;
            this.HeatingAvailability = heatingAvailability;
            this.CoolingAvailability = coolingAvailability;
        }
Beispiel #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Outdoors" /> class.
 /// </summary>
 /// <param name="type">type (default to &quot;Outdoors&quot;).</param>
 /// <param name="sunExposure">A boolean noting whether the boundary is exposed to sun. (default to true).</param>
 /// <param name="windExposure">A boolean noting whether the boundary is exposed to wind. (default to true).</param>
 /// <param name="viewFactor">A number for the view factor to the ground. This can also be an Autocalculate object to have the view factor automatically calculated..</param>
 public Outdoors(string type = "Outdoors", bool sunExposure = true, bool windExposure = true, AnyOf <Autocalculate, double> viewFactor = default)
 {
     // use default value if no "type" provided
     if (type == null)
     {
         this.Type = "Outdoors";
     }
     else
     {
         this.Type = type;
     }
     // use default value if no "sunExposure" provided
     if (sunExposure == null)
     {
         this.SunExposure = true;
     }
     else
     {
         this.SunExposure = sunExposure;
     }
     // use default value if no "windExposure" provided
     if (windExposure == null)
     {
         this.WindExposure = true;
     }
     else
     {
         this.WindExposure = windExposure;
     }
     this.ViewFactor = viewFactor;
 }