diff --git a/cimsparql/data_models.py b/cimsparql/data_models.py index 17292525..f78d75af 100644 --- a/cimsparql/data_models.py +++ b/cimsparql/data_models.py @@ -160,7 +160,6 @@ class PhaseTapChangerSchema(JsonSchemaOut): class ConvertersSchema(NamedResourceSchema): alias: Series[str] = pa.Field(nullable=True) - substation_mrid: Series[str] = pa.Field() status: Series[bool] = pa.Field() node: Series[str] = pa.Field() p: Series[float] = pa.Field() @@ -173,7 +172,6 @@ class ConvertersSchema(NamedResourceSchema): loss1: Series[float] = pa.Field() loss2: Series[float] = pa.Field() vdcn: Series[float] = pa.Field() - un: Series[float] = pa.Field() ConvertersDataFrame = DataFrame[ConvertersSchema] diff --git a/cimsparql/sparql/converters.sparql b/cimsparql/sparql/converters.sparql index d8e67637..74f12d5c 100644 --- a/cimsparql/sparql/converters.sparql +++ b/cimsparql/sparql/converters.sparql @@ -3,7 +3,7 @@ PREFIX cim:<${cim}> PREFIX xsd:<${xsd}> PREFIX SN:<${SN}> PREFIX ALG:<${ALG}> -select ?mrid ?name ?alias ?p ?q ?substation_mrid ?status ?node ?connectivity_node ?controller ?controller_factor ?pole_loss ?loss0 ?loss1 ?loss2 ?vdcn ?un +select ?mrid ?name ?alias ?p ?q ?status ?node ?connectivity_node ?controller ?controller_factor ?pole_loss ?loss0 ?loss1 ?loss2 ?vdcn where { { select * where { @@ -30,10 +30,7 @@ where { cim:Terminal.sequenceNumber|cim:ACDCTerminal.sequenceNumber 1 . ?con_node cim:IdentifiedObject.mRID ?connectivity_node; cim:ConnectivityNode.ConnectivityNodeContainer ?con_node_container. - ?con_node_container cim:VoltageLevel.Substation ?substation; - cim:VoltageLevel.BaseVoltage/cim:BaseVoltage.nominalVoltage ?un. - ?substation cim:IdentifiedObject.mRID ?substation_mrid; - cim:Substation.Region/cim:SubGeographicalRegion.Region/cim:IdentifiedObject.name ?area . + ?con_node_container cim:VoltageLevel.Substation/cim:Substation.Region/cim:SubGeographicalRegion.Region/cim:IdentifiedObject.name ?area . optional {?converter SN:Equipment.networkAnalysisEnable ?_analysis_enabled .} optional { ?converter ALG:VoltageSourceConverter.loss0 ?_loss0;