qudt / qudt-public-repo

QUDT -Quantities, Units, Dimensions and dataTypes - public repository
Other
118 stars 75 forks source link

confusion `unit` vs `hasUnit`; mention `value` in `QuantityValue`; give skos:example #969

Open VladimirAlexiev opened 2 months ago

VladimirAlexiev commented 2 months ago

@steveraysteveray I'm working with CIM ontologies and want to state the Unit and QuantityKind for some electrical DatatypeProperties (see at end of this description). Related to https://github.com/Sveino/Inst4CIM-KG/issues/38.

Quantifiable and QuantityValue have 4 restrictions that mention unit and hasUnit:

qudt:QuantityValue
  a owl:Class ;
  rdfs:subClassOf qudt:Concept ;
  rdfs:subClassOf qudt:Quantifiable ;
  rdfs:subClassOf [
      a owl:Restriction ;
      owl:maxCardinality 1 ;
      owl:onProperty qudt:hasUnit ;
    ] ;
  rdfs:subClassOf [
      a owl:Restriction ;
      owl:maxCardinality 1 ;
      owl:onProperty qudt:unit ;
    ] ;
.

But:

So which one should be used? I don't know the story why qudt:unit was deprecated, but let's honor this:

skos:scopeNote """Can be used as annotation on a numeric property when that property uses a fixed QuantityKind/Unit.
E.g. in the electrical CIM property example:
- the kind is fixed to an electrical modification of `ComplexPower`
- the unit is fixed to Mega Volt-Amperes
- (the unit and multiplier are also given separately: this is a peculiarity of electrical CIM)
""";
skos:example """
cim:ACDCConverter.baseS a owl:FunctionalProperty , owl:DatatypeProperty ;
  rdfs:domain cim:ACDCConverter ;
  rdfs:range xsd:float ;
  qudt:hasQuantityKind cim:ApparentPower;
  qudt:hasUnit unit:MegaV-A;
  cims:multiplier cim:UnitMultiplier.M;
  cims:unitSymbol cim:UnitSymbol.VA.
""".

Of course, you can cut out the last two lines (and the parenthesized bullet that explains them). Or if the example is too big/complex/specific, make up some datatype property.

steveraysteveray commented 2 months ago

Comments received. I think I have good answers for you for some of the items, and your suggestions deserve some thought. I will get to them after finishing some other urgent tasks.

VladimirAlexiev commented 2 months ago

Please ping me if my skos:example is incorrect or inaccurate.

steveraysteveray commented 2 months ago

Starting to address your questions:

qudt:unit was deprecated in favor of qudt:hasUnit to be consistent with other relations like qudt:hasQuantityKind. This was brought up by the ASHRAE 223 committee. I agree that we should clean out any uses of qudt:unit from both the OWL and SHACL schemas. I have made a note to do that.

Regarding the domain of hasUnit, you are correct. We combined the uses of qudt:unit and qudt:hasUnit such that the remaining relation qudt:hasUnit is used by a variety of classes, (SystemsOf..., Quantifiable, QuantityValue).

I'm a bit unclear what you mean when you talk about numeric properties. Could you expand or give an example?

qudt:QuantityValue is a rdfs:subClassOf qudt:Quantifiable, so it doesn't need to mention qudt:value.

Your last comment involves what you are calling a numeric property, so when I understand what you mean there, I'll be able to comment on your suggested code.

Hopefully my responses get us at least part of the way to resolving these issues.

VladimirAlexiev commented 1 month ago

hi @steveraysteveray ! By "numeric property" I mean a datatype property whose value is a number, but it also wants to specify fixed quantityKind and unit so that:

Eg in electrical CIM/CGMES, currently all units are fixed. So we want to use annotations like this:

cim:ACDCConverter.baseS a owl:FunctionalProperty , owl:DatatypeProperty ;
  rdfs:domain cim:ACDCConverter ;
  rdfs:range xsd:float ;  # pure number!
  cims:multiplier cim:UnitMultiplier.M;  # this was present in CIM, but in a different form
  cims:unitSymbol cim:UnitSymbol.VA.  # this was present in CIM, but in a different form
  qudt:hasQuantityKind cim:ApparentPower; # this CIM qk has a link to QUDT
  qudt:hasUnit unit:MegaV-A; # this QUDT unit is mapped from multiplier & unitSymbol

See: