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

Modeling of mapsTo in S223 using parameters of dependencies #237

Open
lazlop opened this issue Apr 14, 2023 · 2 comments
Open

Modeling of mapsTo in S223 using parameters of dependencies #237

lazlop opened this issue Apr 14, 2023 · 2 comments
Projects

Comments

@lazlop
Copy link

lazlop commented Apr 14, 2023

For s223 models, connection points at different levels of containment that correspond to each other use the s223:mapsTo relation. The mapsTo relation goes from the connection point on the contained equipment to the connection point on the containing equipment. I'm not sure how to incorporate this relation into a template.

For example:

:VAV a s223:SingleDuctTerminal ;
    s223:contains :Damper ;
    s223:hasConnectionPoint :vav-cp-in, :vav-cp-out ;
.

:Damper a s223:Damper; 
    s223:hasConnectionPoint :damper-cp-in, :damper-cp-out ;
.
:damper-cp-in s223:mapsTo :vav-cp-in .
:damper-cp-out s223:mapsTo :vav-cp-out .

This could probably be pretty simply addressed by being providing the ability to refer to parameters of dependent templates.

For example:

damper:
  body: >
    @prefix P: <urn:___param___#> .
    @prefix s223: <http://data.ashrae.org/standard223#> .
    P:name a s223:Damper ;
      s223:hasConnectionPoint P:in, P:out .
  dependencies:
    - template: air-inlet-cp
      args: {"name": "in"}
    - template: air-outlet-cp
      args: {"name": "out"}

vav:
  body: >
    @prefix P: <urn:___param___#> .
    @prefix s223: <http://data.ashrae.org/standard223#> .
    P:name a s223:SingleDuctTerminal ;
      s223:contains P:Damper ;
      s223:hasConnectionPoint P:in, P:out ;
    .
    P:Damper(in) s223:mapsTo P:in .
    p:Damper(out) s223:mapsTo P:out .
  dependencies:
    - template: damper
      args: {"name": "damper"}
    - template: fan
      args: {"name": "fan"}
    - template: air-outlet-cp
      args: {"name": "out"}
    - template: air-inlet-cp
      args: {"name": "in"}

@github-actions github-actions bot added this to To do in FY23 Apr 14, 2023
@lazlop lazlop changed the title Modeling of mapsTo in S223 Modeling of mapsTo in S223 using parameters of dependencies Apr 14, 2023
@lazlop
Copy link
Author

lazlop commented Apr 14, 2023

Hmm, I see how this can kind of be done using inline dependencies. Sorry for potentially silly issues, still figuring it out!
However, with inline dependencies it seems that optional parameters are no longer ignored, and explicitly stating require_optional_args = False doesn't seem to change anything.

@gtfierro
Copy link
Collaborator

gtfierro commented May 8, 2023

Thanks for pointing this out! My new PR should hopefully raise warnings when parameters are not provided (and do the right thing with optional arguments too)

This is also the intended use of inline_dependencies(); it resolves those joins between templates so that you can compose templates together. This is not covered in our documentation yet, but something we should consider adding soon

gtfierro added a commit that referenced this issue Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
FY23
To do
Development

No branches or pull requests

2 participants