GRIDAPPSD / GOSS-GridAPPS-D

15 stars 28 forks source link

Come up with strategy to handle long list of addressable and unadd equipment in Topology query #1735

Open poorva1209 opened 1 year ago

AAndersn commented 1 year ago

Here is the first call that is failing for 9500 node model. We currently cannot get past creation of the DistributedModel object. We will have further problems when trying to run get_all_attributes

feeder_mrid = "_EE71F6C9-56F0-4167-A14E-7F4C71F10EAA" #9500 node
feeder = cim.Feeder(mRID=feeder_mrid)
network = DistributedModel(connection=bg, feeder=feeder, topology=topology_response['feeders'])

This results in the error:


HTTPError: HTTP Error 400: Unable to parse form content

During handling of the above exception, another exception occurred:

QueryBadFormed                            Traceback (most recent call last)

~/.local/lib/python3.10/site-packages/SPARQLWrapper/Wrapper.py in query(self)
    958         :rtype: :class:`QueryResult` instance
    959         """
--> 960         return QueryResult(self._query())
    961 
    962     def queryAndConvert(self) -> "QueryResult.ConvertResult":

~/.local/lib/python3.10/site-packages/SPARQLWrapper/Wrapper.py in _query(self)
    928         except urllib.error.HTTPError as e:
    929             if e.code == 400:
--> 930                 raise QueryBadFormed(e.read())
    931             elif e.code == 404:
    932                 raise EndPointNotFound(e.read())

QueryBadFormed: QueryBadFormed: A bad request has been sent to the endpoint: probably the SPARQL query is badly formed.

I have attached the (first) problematic query. It can be generated by


unaddressable = topology_response['feeders']['unaddressable_equipment']
sparql_msg = bg_obj.sparql.get_class_type_sparql(feeder_mrid, unaddressable )

sparql_msg.txt

AAndersn commented 1 year ago

Initial refactor of CIM-graph for transmission modeling has removed this issue in https://github.com/PNNL-CIM-Tools/CIM-Graph/commit/05f8d3039fcfe5de69546f785f33738cae86b60f

8500 node model is able to compile, but painfully slowly. Will work on increasing speed of build process. 9500 is having an unrelated indexing problem

Image

poorva1209 commented 1 year ago

v_1.0 branch

-merge with develop and then make release by merging to main