Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Matter_Engine: Add material mapping methods #2932

Merged
merged 14 commits into from
Dec 1, 2022

Conversation

IsakNaslundBh
Copy link
Contributor

@IsakNaslundBh IsakNaslundBh commented Oct 25, 2022

Issues addressed by this PR

Closes #2900

  • Add method for mapping properties from a set of pre-defined material maps on a set of Materials
  • Add methods for mapping onto MaterialCompositiona and Takeoffs
  • Add methods for getting mapped Takeoffs and Compositions from a list of IElementM

Test files

https://burohappold.sharepoint.com/:f:/s/BHoM/ElafUY8_5_dOs1UN37qQ1kQBFOo2qUahCMBTEbp2g7uEag?e=rRgCke

Changelog

Additional comments

@IsakNaslundBh IsakNaslundBh added the type:feature New capability or enhancement label Oct 25, 2022
@IsakNaslundBh IsakNaslundBh self-assigned this Oct 25, 2022
@IsakNaslundBh
Copy link
Contributor Author

@BHoMBot check compliance

@bhombot-ci
Copy link

bhombot-ci bot commented Oct 25, 2022

@IsakNaslundBh to confirm, the following actions are now queued:

  • check code-compliance
  • check documentation-compliance
  • check project-compliance
  • check branch-compliance
  • check dataset-compliance
  • check copyright-compliance

@IsakNaslundBh IsakNaslundBh changed the title Matter engine #2900 add material mapping methods Matter_Engine: Add material mapping methods Oct 25, 2022
@IsakNaslundBh IsakNaslundBh marked this pull request as ready for review October 27, 2022 09:50
@IsakNaslundBh
Copy link
Contributor Author

@BHoMBot check compliance
@BHoMBot check null-handling

@bhombot-ci
Copy link

bhombot-ci bot commented Oct 27, 2022

@IsakNaslundBh to confirm, the following actions are now queued:

  • check code-compliance
  • check documentation-compliance
  • check project-compliance
  • check branch-compliance
  • check dataset-compliance
  • check copyright-compliance
  • check null-handling

@IsakNaslundBh
Copy link
Contributor Author

@BHoMBot check compliance
@BHoMBot check null-handling

@bhombot-ci
Copy link

bhombot-ci bot commented Oct 27, 2022

@IsakNaslundBh to confirm, the following actions are now queued:

  • check code-compliance
  • check documentation-compliance
  • check project-compliance
  • check branch-compliance
  • check dataset-compliance
  • check copyright-compliance
  • check null-handling

@IsakNaslundBh
Copy link
Contributor Author

@michaelhoehn this should be good to go for testing now. Happy to have a quick call if needed.

Will add UTs to this PR once the approach taken in the PR has been approved and agreed.

Copy link
Member

@kayleighhoude kayleighhoude left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Finally got a chance to review this one- love the template, really simple to use. One issue on my end, when assigning a material from a traditional EPD dataset vs the concatenated one you provided, I received the following errors:
image

Is this because those datasets are missing the new material attribute?

@IsakNaslundBh IsakNaslundBh marked this pull request as ready for review November 29, 2022 14:57
michaelhoehn
michaelhoehn previously approved these changes Nov 30, 2022
Copy link
Contributor

@michaelhoehn michaelhoehn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm happy with the additions, but I think Kayleigh's observations should be addressed, likely in the LCA toolkit PR. I'm fine to see this merged personally, but I do find it interesting and somewhat concerning that a user may instinctually combine or "inject" another elementM upstream of the solver (which is what I'm assuming was done here, @kayleighhoude please correct me if I'm mistaken) which do not have mapped data, to begin with.

In this case the methods will produce a null value for anything that is not properly mapped (as they should) and produce typical results for those that have mapped data. I'll add some additional thoughts on the LCA PR referenced above to cover these cases. But perhaps there's some null handling to be added here?

@michaelhoehn
Copy link
Contributor

Please see the comment here BHoM/LifeCycleAssessment_Toolkit#288 (review)

… templates for compositions and takeoffs

Previous version worked with lists to aim to achieve some speeder run of the methods, but made them harder to work with. Changing to run element by element, as this is a relatively quick process anyway
@michaelhoehn michaelhoehn force-pushed the Matter_Engine-#2900-AddMaterialMappingMethods branch from 0ce6854 to f51c4fe Compare December 1, 2022 16:07
@michaelhoehn
Copy link
Contributor

Branch naming inconsistencies have required me to fork this branch for compliance purposes FYI @FraserGreenroyd

@michaelhoehn
Copy link
Contributor

@BHoMBot check core

@bhombot-ci
Copy link

bhombot-ci bot commented Dec 1, 2022

@michaelhoehn to confirm, the following actions are now queued:

  • check core

@michaelhoehn
Copy link
Contributor

@BHoMBot check required

@bhombot-ci
Copy link

bhombot-ci bot commented Dec 1, 2022

@michaelhoehn to confirm, the following actions are now queued:

  • check code-compliance
  • check documentation-compliance
  • check project-compliance
  • check core
  • check null-handling
  • check serialisation
  • check versioning
  • check installer

@bhombot-ci
Copy link

bhombot-ci bot commented Dec 1, 2022

The check core has already been run previously and recorded as a successful check. This check has not been run again at this time.

@bhombot-ci
Copy link

bhombot-ci bot commented Dec 1, 2022

The check installer has already been run previously and recorded as a successful check. This check has not been run again at this time.

@michaelhoehn
Copy link
Contributor

@BHoMBot check documentation-compliance

@bhombot-ci
Copy link

bhombot-ci bot commented Dec 1, 2022

@michaelhoehn to confirm, the following actions are now queued:

  • check documentation-compliance

@michaelhoehn
Copy link
Contributor

@BHoMBot check required

@bhombot-ci
Copy link

bhombot-ci bot commented Dec 1, 2022

@michaelhoehn to confirm, the following actions are now queued:

  • check code-compliance
  • check documentation-compliance
  • check project-compliance
  • check core
  • check null-handling
  • check serialisation
  • check versioning
  • check installer

@bhombot-ci
Copy link

bhombot-ci bot commented Dec 1, 2022

The check installer has already been run previously and recorded as a successful check. This check has not been run again at this time.

@FraserGreenroyd
Copy link
Contributor

@BHoMBot check unit-tests
@BHoMBot check copyright-compliance
@BHoMBot check dataset-compliance

@bhombot-ci
Copy link

bhombot-ci bot commented Dec 1, 2022

@FraserGreenroyd to confirm, the following actions are now queued:

  • check unit-tests
  • check copyright-compliance
  • check dataset-compliance

@FraserGreenroyd
Copy link
Contributor

@BHoMBot check ready-to-merge

@bhombot-ci
Copy link

bhombot-ci bot commented Dec 1, 2022

@FraserGreenroyd to confirm, the following actions are now queued:

  • check ready-to-merge

There are 8 requests in the queue ahead of you.

Copy link
Contributor

@FraserGreenroyd FraserGreenroyd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See here.

@FraserGreenroyd FraserGreenroyd merged commit dadc6f2 into main Dec 1, 2022
@FraserGreenroyd FraserGreenroyd deleted the Matter_Engine-#2900-AddMaterialMappingMethods branch December 1, 2022 22:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature New capability or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Matter_Engine: Add method to map Materials and MaterialCompositions to pre-defined Transdiciplinary materials
4 participants