Skip to content

Commit

Permalink
fix(schema): update df schema to 1.13.1
Browse files Browse the repository at this point in the history
  • Loading branch information
MingboPeng committed Feb 4, 2025
1 parent db3865b commit 0f119f6
Show file tree
Hide file tree
Showing 13 changed files with 10,922 additions and 10,708 deletions.
21,453 changes: 10,754 additions & 10,699 deletions .openapi-docs/model_inheritance.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions .openapi-docs/model_mapper.json
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@
"ScheduleUnitType": "honeybee_schema.energy.schedule",
"ShadeLocation": "honeybee_schema.energy.construction",
"SlatOrientation": "honeybee_schema.energy.material",
"StoryType": "dragonfly_schema.model",
"Units": "honeybee_schema.model",
"VAVEquipmentType": "honeybee_schema.energy.hvac.allair",
"VRFEquipmentType": "honeybee_schema.energy.hvac.heatcool",
Expand Down
2 changes: 1 addition & 1 deletion src/DragonflySchema/DragonflySchema.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFrameworks>netstandard2.0;net452</TargetFrameworks>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<Version>1.1206.0</Version>
<Version>1.1301.0</Version>
<Authors>Ladybug Tools</Authors>
<Description>This is the .Net version of Dragonfly Schema</Description>
<Copyright>Copyright © 2025 Ladybug Tools LLC</Copyright>
Expand Down
34 changes: 32 additions & 2 deletions src/DragonflySchema/Model/BuildingEnergyPropertiesAbridged.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,16 @@ protected BuildingEnergyPropertiesAbridged()
/// Initializes a new instance of the <see cref="BuildingEnergyPropertiesAbridged" /> class.
/// </summary>
/// <param name="constructionSet">Name of a ConstructionSet to specify all constructions for the Building. If None, the Model global_construction_set will be used.</param>
/// <param name="ceilingPlenumConstruction">Identifier of an OpaqueConstruction for the bottoms of ceiling plenums. Materials should be ordered from the plenum side to the room side. By default, this is a simple acoustic tile construction.</param>
/// <param name="floorPlenumConstruction">Identifier of an OpaqueConstruction for the tops of floor plenums. Materials should be ordered from the plenum side to the room side. By default, this is a simple wood plank construction.</param>
public BuildingEnergyPropertiesAbridged
(
string constructionSet = default
string constructionSet = default, string ceilingPlenumConstruction = default, string floorPlenumConstruction = default
) : base()
{
this.ConstructionSet = constructionSet;
this.CeilingPlenumConstruction = ceilingPlenumConstruction;
this.FloorPlenumConstruction = floorPlenumConstruction;

// Set readonly properties with defaultValue
this.Type = "BuildingEnergyPropertiesAbridged";
Expand All @@ -68,6 +72,24 @@ public BuildingEnergyPropertiesAbridged
[DataMember(Name = "construction_set")]
public string ConstructionSet { get; set; }

/// <summary>
/// Identifier of an OpaqueConstruction for the bottoms of ceiling plenums. Materials should be ordered from the plenum side to the room side. By default, this is a simple acoustic tile construction.
/// </summary>
[Summary(@"Identifier of an OpaqueConstruction for the bottoms of ceiling plenums. Materials should be ordered from the plenum side to the room side. By default, this is a simple acoustic tile construction.")]
[MinLength(1)]
[MaxLength(100)]
[DataMember(Name = "ceiling_plenum_construction")]
public string CeilingPlenumConstruction { get; set; }

/// <summary>
/// Identifier of an OpaqueConstruction for the tops of floor plenums. Materials should be ordered from the plenum side to the room side. By default, this is a simple wood plank construction.
/// </summary>
[Summary(@"Identifier of an OpaqueConstruction for the tops of floor plenums. Materials should be ordered from the plenum side to the room side. By default, this is a simple wood plank construction.")]
[MinLength(1)]
[MaxLength(100)]
[DataMember(Name = "floor_plenum_construction")]
public string FloorPlenumConstruction { get; set; }


/// <summary>
/// Returns the string presentation of the object
Expand All @@ -92,6 +114,8 @@ public override string ToString(bool detailed)
sb.Append("BuildingEnergyPropertiesAbridged:\n");
sb.Append(" Type: ").Append(this.Type).Append("\n");
sb.Append(" ConstructionSet: ").Append(this.ConstructionSet).Append("\n");
sb.Append(" CeilingPlenumConstruction: ").Append(this.CeilingPlenumConstruction).Append("\n");
sb.Append(" FloorPlenumConstruction: ").Append(this.FloorPlenumConstruction).Append("\n");
return sb.ToString();
}

