Ejemplo n.º 1
0
gapps = GridAPPSD("('localhost', 61613)", username='******', password='******')
#model_names = gapps.query_model_names()
#print(model_names)

#model_check = gapps.query_model_info()
#print(model_check)


model_mrid = '_49AD8E07-3BF9-A4E2-CB8F-C3722F837B62'




#full_object_list = gapps.query_object_types()
#print(full_object_list)
object_list = gapps.query_object_types(model_mrid)
print("Object List")
print(object_list)

object_type = 'ConnectivityNode'


object_search = gapps.query_object('_08175e8f-b762-4c9b-92c4-07f369f69bd4')
print("Query Object")
print(object_search)


x=gapps.query_object_dictionary(model_mrid, '_08175e8f-b762-4c9b-92c4-07f369f69bd4')
print("Object Dictionary")
print(x)
Ejemplo n.º 2
0
    sleep(1)

    get_input("Press enter to receive platform status")
    resp = gapps.get_platform_status()
    pprint(resp)

    get_input("Press enter to query model info")
    resp = gapps.query_model_info()
    pprint(resp)

    get_input("Press enter to query model names")
    resp = gapps.query_model_names()
    pprint(resp)

    get_input("Press enter to query object types")
    resp = gapps.query_object_types()
    pprint(resp)

    get_input("Press enter to run ad-hoc query")
    # list all the connectivity nodes by feeder - CIMImporter when building GldNodes
    sparql = """
PREFIX r:  <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX c:  <http://iec.ch/TC57/2012/CIM-schema-cim17#>
SELECT ?feeder ?name WHERE {
 VALUES ?fdrid {"_49AD8E07-3BF9-A4E2-CB8F-C3722F837B62"}  # 13 bus
 ?fdr c:IdentifiedObject.mRID ?fdrid.
 ?s c:ConnectivityNode.ConnectivityNodeContainer ?fdr.
 ?s r:type c:ConnectivityNode.
 ?s c:IdentifiedObject.name ?name.
 ?fdr c:IdentifiedObject.name ?feeder.
}