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

Refactor templates with a record class for configuration parameters #3500

Closed
3 of 4 tasks
AntoineGautier opened this issue Sep 1, 2023 · 1 comment · Fixed by #3508
Closed
3 of 4 tasks

Refactor templates with a record class for configuration parameters #3500

AntoineGautier opened this issue Sep 1, 2023 · 1 comment · Fixed by #3508
Assignees
Labels

Comments

@AntoineGautier
Copy link
Contributor

AntoineGautier commented Sep 1, 2023

This ticket is to refactor classes within Templates to use a subrecord with all configuration (structural) parameters—intantiated as cfg. This subrecord must be declared in the master record dat and in the components so that

  • structural parameters be propagated up with dat(cfg=<instance_name>.cfg) instead of
    UserProject.Data.AllSystems dat(VAV_1(
      final typ=VAV_1.typ,
      final typFanSup=VAV_1.typFanSup,
      final typFanRet=VAV_1.typFanRet,
      final typFanRel=VAV_1.typFanRel,
      ...
      final typCtl=VAV_1.ctl.typ,
      final typSecOut=VAV_1.ctl.typSecOut,
      final buiPreCon=VAV_1.ctl.buiPreCon,
      ctl(
        stdEne=VAV_1.ctl.stdEne,
        stdVen=VAV_1.ctl.stdVen,
        have_CO2Sen=VAV_1.ctl.have_CO2Sen)))
  • and design parameters be still propagated down with component(dat=dat) without any circular dependency.

The development branches issue1374_template_CHW_final and issue3266_template_HW_plant shall use the same construct.

TODO:

  • Check that the changes are compatible with https://github.com/lbl-srg/ctrl-flow-dev/blob/main/server/scripts/sequence-doc/src/version/Current%20G36%20Decisions/Guideline%2036-2021%20(mappings).csv

    • The changes are backward-compatible with ctrl-flow mappings because the latter ones rely on locally declared configuration parameters which are not modified (except for the ones in Buildings.Templates.(AirHandlersFans|ZoneEquipment).Data but these are not involved in any mappings). The changes rather introduce a new record instance that "groups" all these parameters into a single object that can be easily propagated.
  • Update template development guide.

  • Update release notes (once MBL v10 is released).

  • Refactor CHW and HW plant templates with the same construct (once this PR has been reviewed).

@AntoineGautier AntoineGautier self-assigned this Sep 1, 2023
@AntoineGautier
Copy link
Contributor Author

AntoineGautier commented Sep 1, 2023

@karthikeyad-pnnl Please adopt this new structure for your ongoing developments. I will commit the refactored components next week.

The development branch is issue3500_recordConfig.

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

Successfully merging a pull request may close this issue.

1 participant