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

BOPTEST: multizone_office_simple_air, redeclaration error, header error, partial annotations #252

Open
EttoreZ opened this issue Oct 16, 2024 · 0 comments

Comments

@EttoreZ
Copy link

EttoreZ commented Oct 16, 2024

This issue reports problems found when trying to postprocess BOPTEST multizone_office_simple_air model using modelica-json to extrapolate semantic model from Modelica annotations. Three issues were found:

  1. When thermal zone model is duplicated from buildings and used in local package modelica-json throws an error
  2. When no bldg prefixes are added to the extrapolated model annotation part of the header is missing
  3. Only some of the annotations are correctly extrapolated in the .ttl file

To reproduce all errors go BOPTEST folder in terminal project1-boptest/testcases/multizone_office_simple_air/models and run node `$node $MODELICAJSONPATH/app.js -f MultiZoneOfficeSimpleAir/TestCases/TestCase.mo -o semantic -m modelica -d m2j_output. BOPTEST reference branch issue591

For error 1. This error was tested by removing all the annotations apart from the boiler plate one TestCase.mo and using an old version of the package that had the thermal zone depende as in the screenshot below:
image

in The resulting error is reported in the screenshot below:
image

For error 2. Before running use previous package version (or error 1 will be triggered) with only boiler plate annotation in TestCase.mo as shown below:

__Buildings(semantic(
    metdataLanguageDefinition="Brick 1.3 text/turtle" "https://brickschema.org",
    metadataLanguage="Brick 1.3 text/turtle" 
       "@prefix bldg: <https://BESTESTAir.urn#> .
        @prefix brick: <https://brickschema.org/schema/Brick#> .
        @prefix ref: <https://brickschema.org/schema/Brick/ref#> .
        @prefix literal: <https://literal_values.urn#> .
        @prefix quantitykind: <http://qudt.org/vocab/quantitykind/> .
        @prefix qudt: <http://qudt.org/schema/qudt/> .
        @prefix sh: <http://www.w3.org/ns/shacl#> .
        @prefix boptestrules: <https://boptest-rules.urn#> .
        ")),

The resulting TestCase.ttl file will be:
@prefix : <#>.
If some bldg elements are added to the annotation as below:

__Buildings(semantic(
    metdataLanguageDefinition="Brick 1.3 text/turtle" "https://brickschema.org",
    metadataLanguage="Brick 1.3 text/turtle" 
       "@prefix bldg: <https://BESTESTAir.urn#> .
        @prefix brick: <https://brickschema.org/schema/Brick#> .
        @prefix ref: <https://brickschema.org/schema/Brick/ref#> .
        @prefix literal: <https://literal_values.urn#> .
        @prefix quantitykind: <http://qudt.org/vocab/quantitykind/> .
        @prefix qudt: <http://qudt.org/schema/qudt/> .
        @prefix sh: <http://www.w3.org/ns/shacl#> .
        @prefix boptestrules: <https://boptest-rules.urn#> .
        ")),
        bldg:con a brick:Thermostat;
          boptestrules:sameAs bldg:con_Thermostat_T .
        bldg:fcu a brick:FCU ;
          boptestrules:sameAs bldg:fcu_FanCoilUnit_T .
        bldg:zon a brick:Zone ;
          brick:isLocationOf bldg:con .  
        bldg:fcu brick:feeds bldg:zon .


Then TestCase.ttl becomes:

@prefix : <#>.
@prefix bldg: <https://BESTESTAir.urn#>.
@prefix brick: <https://brickschema.org/schema/Brick#>.
@prefix boptestrules: <https://boptest-rules.urn#>.

bldg:con a brick:Thermostat; boptestrules:sameAs bldg:con_Thermostat_T.

bldg:fcu
a brick:FCU; boptestrules:sameAs bldg:fcu_FanCoilUnit_T; brick:feeds bldg:zon.
bldg:zon a brick:Zone; brick:isLocationOf bldg:con. 

Error 3. is quite similar to error 2. in issue #251, where if all annotations are present, then only some are extracted. However, in this case not even all the annotation at 1 level deep are extracted, so it is unclear what the reason could be. To replicate all the annotations present in the current BOPTEST origin semantic branch issue591 need to be added to a previous version of 'multizone_office_simple_air', i.e. master, to avoid Error 1.

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

No branches or pull requests

1 participant