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

Add Modelica measure base classes #76

Draft
wants to merge 3 commits into
base: develop
Choose a base branch
from
Draft

Conversation

nllong
Copy link
Member

@nllong nllong commented Nov 15, 2023

This PR adds three new base classes for creating Modelica-based measures. A measure must inherit from the MeasureBase in order to correctly run the measures on the model. These types of measures only (currently) work on a ModelicaProject-based approach due to the need to know the path to the project.

A measure can be written and then executed with a block of code such as

# configure and run the measures
measure = SetExtendedTypeArgumentValue('distribution_pump_flow_nominal')
args = measure.arguments()
args.set_value('model_name', 'Districts/district')
args.set_value('extended_type', 'Buildings.Experimental.DHC.Examples.Combined.BaseClasses.PartialSeries')
args.set_value('type', 'Buildings.Experimental.DHC.Loads.Combined.BuildingTimeSeriesWithETS')
args.set_value('identifier', 'bui')
args.set_value('object_name', 'datDes')
args.set_value('argument_name', 'mPumDis_flow_nominal')
args.set_value('value', 180, True)
measure.run(project, args)

TODOs

  • unit tests
  • example measures
  • handle non-project based measures?

Copy link

Pull Request Test Coverage Report for Build 6936122550

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 93.457%

Totals Coverage Status
Change from base Build 6936100847: 0.0%
Covered Lines: 1757
Relevant Lines: 1880

💛 - Coveralls

Copy link

github-actions bot commented Jan 5, 2024

Pull Request Test Coverage Report for Build 7416556320

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.004%) to 93.538%

Totals Coverage Status
Change from base Build 7413582147: -0.004%
Covered Lines: 1766
Relevant Lines: 1888

💛 - Coveralls

Copy link

github-actions bot commented Jan 6, 2024

Pull Request Test Coverage Report for Build 7434250990

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 93.542%

Totals Coverage Status
Change from base Build 7426984529: 0.0%
Covered Lines: 1767
Relevant Lines: 1889

💛 - Coveralls

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.

None yet

1 participant