Skip to content

Commit

Permalink
Merge pull request #5305 from NREL/5226-remove-unicity-building
Browse files Browse the repository at this point in the history
#5226 - Remove SpaceAndSpaceGroupNames from Building
  • Loading branch information
jmarrec authored Dec 18, 2024
2 parents 537d5ab + ffe88c0 commit 5bc916e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion resources/model/OpenStudio.idd
Original file line number Diff line number Diff line change
Expand Up @@ -5138,7 +5138,6 @@ OS:Building,
\type alpha
\required-field
\reference BuildingNames
\reference SpaceAndSpaceGroupNames
A3, \field Building Sector Type
\deprecated
\type choice
Expand Down
6 changes: 3 additions & 3 deletions src/model/test/Model_GTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -819,13 +819,13 @@ TEST_F(ModelFixture, Ensure_Name_Unicity_SpaceAndSpaceGroupNames) {
// Zone, ZoneList, Space, SpaceList all need to be unique names
Model m;

std::vector<ModelObject> mos{Space{m}, m.getUniqueModelObject<Building>(), BuildingStory{m}, SpaceType{m}, ThermalZone{m}};
EXPECT_EQ(5, m.getObjectsByReference("SpaceAndSpaceGroupNames").size());
std::vector<ModelObject> mos{Space{m}, BuildingStory{m}, SpaceType{m}, ThermalZone{m}};
EXPECT_EQ(4, m.getObjectsByReference("SpaceAndSpaceGroupNames").size());

std::string name = "A Name";

std::vector<std::pair<size_t, size_t>> combinations{
{0, 1}, {0, 2}, {0, 3}, {0, 4}, {1, 2}, {1, 3}, {1, 4}, {2, 3}, {2, 4}, {3, 4},
{0, 1}, {0, 2}, {0, 3}, {1, 2}, {1, 3}, {2, 3},
};

auto resetNames = [&mos]() {
Expand Down

0 comments on commit 5bc916e

Please sign in to comment.