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

ASHRAE Guideline36, Section 5, Air-Side AFDD #341

Merged
merged 16 commits into from
Sep 9, 2024

Conversation

MatthewSteen
Copy link
Member

@MatthewSteen MatthewSteen commented Aug 22, 2024

Close #252.

AFDD Shapes

  • 5.16.14 Multiple-Zone VAV Air-Handling Unit, Automatic Fault Detection and Diagnostics
  • 5.17.4 Dual-Fan Dual-Duct Heating VAV Air-Handling Unit, Automatic Fault Detection and Diagnostics
  • 5.18.13 Single-Zone VAV Air-Handling Unit, Automatic Fault Detection and Diagnostics
  • 5.22.6 Fan Coil Unit, Automatic Fault Detection and Diagnostics

@MatthewSteen MatthewSteen marked this pull request as ready for review August 23, 2024 23:44
@MatthewSteen MatthewSteen changed the title AHRAE Guideline36, Section 5, Air-Side AFDD ASHRAE Guideline36, Section 5, Air-Side AFDD Aug 23, 2024
Copy link
Member Author

@MatthewSteen MatthewSteen left a comment

Choose a reason for hiding this comment

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

CI error appears to be unrelated.

@gtfierro FYI there a couple points here that appear to be missing from Brick.

  1. Air_Differential_Temperature_Sensor
  2. Entering_Air_Temperature_Sensor

Copy link
Collaborator

@gtfierro gtfierro left a comment

Choose a reason for hiding this comment

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

I pushed a commit which changed how the outside air fraction shape got modeled, but this looks great!

Copy link
Collaborator

@gtfierro gtfierro left a comment

Choose a reason for hiding this comment

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

Thanks! I think this looks good to me

@TShapinsky
Copy link
Member

Do we know what the cause of the failing tests are? Is it just that this branch is missing fixed from develop and needs to be updated?

@TShapinsky
Copy link
Member

@MatthewSteen does the notebook timeout for you locally? or just take a long time to run?

@MatthewSteen
Copy link
Member Author

MatthewSteen commented Sep 4, 2024

@TShapinsky fails locally too, all with ERROR traitlets:client.py:845 Timeout waiting for execute reply (600s).

Failing Notebook: notebooks/Existing-model-validation-example.ipynb
---------------------------------------------------------- Captured stderr call ----------------------------------------------------------
A cell timed out while it was being executed, after 600 seconds.
A cell timed out while it was being executed, after 600 seconds.
The message was: Cell execution timed out.
Here is a preview of the cell contents:
-------------------
generated_templates = validation_context.as_templates()
for t in generated_templates:
    print('-'*80)
    print(t.body.serialize())
    templ_bindings = {}
    for parameter in t.all_parameters:
        param_value = notebook_input(f"Please enter the value for parameter \"{parameter}\":")
        templ_bindings[parameter] = BLDG[param_value]
    graph = t.evaluate(templ_bindings)
    medium_office_model.add_graph(graph)

@MatthewSteen
Copy link
Member Author

It's the first line in cell [7]...

generated_templates = validation_context.as_templates()

...that's taking >600s to run.

def test_notebook(notebook: Path):
run = NotebookRun(notebook, 600)

@gtfierro
Copy link
Collaborator

gtfierro commented Sep 6, 2024

Weird! I run that cell on my machine and it was relatively quick -- certainly nothing like 10 minutes. I'll try to reproduce in a clean environment

@gtfierro
Copy link
Collaborator

gtfierro commented Sep 6, 2024

My tests show that a couple cells later is the call that times out:

conformance = medium_office_model.test_model_against_shapes(
    shape_collections=shape_collections,
    shapes_to_test=shapes_to_test,
    target_class=BRICK["AHU"])

That method involves a SPARQL query and some SHACL validation. I'm pretty sure the SPARQL query is the slow part. We may want ot use a smaller graph for this test

@MatthewSteen
Copy link
Member Author

Ok, should we merge and revisit the fixtures in the future? I think it makes sense to use smaller models. Perhaps the SmallOffice model or some/all of the G36 systems.

@MatthewSteen MatthewSteen merged commit ed725ff into develop Sep 9, 2024
4 of 8 checks passed
@MatthewSteen MatthewSteen deleted the guideline36-section5-afdd-air-side branch September 9, 2024 18:19
@MatthewSteen MatthewSteen added this to the 0.3.0 milestone Sep 9, 2024
@TShapinsky
Copy link
Member

@MatthewSteen @gtfierro did we ever decide on how to mitigate this causing test failures. This is now causing all prs to fail testing...

@gtfierro
Copy link
Collaborator

I think it just needs a smaller test file or a faster SPARQL engine (but this second option is much harder to do for now). I don't have cycles to handle it this week but I can try next week

@MatthewSteen
Copy link
Member Author

I was seeing the same failure without the changes I made here. Also seeing inconsistent test results in general so I'm trying to determine the cause.

After the release we should discuss the integration testing we want to have, which could be a topic for a dev mtg. One thought is we could (re)move the notebooks dir and move the integration testing notebooks under tests/integration/fixtures/. Then we could convert our Tutorials to ipynbs so that users can run them as example notebooks.

@gtfierro
Copy link
Collaborator

There may be a quick fix to this....there is a SPARQL query inside the "hot loop" of test_model_against_shapes which can actually be done outside the loop. I'm testing now to see if this fixes performance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ASHRAE Guideline 36, Section 5, Air-Side AFDD
3 participants