NREL / openstudio-common-measures-gem

Other
7 stars 15 forks source link

OpenStudio Results tries to query information that ForwardTranslator removes #45

Open eringold opened 3 years ago

eringold commented 3 years ago

@DavidGoldwasser There is a corner case where the OpenStudio Results measure will try to query information from the sql file based on what it found in the OSM, but encounters a problem because the OSM content had not passed through Forward Translation, and thus doesn't exist in the sql.

I encountered a 'wrong number of arguments' error in the Envelope Section here.. I traced the error to one subsurface in the model with a unique construction assigned to it. After carefully reviewing the run stdout, I found that this subsurface had more than the number of allowed vertices, so it was not translated. Since the vertex error is only identified during FT, the model shows the construction as used, so the measure tries to find that construction's SHGC from the sql file but cannot, and toNeatString does not receive the expected double.

I'm not sure of the best fix. Checking the translated idf for the objects whose info is being queried seems like it would add a lot of overhead to the measure. Checking that all queried values are returned as expected would also be pretty intensive. Maybe a line in the error message to carefully check the stdout for translation errors?

Not expecting a ton of effort here, but wanted to document what I found.

DavidGoldwasser commented 3 years ago

I added a new warning section at the end of the measure that lists all measure warnings (from earlier measure or OpenStudio Results). I'd like to extend this to show forward translation errors as well, but I don't know how to do that yet. I have to give it some thought. Those are not written in the out.osw file and are not accessible in runner results like measure warnings.

Your example isn't unique, another example is a space in the model not connected to the zone. The simulation will run. I do have warning now that OS and E+ area don't match, but other sections could fail. It is good for the user to see the forward translation errors so they can decide if any changes need to be made to the model.

DavidGoldwasser commented 3 years ago

@kbenne I added a warning section to the OpenStudio Results measure that adds upstream measure warnings to the HTML table. Forward translation errors are generally hidden from the user, and I would love to include those here as well, as they would alert user of common errors such as a space not being assigned to a zone. Do you have any suggestions for best approach to access forward translator warnings from a reporting measure?

DavidGoldwasser commented 3 years ago

@jmarrec do you have any ideas how I could access forward translation errors from within a reporting measure. My goal is to make them more visible to modelers by adding them to the measure warnings that I already include with OpenStudio results. Common error users might see is a space in the model that isn't included in any thermal zones and will be removed from the model.

jmarrec commented 3 years ago

@DavidGoldwasser Sorry I completely has missed this. No ideas no.... the logMessages are on the ForwardTranslator, by the time the reporting part of the measure is called, the FT is long gone...

DavidGoldwasser commented 3 years ago

@kbenne would it seem reasonable to enhance what is written to the out.osw file to include the forward translator warnings. Then measures or other interfaces could access these warnings. I see them in OS app or SketchUp plugin when I export to IDF, but I don't ever see them when running simulations with OSW and CLI.