Sveino / Inst4CIM-KG

Instance of CIM Knowledge Graph
Apache License 2.0
5 stars 1 forks source link

cost/price (xsd:decimal) props not defined as `dataType Money` #128

Open VladimirAlexiev opened 1 week ago

VladimirAlexiev commented 1 week ago

(Related to https://github.com/Sveino/Inst4CIM-KG/issues/127) You've decided to represent money-related props as decimal rather than float (I guess it's more important to have precise decimal digits only for Money, but not for other quantities).

PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX qudt: <http://qudt.org/schema/qudt/>
PREFIX cim: <https://cim.ucaiug.io/ns#>
PREFIX cims: <http://iec.ch/TC57/1999/rdf-schema-extensions-19990926#>
select distinct * {
  ?p rdfs:range xsd:decimal
  optional {?p cims:dataType|qudt:hasQuantityKind ?x}
}
This query finds 20 such props, but only 5 of them have cims:dataType cims:Money p x
1 nc: GeneratingUnit.normalStartupCost cim: Money
2 nc: GeneratingUnit.normalWarmStartupCost cim: Money
3 nc: GeneratingUnit.shutdownCost cim: Money
4 nc: PowerTimePoint.activatedPrice
5 nc: PowerTimePoint.price
6 nc: PowerScheduleAction.energyPrice
7 nc: ProposingRemedialActionScheduleShare.costSharingFactor
8 nc: RemedialActionCost.operationalCost
9 nc: RemedialActionCost.opportunityCost
10 nc: RemedialActionCost.otherCost
11 nc: RemedialActionCost.processingFee
12 nc: RemedialActionCost.savedFuelCost
13 nc: RemedialActionCost.shutdownCost
14 nc: RemedialActionCost.startupCost
15 nc: PowerBidSchedule.activationCost
16 nc: PowerBidSchedule.shutdownCost
17 nc: PowerBidScheduleTimePoint.price
18 nc: PowerBidScheduleTimePoint.reservePrice
19 cim: GeneratingUnit.startupCost cim: Money
20 cim: GeneratingUnit.variableCost cim: Money

costSharingFactor is special: it's a proportion, not Money.