MCPcopy Create free account
hub / github.com/NatLabRockies/EnergyPlus / checkForUnsupportedObjects

Function checkForUnsupportedObjects

src/ConvertInputFormat/main.cpp:123–239  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121}
122
123bool checkForUnsupportedObjects(json const &epJSON, bool convertHVACTemplate)
124{
125 bool errorsFound = false;
126 constexpr std::array<std::string_view, 32> hvacTemplateObjects = {"HVACTemplate:Thermostat",
127 "HVACTemplate:Zone:IdealLoadsAirSystem",
128 "HVACTemplate:Zone:BaseboardHeat",
129 "HVACTemplate:Zone:FanCoil",
130 "HVACTemplate:Zone:PTAC",
131 "HVACTemplate:Zone:PTHP",
132 "HVACTemplate:Zone:WaterToAirHeatPump",
133 "HVACTemplate:Zone:VRF",
134 "HVACTemplate:Zone:Unitary",
135 "HVACTemplate:Zone:VAV",
136 "HVACTemplate:Zone:VAV:FanPowered",
137 "HVACTemplate:Zone:VAV:HeatAndCool",
138 "HVACTemplate:Zone:ConstantVolume",
139 "HVACTemplate:Zone:DualDuct",
140 "HVACTemplate:System:VRF",
141 "HVACTemplate:System:Unitary",
142 "HVACTemplate:System:UnitaryHeatPump:AirToAir",
143 "HVACTemplate:System:UnitarySystem",
144 "HVACTemplate:System:VAV",
145 "HVACTemplate:System:PackagedVAV",
146 "HVACTemplate:System:ConstantVolume",
147 "HVACTemplate:System:DualDuct",
148 "HVACTemplate:System:DedicatedOutdoorAir",
149 "HVACTemplate:Plant:ChilledWaterLoop",
150 "HVACTemplate:Plant:Chiller",
151 "HVACTemplate:Plant:Chiller:ObjectReference",
152 "HVACTemplate:Plant:Tower",
153 "HVACTemplate:Plant:Tower:ObjectReference",
154 "HVACTemplate:Plant:HotWaterLoop",
155 "HVACTemplate:Plant:Boiler",
156 "HVACTemplate:Plant:Boiler:ObjectReference",
157 "HVACTemplate:Plant:MixedWaterLoop"};
158
159 bool objectFound = false;
160 std::string objectType;
161
162 // For ConvertInputFormat, skip this unless -n option is present to not allow conversion of HVACTemplate objects
163 if (!convertHVACTemplate) {
164 for (size_t count = 0; count < hvacTemplateObjects.size(); ++count) {
165 objectType = hvacTemplateObjects[count];
166 auto it = epJSON.find(objectType);
167 if (it != epJSON.end()) {
168 objectFound = true;
169 break;
170 }
171 }
172 if (objectFound) {
173 displayMessage("HVACTemplate:* objects found. These objects are not supported directly by EnergyPlus.");
174 displayMessage("You must run the ExpandObjects program on this input.");
175 errorsFound = true;
176 }
177 }
178
179 constexpr std::array<std::string_view, 26> groundHTObjects = {"GroundHeatTransfer:Control",
180 "GroundHeatTransfer:Slab:Materials",

Callers 2

processInputMethod · 0.85
processInputFunction · 0.85

Calls 2

displayMessageFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected