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

proposal to change representation of attributes and units #29

Closed
6 tasks done
VladimirAlexiev opened this issue Jul 24, 2024 · 3 comments
Closed
6 tasks done

proposal to change representation of attributes and units #29

VladimirAlexiev opened this issue Jul 24, 2024 · 3 comments
Labels
duplicate This issue or pull request already exists ontology Pertains to ontology representation

Comments

@VladimirAlexiev
Copy link
Collaborator

VladimirAlexiev commented Jul 24, 2024

Currently datatypes are defined like this:

cim:ActivePower  rdf:type       rdfs:Class ;
        rdfs:comment            "Product of RMS value of the voltage and the RMS value of the in-phase component of the current." ;
        rdfs:label              "ActivePower"@en ;
        cims:belongsToCategory  er:Package_EquipmentReliabilityProfile ;
        cims:stereotype         "CIMDatatype" .

cim:ActivePower.multiplier
        rdf:type           rdf:Property ;
        rdfs:domain        cim:ActivePower ;
        rdfs:label         "multiplier"@en ;
        rdfs:range         cim:UnitMultiplier ;
        cims:isFixed       "M" ;
        cims:multiplicity  cims:M:0..1 ;
        cims:stereotype    <http://iec.ch/TC57/NonStandard/UML#attribute> .

cim:ActivePower.unit  rdf:type  rdf:Property ;
        rdfs:domain        cim:ActivePower ;
        rdfs:label         "unit"@en ;
        rdfs:range         cim:UnitSymbol ;
        cims:isFixed       "W" ;
        cims:multiplicity  cims:M:0..1 ;
        cims:stereotype    <http://iec.ch/TC57/NonStandard/UML#attribute> .

cim:ActivePower.value
        rdf:type           rdf:Property ;
        rdfs:domain        cim:ActivePower ;
        rdfs:label         "value"@en ;
        cims:dataType      cim:Float ;
        cims:multiplicity  cims:M:0..1 ;
        cims:stereotype    <http://iec.ch/TC57/NonStandard/UML#attribute> .

And then attributes (data props) are defined like this:

cim:GeneratingUnit.maxEconomicP
        rdf:type           rdf:Property ;
        rdfs:domain        cim:GeneratingUnit ;
        cims:dataType      cim:ActivePower ;
        cims:stereotype    <http://iec.ch/TC57/NonStandard/UML#attribute> .

There are several problems:

  • the data prop doesn't define a range (while the value of GeneratingUnit.maxEconomicP in instance data is a a pure number)
  • cim:ActivePower.unit and cim:ActivePower.multiplier are never used
  • cim:Float is a non-standard datatype (eg xsd:double is a standard datatype)

Proposals:

  • Define range of attributes:
cim:GeneratingUnit.maxEconomicP rdfs:range xsd:double.
  • Define them as datatype props. Using this OWL class doesn't mean you're going away from RDFS, you're just being more specific about the nature of the property
cim:GeneratingUnit.maxEconomicP a owl:DatatypeProperty.
  • Remove cim:ActivePower.unit and cim:ActivePower.multiplier since they are not used (but if you like them, you can keep them)
  • Attach the unit and multiplier to cim:ActivePower, eg
cim:ActivePower 
  cim:multiplier "M";
  cim:unit "W".
  • Attach the unit and multiplier to the attribute, eg
cim:GeneratingUnit.maxEconomicP 
  cim:multiplier "M";
  cim:unit "W".
  • Switch to QUDT. The string values above are not very good since they can't carry descriptive info. So you can replace the above with
cim:ActivePower qudt:unit unit:MW.
cim:GeneratingUnit.maxEconomicP qudt:unit unit:MW.
@VladimirAlexiev
Copy link
Collaborator Author

EquipmentReliability-AP-Voc-RDFS2020.ttl has a list of units, eg:

cim:UnitSymbol.W  rdf:type  cim:UnitSymbol ;
        rdfs:comment     "Real power in watts (J/s). Electrical power may have real and reactive components. The real portion of electrical power (I&#178;R or VIcos(phi)), is expressed in Watts. See also apparent power and reactive power." ;
        rdfs:label       "W"@en ;

cim:UnitMultiplier.M  rdf:type  cim:UnitMultiplier ;
        rdfs:comment     "Mega 10**6." ;
        rdfs:label       "M"@en ;
        cims:stereotype  "enum" .

and then a shape in EquipmentReliability-AP-Con-Simple-SHACL.ttl asks a certain property to use these enumerated instances:

er:Curve.y1Unit-datatype
        rdf:type        sh:PropertyShape;
        sh:path         cim:Curve.y1Unit;
        sh:in           ( cim:UnitSymbol.A cim:UnitSymbol.none cim:UnitSymbol.VPerVAr cim:UnitSymbol.WPerm2 cim:UnitSymbol.s cim:UnitSymbol.Pa cim:UnitSymbol.WPers cim:UnitSymbol.deg cim:UnitSymbol.degC cim:UnitSymbol.VAr cim:UnitSymbol.Hz cim:UnitSymbol.V cim:UnitSymbol.W cim:UnitSymbol.ohm );

So instead of "M" and "W" above, everywhere we should use cim:UnitMultiplier.M and cim:UnitSymbol.W respectively.
That includes cim:ActivePower.multiplier, cim:ActivePower.unit!
These enumerated instances still carry less descriptive info than QUDT unit:* but we can stick with them.

@VladimirAlexiev
Copy link
Collaborator Author

This is very similar to 3lbits/CIM4NoUtility#338 but addresses some other aspects.

@VladimirAlexiev
Copy link
Collaborator Author

VladimirAlexiev commented Sep 13, 2024

#38 describe this in more detail, and rdfs-improvement/README in even more detail:

The last sec has mapping tables to QUDT.

So let's NOT discuss here, let's discuss there.
But this issue has a task list, so I'll close it only after everything is done.

@VladimirAlexiev VladimirAlexiev added duplicate This issue or pull request already exists ontology Pertains to ontology representation labels Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists ontology Pertains to ontology representation
Projects
None yet
Development

No branches or pull requests

1 participant