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

missing "multiplier isFixed" in NC #108

Closed
VladimirAlexiev opened this issue Oct 12, 2024 · 10 comments
Closed

missing "multiplier isFixed" in NC #108

VladimirAlexiev opened this issue Oct 12, 2024 · 10 comments
Assignees
Labels
ontology Pertains to ontology representation unit Units of measure, quantityKinds

Comments

@VladimirAlexiev
Copy link
Collaborator

Out of many thousand cims:dataType props, these 9 are not translated to owl:DatatypeProperty:

select * {
    ?x a owl:ObjectProperty; cims:dataType ?qk
}
x qk
1 nc: GeneratingUnit.normalMustRunQ cim: ReactivePower
2 nc: Interruption.energyNotDelivered cim: RealEnergy
3 nc: Interruption.energyNotSupplied cim: RealEnergy
4 nc: InfeedLimitTimePoint.valueA cim: CurrentFlow
5 nc: UnitCostTimePoint.startupCost cim: Money
6 nc: UnitCostTimePoint.warmStartupCost cim: Money
7 cim: GeneratingUnit.startupCost cim: Money
8 nc: FrequencyControlFuntion.targetValue cim: Frequency
9 nc: GeneratingUnit.warmStartupCost cim: Money

I found this when investigating some JSONLD irregularities. It's exactly the same 9 props;

