Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

gbXML export is not reproducible #4438

Closed
macumber opened this issue Sep 19, 2021 · 6 comments · Fixed by #4485
Closed

gbXML export is not reproducible #4438

macumber opened this issue Sep 19, 2021 · 6 comments · Fixed by #4485

Comments

@macumber
Copy link
Contributor

macumber commented Sep 19, 2021

Issue overview

Objects export order is not reproducible in the gbXML ForwardTranslator. The ForwardTranslator should sort objects to ensure the export is reproducible.

Current Behavior

Objects are exported in non-reproducible order.

Expected Behavior

Objects are exported in reproducible order.

Steps to Reproduce

Create an OSM model via a script, export to gbXML. Repeat, exported gbXML is not in same order. This is especially problematic for interior floor/ceilings as sometimes the floor is exported and sometimes the ceiling is. Sorting by surface type would ensure that interior floors are always exported (the interior ceiling would be listed as the adjacent surface).

Possible Solution

Sort all objects when doing gbXML export. Need to sort surfaces by surface type (Wall, Roof, Floor, etc) first. Need to figure out sorting criteria for each objects (probably want to sort spaces by story or min z coord, then maybe min x and min y coords, then name)

Details

Environment

Some additional details about your environment for this issue (if relevant):

  • Platform (Operating system, version):
  • Version of OpenStudio (if using an intermediate build, include SHA):

Context

Topologic Energy uses OpenStudio's gbXML export, this issue causes confusion and possible wrong results when the results imported into other tools such as Spider Aragog gbXML Viewer.

Reported by @wassimj at https://unmethours.slack.com/archives/C0ADY1ZRB/p1631800632015300

@macumber macumber added the Triage Issue needs to be assessed and labeled, further information on reported might be needed label Sep 19, 2021
@macumber
Copy link
Contributor Author

Sort surfaces here: https://github.com/NREL/OpenStudio/blob/develop/src/gbxml/ForwardTranslator.cpp#L463

Sort other objects as needed

@macumber
Copy link
Contributor Author

@ggartside is this something you could add to your list? It should be pretty straightforward

@jmarrec jmarrec added component - gbXML Enhancement Request and removed Triage Issue needs to be assessed and labeled, further information on reported might be needed labels Sep 20, 2021
@tijcolem
Copy link
Collaborator

Assuming this is related? #4375 @ggartside?

@macumber
Copy link
Contributor Author

They are kind of related but this one is on export and the other is on import

@ggartside
Copy link
Collaborator

Yes I can do,

Assuming that by reproducible you mean deterministic? So with the same input and conditions we always get the same output?

@ggartside
Copy link
Collaborator

In github is there not a way to create a branch from the issue report page? Anyone know?

@tijcolem tijcolem linked a pull request Nov 15, 2021 that will close this issue
19 tasks
@tijcolem tijcolem added this to the OpenStudio SDK 3.4.0 milestone Nov 15, 2021
@tijcolem tijcolem mentioned this issue Nov 15, 2021
19 tasks
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants