Address #4630, wrap Output:Schedules and Output:Constructions objects#4685
Address #4630, wrap Output:Schedules and Output:Constructions objects#4685
Conversation
jmarrec
left a comment
There was a problem hiding this comment.
A straightforward addition. Use a const string&, test that having a blank line in the Output:Constructions object is fine, and it should be good
| result.push_back(IddObjectType::OS_Output_Schedules); | ||
| result.push_back(IddObjectType::OS_Output_Constructions); |
There was a problem hiding this comment.
Yes, need to always FT them
| OS:Output:Constructions, | ||
| \memo Adds a report to the eio output file which shows details for each construction, | ||
| \memo including overall properties, a list of material layers, and calculated results | ||
| \memo related to conduction transfer functions. | ||
| \format singleLine | ||
| \unique-object | ||
| A1, \field Handle | ||
| \type handle | ||
| \required-field | ||
| A2, \field Constructions | ||
| \type choice | ||
| \required-field | ||
| \key No | ||
| \key Yes | ||
| A3; \field Materials | ||
| \type choice | ||
| \required-field | ||
| \key No | ||
| \key Yes |
There was a problem hiding this comment.
Thanks a lot for using a sane IDD object unlike the E+ object which is rather weird.
For reference the E+ object is like this:
Output:Constructions,
\memo Adds a report to the eio output file which shows details for each construction,
\memo including overall properties, a list of material layers, and calculated results
\memo related to conduction transfer functions.
\format singleLine
A1, \field Details Typte 1
\type choice
\key Constructions
\key Materials
A2; \field Details Type 2
\type choice
\key Constructions
\key Materials
There was a problem hiding this comment.
Maybe Report For Constructions would be clearer. But I don't really care.
| if (modelObject.constructions()) { | ||
| idfObject.setString(Output_ConstructionsFields::DetailsType1, "Constructions"); | ||
| } | ||
|
|
||
| if (modelObject.materials()) { | ||
| idfObject.setString(Output_ConstructionsFields::DetailsType2, "Materials"); | ||
| } |
There was a problem hiding this comment.
Have you tested whether this works when you have Constructions = No and Materials = yes? This leads to this IDF object:
Output:Constructions,
, !- Details Type 1
Materials; !- Details Type 2
| // If nothing to write, don't | ||
| bool constructions = modelObject.constructions(); | ||
| bool materials = modelObject.materials(); | ||
| if (!constructions && !materials) { | ||
| return boost::none; | ||
| } |
There was a problem hiding this comment.
I assume E+ is unhappy if you end up with a blank object?
src/model/OutputSchedules.cpp
Outdated
| if (result.empty()) { | ||
| } |
There was a problem hiding this comment.
| if (result.empty()) { | |
| } |
src/model/OutputSchedules.hpp
Outdated
| /** @name Setters */ | ||
| //@{ | ||
|
|
||
| bool setKeyField(std::string keyField); |
There was a problem hiding this comment.
| bool setKeyField(std::string keyField); | |
| bool setKeyField(const std::string& keyField); |
src/model/OutputConstructions.cpp
Outdated
| bool ok = setConstructions(true); | ||
| OS_ASSERT(ok); | ||
| ok = setMaterials(false); | ||
| OS_ASSERT(ok); |
There was a problem hiding this comment.
Makes sense to me to at least enable one
| if (boost::optional<std::string> _detailsType1 = workspaceObject.getString(Output_ConstructionsFields::DetailsType1, true)) { | ||
| if (istringEqual("Constructions", _detailsType1.get())) { | ||
| modelObject.setConstructions(true); | ||
| } else if (istringEqual("Materials", _detailsType1.get()) { |
There was a problem hiding this comment.
build error here, missing a closing )
a5d984f to
c30da65
Compare
…ut_objects This will NOT affect EUI in any way so it's fine to add it there. Companion PR: NatLabRockies/OpenStudio#4685
|
CI Results for eab1c24:
|
|
I wrapped up the PR, added a test on NatLabRockies/OpenStudio-resources#183. Ubuntu is happy, so is my extensive local testing. merging |
Pull request overview
Output:SchedulesandOutput:Constructionsobjects #4630Pull Request Author
src/model/test)src/energyplus/Test)src/osversion/VersionTranslator.cpp)Labels:
IDDChangeAPIChangePull Request - Ready for CIso that CI builds your PRReview Checklist
This will not be exhaustively relevant to every PR.