Expand Down Expand Up @@ -153,7 +177,9 @@ public bool Equals(BuildingEnergyPropertiesAbridged input)
if (input == null)
return false;
return base.Equals(input) &&
Extension.Equals(this.ConstructionSet, input.ConstructionSet);
Extension.Equals(this.ConstructionSet, input.ConstructionSet) &&
Extension.Equals(this.CeilingPlenumConstruction, input.CeilingPlenumConstruction) &&
Extension.Equals(this.FloorPlenumConstruction, input.FloorPlenumConstruction);
}


Expand All @@ -168,6 +194,10 @@ public override int GetHashCode()
int hashCode = base.GetHashCode();
if (this.ConstructionSet != null)
hashCode = hashCode * 59 + this.ConstructionSet.GetHashCode();
if (this.CeilingPlenumConstruction != null)
hashCode = hashCode * 59 + this.CeilingPlenumConstruction.GetHashCode();
if (this.FloorPlenumConstruction != null)
hashCode = hashCode * 59 + this.FloorPlenumConstruction.GetHashCode();
return hashCode;
}
}
Expand Down
30 changes: 29 additions & 1 deletion src/DragonflySchema/Model/Room2D.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,16 @@ protected Room2D()
/// <param name="isTopExposed">A boolean noting whether this Room2D has its ceiling exposed to the outdoors.</param>
/// <param name="hasFloor">A boolean for whether the room has a Floor (True) or an AirBoundary (False). If False, this property will only be meaningful if the model is translated to Honeybee with ceiling adjacency solved and there is a Room2D below this one with a has_ceiling property set to False.</param>
/// <param name="hasCeiling">A boolean for whether the room has a RoofCeiling (True) or an AirBoundary (False). If False, this property will only be meaningful if the model is translated to Honeybee with ceiling adjacency solved and there is a Room2D above this one with a has_floor property set to False.</param>
/// <param name="ceilingPlenumDepth">A number for the depth that a ceiling plenum extends into the room. Setting this to a positive value will result in a separate plenum room being split off of the Room2D volume during translation from Dragonfly to Honeybee. The bottom of this ceiling plenum will always be at this Room2D ceiling height minus the value specified here. Setting this to zero indicates that the room has no ceiling plenum.</param>
/// <param name="floorPlenumDepth">A number for the depth that a floor plenum extends into the room. Setting this to a positive value will result in a separate plenum room being split off of the Room2D volume during translation from Dragonfly to Honeybee. The top of this floor plenum will always be at this Room2D floor height plus the value specified here. Setting this to zero indicates that the room has no floor plenum.</param>
/// <param name="boundaryConditions">A list of boundary conditions that match the number of segments in the input floor_geometry + floor_holes. These will be used to assign boundary conditions to each of the walls of the Room in the resulting model. Their order should align with the order of segments in the floor_boundary and then with each hole segment. If None, all boundary conditions will be Outdoors or Ground depending on whether ceiling height of the room is at or below 0 (the assumed ground plane).</param>
/// <param name="windowParameters">A list of WindowParameter objects that dictate how the window geometries will be generated for each of the walls. If None, no windows will exist over the entire Room2D.</param>
/// <param name="shadingParameters">A list of ShadingParameter objects that dictate how the shade geometries will be generated for each of the walls. If None, no shades will exist over the entire Room2D.</param>
/// <param name="airBoundaries">A list of booleans for whether each wall has an air boundary type. False values indicate a standard opaque type while True values indicate an AirBoundary type. All walls will be False by default. Note that any walls with a True air boundary must have a Surface boundary condition without any windows.</param>
/// <param name="skylightParameters">A SkylightParameter object describing how to generate skylights. If None, no skylights will exist on the Room2D.</param>
public Room2D
(
string identifier, List<List<double>> floorBoundary, double floorHeight, double floorToCeilingHeight, Room2DPropertiesAbridged properties, string displayName = default, object userData = default, List<List<List<double>>> floorHoles = default, bool isGroundContact = false, bool isTopExposed = false, bool hasFloor = true, bool hasCeiling = true, List<AnyOf<Ground, Outdoors, Surface, Adiabatic, OtherSideTemperature>> boundaryConditions = default, List<AnyOf<SingleWindow, SimpleWindowArea, SimpleWindowRatio, RepeatingWindowRatio, RectangularWindows, DetailedWindows>> windowParameters = default, List<AnyOf<ExtrudedBorder, Overhang, LouversByDistance, LouversByCount>> shadingParameters = default, List<bool> airBoundaries = default, AnyOf<GriddedSkylightArea, GriddedSkylightRatio, DetailedSkylights> skylightParameters = default
string identifier, List<List<double>> floorBoundary, double floorHeight, double floorToCeilingHeight, Room2DPropertiesAbridged properties, string displayName = default, object userData = default, List<List<List<double>>> floorHoles = default, bool isGroundContact = false, bool isTopExposed = false, bool hasFloor = true, bool hasCeiling = true, double ceilingPlenumDepth = 0D, double floorPlenumDepth = 0D, List<AnyOf<Ground, Outdoors, Surface, Adiabatic, OtherSideTemperature>> boundaryConditions = default, List<AnyOf<SingleWindow, SimpleWindowArea, SimpleWindowRatio, RepeatingWindowRatio, RectangularWindows, DetailedWindows>> windowParameters = default, List<AnyOf<ExtrudedBorder, Overhang, LouversByDistance, LouversByCount>> shadingParameters = default, List<bool> airBoundaries = default, AnyOf<GriddedSkylightArea, GriddedSkylightRatio, DetailedSkylights> skylightParameters = default
) : base(identifier: identifier, displayName: displayName, userData: userData)
{
this.FloorBoundary = floorBoundary ?? throw new System.ArgumentNullException("floorBoundary is a required property for Room2D and cannot be null");
Expand All @@ -72,6 +74,8 @@ public Room2D
this.IsTopExposed = isTopExposed;
this.HasFloor = hasFloor;
this.HasCeiling = hasCeiling;
this.CeilingPlenumDepth = ceilingPlenumDepth;
this.FloorPlenumDepth = floorPlenumDepth;
this.BoundaryConditions = boundaryConditions;
this.WindowParameters = windowParameters;
this.ShadingParameters = shadingParameters;
Expand Down Expand Up @@ -155,6 +159,22 @@ public Room2D
[DataMember(Name = "has_ceiling")]
public bool HasCeiling { get; set; } = true;

/// <summary>
/// A number for the depth that a ceiling plenum extends into the room. Setting this to a positive value will result in a separate plenum room being split off of the Room2D volume during translation from Dragonfly to Honeybee. The bottom of this ceiling plenum will always be at this Room2D ceiling height minus the value specified here. Setting this to zero indicates that the room has no ceiling plenum.
/// </summary>
[Summary(@"A number for the depth that a ceiling plenum extends into the room. Setting this to a positive value will result in a separate plenum room being split off of the Room2D volume during translation from Dragonfly to Honeybee. The bottom of this ceiling plenum will always be at this Room2D ceiling height minus the value specified here. Setting this to zero indicates that the room has no ceiling plenum.")]
[Range(0, double.MaxValue)]
[DataMember(Name = "ceiling_plenum_depth")]
public double CeilingPlenumDepth { get; set; } = 0D;

/// <summary>
/// A number for the depth that a floor plenum extends into the room. Setting this to a positive value will result in a separate plenum room being split off of the Room2D volume during translation from Dragonfly to Honeybee. The top of this floor plenum will always be at this Room2D floor height plus the value specified here. Setting this to zero indicates that the room has no floor plenum.
/// </summary>
[Summary(@"A number for the depth that a floor plenum extends into the room. Setting this to a positive value will result in a separate plenum room being split off of the Room2D volume during translation from Dragonfly to Honeybee. The top of this floor plenum will always be at this Room2D floor height plus the value specified here. Setting this to zero indicates that the room has no floor plenum.")]
[Range(0, double.MaxValue)]
[DataMember(Name = "floor_plenum_depth")]
public double FloorPlenumDepth { get; set; } = 0D;

/// <summary>
/// A list of boundary conditions that match the number of segments in the input floor_geometry + floor_holes. These will be used to assign boundary conditions to each of the walls of the Room in the resulting model. Their order should align with the order of segments in the floor_boundary and then with each hole segment. If None, all boundary conditions will be Outdoors or Ground depending on whether ceiling height of the room is at or below 0 (the assumed ground plane).
/// </summary>
Expand Down Expand Up @@ -225,6 +245,8 @@ public override string ToString(bool detailed)
sb.Append(" IsTopExposed: ").Append(this.IsTopExposed).Append("\n");
sb.Append(" HasFloor: ").Append(this.HasFloor).Append("\n");
sb.Append(" HasCeiling: ").Append(this.HasCeiling).Append("\n");
sb.Append(" CeilingPlenumDepth: ").Append(this.CeilingPlenumDepth).Append("\n");
sb.Append(" FloorPlenumDepth: ").Append(this.FloorPlenumDepth).Append("\n");
sb.Append(" BoundaryConditions: ").Append(this.BoundaryConditions).Append("\n");
sb.Append(" WindowParameters: ").Append(this.WindowParameters).Append("\n");
sb.Append(" ShadingParameters: ").Append(this.ShadingParameters).Append("\n");
Expand Down Expand Up @@ -300,6 +322,8 @@ public bool Equals(Room2D input)
Extension.Equals(this.IsTopExposed, input.IsTopExposed) &&
Extension.Equals(this.HasFloor, input.HasFloor) &&
Extension.Equals(this.HasCeiling, input.HasCeiling) &&
Extension.Equals(this.CeilingPlenumDepth, input.CeilingPlenumDepth) &&
Extension.Equals(this.FloorPlenumDepth, input.FloorPlenumDepth) &&
Extension.AllEquals(this.BoundaryConditions, input.BoundaryConditions) &&
Extension.AllEquals(this.WindowParameters, input.WindowParameters) &&
Extension.AllEquals(this.ShadingParameters, input.ShadingParameters) &&
Expand Down Expand Up @@ -335,6 +359,10 @@ public override int GetHashCode()
hashCode = hashCode * 59 + this.HasFloor.GetHashCode();
if (this.HasCeiling != null)
hashCode = hashCode * 59 + this.HasCeiling.GetHashCode();
if (this.CeilingPlenumDepth != null)
hashCode = hashCode * 59 + this.CeilingPlenumDepth.GetHashCode();
if (this.FloorPlenumDepth != null)
hashCode = hashCode * 59 + this.FloorPlenumDepth.GetHashCode();
if (this.BoundaryConditions != null)
hashCode = hashCode * 59 + this.BoundaryConditions.GetHashCode();
if (this.WindowParameters != null)
Expand Down
17 changes: 15 additions & 2 deletions src/DragonflySchema/Model/Story.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,10 @@ protected Story()
/// <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.</param>
/// <param name="roof">An optional RoofSpecification object containing geometry for generating sloped roofs over the Story. The RoofSpecification will only affect the child Room2Ds that have a True is_top_exposed property and it will only be utilized in translation to Honeybee when the Story multiplier is 1. If None, all Room2D ceilings will be flat.</param>
/// <param name="storyType">Text to indicate the type of story. Stories that are plenums are translated to Honeybee with excluded floor areas.</param>
public Story
(
string identifier, List<Room2D> room2ds, StoryPropertiesAbridged properties, string displayName = default, object userData = default, AnyOf<Autocalculate, double> floorToFloorHeight = default, AnyOf<Autocalculate, double> floorHeight = default, int multiplier = 1, RoofSpecification roof = default
string identifier, List<Room2D> room2ds, StoryPropertiesAbridged properties, string displayName = default, object userData = default, AnyOf<Autocalculate, double> floorToFloorHeight = default, AnyOf<Autocalculate, double> floorHeight = default, int multiplier = 1, RoofSpecification roof = default, StoryType storyType = StoryType.Standard
) : base(identifier: identifier, displayName: displayName, userData: userData)
{
this.Room2ds = room2ds ?? throw new System.ArgumentNullException("room2ds is a required property for Story and cannot be null");
Expand All @@ -61,6 +62,7 @@ public Story
this.FloorHeight = floorHeight ?? new Autocalculate();
this.Multiplier = multiplier;
this.Roof = roof;
this.StoryType = storyType;

// Set readonly properties with defaultValue
this.Type = "Story";
Expand Down Expand Up @@ -117,6 +119,13 @@ public Story
[DataMember(Name = "roof")]
public RoofSpecification Roof { get; set; }

/// <summary>
/// Text to indicate the type of story. Stories that are plenums are translated to Honeybee with excluded floor areas.
/// </summary>
[Summary(@"Text to indicate the type of story. Stories that are plenums are translated to Honeybee with excluded floor areas.")]
[DataMember(Name = "story_type")]
public StoryType StoryType { get; set; } = StoryType.Standard;


/// <summary>
/// Returns the string presentation of the object
Expand Down Expand Up @@ -149,6 +158,7 @@ public override string ToString(bool detailed)
sb.Append(" FloorHeight: ").Append(this.FloorHeight).Append("\n");
sb.Append(" Multiplier: ").Append(this.Multiplier).Append("\n");
sb.Append(" Roof: ").Append(this.Roof).Append("\n");
sb.Append(" StoryType: ").Append(this.StoryType).Append("\n");
return sb.ToString();
}

Expand Down Expand Up @@ -215,7 +225,8 @@ public bool Equals(Story input)
Extension.Equals(this.FloorToFloorHeight, input.FloorToFloorHeight) &&
Extension.Equals(this.FloorHeight, input.FloorHeight) &&
Extension.Equals(this.Multiplier, input.Multiplier) &&
Extension.Equals(this.Roof, input.Roof);
Extension.Equals(this.Roof, input.Roof) &&
Extension.Equals(this.StoryType, input.StoryType);
}


Expand All @@ -240,6 +251,8 @@ public override int GetHashCode()
hashCode = hashCode * 59 + this.Multiplier.GetHashCode();
if (this.Roof != null)
hashCode = hashCode * 59 + this.Roof.GetHashCode();
if (this.StoryType != null)
hashCode = hashCode * 59 + this.StoryType.GetHashCode();
return hashCode;
}
}
Expand Down
Loading

0 comments on commit 0f119f6

Please sign in to comment.