grep -n '       "@id": "cim' */*/*.jsonld
CGMES-NC/jsonld/EquipmentReliability-AP-Voc-RDFS2020.jsonld:5457:        "@id": "cim:ReactivePower"
CGMES-NC/jsonld/GridDisturbance-AP-Voc-RDFS2020.jsonld:818:        "@id": "cim:RealEnergy"
CGMES-NC/jsonld/GridDisturbance-AP-Voc-RDFS2020.jsonld:838:        "@id": "cim:RealEnergy"
CGMES-NC/jsonld/StateInstructionSchedule-AP-Voc-RDFS2020.jsonld:2100:        "@id": "cim:CurrentFlow"
CGMES-NC/jsonld/StateInstructionSchedule-AP-Voc-RDFS2020.jsonld:3046:        "@id": "cim:Money"
CGMES-NC/jsonld/StateInstructionSchedule-AP-Voc-RDFS2020.jsonld:3066:        "@id": "cim:Money"
CGMES-NC/jsonld/SteadyStateInstruction-AP-Voc-RDFS2020.jsonld:1145:        "@id": "cim:Money"
CGMES-NC/jsonld/SteadyStateInstruction-AP-Voc-RDFS2020.jsonld:1198:        "@id": "cim:Frequency"
CGMES-NC/jsonld/SteadyStateInstruction-AP-Voc-RDFS2020.jsonld:1218:        "@id": "cim:Money"

The prop definition seems ok:

  <rdf:Description rdf:about="https://cim4.eu/ns/nc#GeneratingUnit.normalMustRunQ">
    <rdfs:comment>Normal minimum reactive power injection that is needed to meet must-run requirement. This value can be higher or equal to minimum operational limit. Load sign convention is used, i.e. positive sign means flow out from a node.</rdfs:comment>
    <cims:dataType rdf:resource="#ReactivePower"/>
    <rdfs:domain rdf:resource="#GeneratingUnit"/>
    <rdfs:label xml:lang="en">normalMustRunQ</rdfs:label>
    <cims:multiplicity rdf:resource="http://iec.ch/TC57/1999/rdf-schema-extensions-19990926#M:0..1"/>
    <cims:stereotype rdf:resource="http://iec.ch/TC57/NonStandard/UML#attribute"/>
    <cims:stereotype>NC</cims:stereotype>
    <rdf:type rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Property"/>
  </rdf:Description>

Let's see the QK definition:

  <rdf:Description rdf:about="#ReactivePower">
    <cims:belongsToCategory rdf:resource="https://ap-voc.cim4.eu/EquipmentReliability#Package_EquipmentReliabilityProfile"/>
    <rdfs:comment>Product of RMS value of the voltage and the RMS value of the quadrature component of the current.</rdfs:comment>
    <rdfs:label xml:lang="en">ReactivePower</rdfs:label>
    <cims:stereotype>CIMDatatype</cims:stereotype>
    <rdf:type rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"/>
  </rdf:Description>
  <rdf:Description rdf:about="#ReactivePower.multiplier">
    <rdfs:domain rdf:resource="#ReactivePower"/>
    <rdfs:label xml:lang="en">multiplier</rdfs:label>
    <cims:multiplicity rdf:resource="http://iec.ch/TC57/1999/rdf-schema-extensions-19990926#M:0..1"/>
    <rdfs:range rdf:resource="#UnitMultiplier"/>
    <cims:stereotype rdf:resource="http://iec.ch/TC57/NonStandard/UML#attribute"/>
    <rdf:type rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Property"/>
  </rdf:Description>
  <rdf:Description rdf:about="#ReactivePower.unit">
    <rdfs:domain rdf:resource="#ReactivePower"/>
    <cims:isFixed>VAr</cims:isFixed>
    <rdfs:label xml:lang="en">unit</rdfs:label>
    <cims:multiplicity rdf:resource="http://iec.ch/TC57/1999/rdf-schema-extensions-19990926#M:0..1"/>
    <rdfs:range rdf:resource="#UnitSymbol"/>
    <cims:stereotype rdf:resource="http://iec.ch/TC57/NonStandard/UML#attribute"/>
    <rdf:type rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Property"/>
  </rdf:Description>
  <rdf:Description rdf:about="#ReactivePower.value">
    <cims:dataType rdf:resource="#Float"/>
    <rdfs:domain rdf:resource="#ReactivePower"/>
    <rdfs:label xml:lang="en">value</rdfs:label>
    <cims:multiplicity rdf:resource="http://iec.ch/TC57/1999/rdf-schema-extensions-19990926#M:0..1"/>
    <cims:stereotype rdf:resource="http://iec.ch/TC57/NonStandard/UML#attribute"/>
    <rdf:type rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Property"/>
  </rdf:Description>

Diffing against another package (61970-600-2_SteadyStateHypothesis-AP-Voc-RDFS2020_v3-0-0), we see this is missing in ReactivePower.multiplier:

    <cims:isFixed>M</cims:isFixed>
@VladimirAlexiev VladimirAlexiev added ontology Pertains to ontology representation unit Units of measure, quantityKinds labels Oct 12, 2024
@VladimirAlexiev
Copy link
Collaborator Author

It's the same for Money.multiplier: in CGMES/2020/Equipment it has:

	<cims:isFixed rdf:datatype="http://www.w3.org/2001/XMLSchema#string">none</cims:isFixed>

but this is lacking in CGMES-NC/SteadyStateInstruction.

@VladimirAlexiev VladimirAlexiev changed the title cims:dataType props not translated to owl:DatatypeProperty missing "multiplier isFixed" Oct 12, 2024
@VladimirAlexiev VladimirAlexiev changed the title missing "multiplier isFixed" missing "multiplier isFixed" in NC Oct 12, 2024
@admin-cimug
Copy link

@VladimirAlexiev / @Sveino : I am catching up on emails here. This one caught my attention as I happen to be taking a closer look specifically at the CIMDatatype(s) as part of the current development I am doing in CIMTool. As I looked closer at what we did in defining the defaults for the multipliers and units for some of our core profiles it also led me to revisit what we have defined as base within the UML. As I reviewed this yesterday I questioned things and it seems to me that we should have defined "none" as constant/default for a number of these attributes for the CIMDatatypes. In any event, maybe this is a related discussion, or perhaps completely separate. I did want to throw it out there though. There may be some history here that I need to catch up on. Doing the implementation just surfaced these questions for me.

Todd

@admin-cimug
Copy link

Ignore my prior comment. On a second pass I realized I'd missed the obvious and upon closer inspection this is not an issue. I chalk this one up to working too late an hour.

Todd

@VladimirAlexiev
Copy link
Collaborator Author

Why is this not an issue?

@Sveino
Copy link
Owner

Sveino commented Oct 25, 2024

It is an issue if unit and multiplier does not include cims:isFixed in the profile. The unit should also be fixed in the vocabulary. We should also be consistent in the type declaration. I assume that

It's the same for Money.multiplier: in CGMES/2020/Equipment it has:

<cims:isFixed rdf:datatype="http://www.w3.org/2001/XMLSchema#string">none</cims:isFixed>
but this is lacking in CGMES-NC/SteadyStateInstruction.

Is an exception that needs to be fixed.
All the listed attributes that is not defined as cims:dataType but not translated to owl:DatatypeProperty, because it is missing the cims:isFixed. We can add a script that fixes this and we need to fix the profile definitions and make sure the export is correct.

@griddigit-ci
Copy link
Collaborator

Indeed this is another UML issue that will need to be fixed there.
For all properties where we do not have multiplier it should be set to none

Svein we need to discuss

  • do we use M, k in NC profiles or we follow "CIM18" agreement where we have none everywhere? I think now it is maybe a bit inconsistent in NC profiles

@Sveino
Copy link
Owner

Sveino commented Oct 31, 2024

We cannot really have difference between NC and CGMES 3.0. I do not think that the group has thought it through the consequence of going for no multiplier.

@VladimirAlexiev
Copy link
Collaborator Author

Agreed: if in one set of profiles you use kV but in another you use just V, this will lead to confusion.

@VladimirAlexiev
Copy link
Collaborator Author

I spent an hour debugging because I saw cim:GeneratingUnit.startupCost a owl:DtatypeProperty, owl:ObjectProperty.
The reason is that it's defined properly in Equipment but improperly in SteadyStateInstruction.

@griddigit-ci
Copy link
Collaborator

This is now fixed in the UML v68.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ontology Pertains to ontology representation unit Units of measure, quantityKinds
Projects
None yet
Development

No branches or pull requests

4 participants