From cedbbbf3c01a0f8d9a5dd92d00ce803b6e14a4e2 Mon Sep 17 00:00:00 2001 From: "PNL\\tara" Date: Thu, 14 Jun 2018 13:03:11 -0700 Subject: [PATCH 1/3] Change start_time references in documetnation to use epoch time instead of human readable date string --- .../source/using_gridappsd/api_examples/simulation_request.rst | 2 +- docs/source/using_gridappsd/api_examples/starting_in_java.rst | 3 +-- .../source/using_gridappsd/api_examples/starting_in_python.rst | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/source/using_gridappsd/api_examples/simulation_request.rst b/docs/source/using_gridappsd/api_examples/simulation_request.rst index 4ff9ecf..1d93ebb 100644 --- a/docs/source/using_gridappsd/api_examples/simulation_request.rst +++ b/docs/source/using_gridappsd/api_examples/simulation_request.rst @@ -27,7 +27,7 @@ Example Request: :: "simulation_config": { - "start_time": "2009-07-21 00:00:00", + "start_time": "1248134400", "duration": "120", "simulator": "GridLAB-D", "timestep_frequency": "1000", diff --git a/docs/source/using_gridappsd/api_examples/starting_in_java.rst b/docs/source/using_gridappsd/api_examples/starting_in_java.rst index a4ba7ac..e316694 100644 --- a/docs/source/using_gridappsd/api_examples/starting_in_java.rst +++ b/docs/source/using_gridappsd/api_examples/starting_in_java.rst @@ -41,8 +41,7 @@ The request simulation can be called using the GOSS Client API. https://github.c simulationConfig.simulation_id = ""; //.setSimulation_name(""); simulationConfig.simulator = ""; //.setSimulator(""); - SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); - simulationConfig.start_time = sdf.format(new Date()); //.setStart_time(""); + simulationConfig.start_time = new Date().getTime(); //.setStart_time(1248134400); RequestSimulation requestSimulation = new RequestSimulation(powerSystemConfig, simulationConfig); diff --git a/docs/source/using_gridappsd/api_examples/starting_in_python.rst b/docs/source/using_gridappsd/api_examples/starting_in_python.rst index ad7e3bb..a4773ef 100644 --- a/docs/source/using_gridappsd/api_examples/starting_in_python.rst +++ b/docs/source/using_gridappsd/api_examples/starting_in_python.rst @@ -65,7 +65,7 @@ The python API requires that you install the stomp.py package, you can do this u gossConnection.subscribe(goss_output_topic,1) def _startSimulation(username,password,gossServer='localhost',stompPort='61613'): - simulationCfg = '{"power_system_config":{"GeographicalRegion_name":"ieee8500nodecktassets_Region","SubGeographicalRegion_name":"ieee8500nodecktassets_SubRegion","Line_name":"ieee8500"}, "simulation_config":{"start_time":"03/07/2017 00:00:00","duration":"60","simulator":"GridLAB-D","simulation_name":"my test simulation","power_flow_solver_method":"FBS"}}' + simulationCfg = '{"power_system_config":{"GeographicalRegion_name":"ieee8500nodecktassets_Region","SubGeographicalRegion_name":"ieee8500nodecktassets_SubRegion","Line_name":"ieee8500"}, "simulation_config":{"start_time":"1248134400","duration":"60","simulator":"GridLAB-D","simulation_name":"my test simulation","power_flow_solver_method":"FBS"}}' if (gossServer == None or gossServer == '' or type(gossServer) != str): raise ValueError( From 76261bfe162d7cbc1081c6dddfd23b9081ecbc61 Mon Sep 17 00:00:00 2001 From: tdtalbot Date: Wed, 11 Jan 2023 20:30:48 -0800 Subject: [PATCH 2/3] Update pg_data_manager.rst Starting to add documentation for insert houses --- .../api_examples/pg_data_manager.rst | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/docs/source/using_gridappsd/api_examples/pg_data_manager.rst b/docs/source/using_gridappsd/api_examples/pg_data_manager.rst index cc68972..7d0a5e2 100644 --- a/docs/source/using_gridappsd/api_examples/pg_data_manager.rst +++ b/docs/source/using_gridappsd/api_examples/pg_data_manager.rst @@ -374,6 +374,41 @@ Example Response: +Insert All Houses +^^^^^ +Inserts houses for all of the models passed into the modelList parameter, or in the modelhouses one or all models. + +Allowed parameters are: + +- modelList (optional) - when specified it searches against that model, if empty it will search against all models + +Example Request: goss.gridappsd.process.request.data.powergridmodel +:: + + { + "requestType": "INSERT_ALL_HOUSES", + "modelList": [ + {"modelId": "_4F76A5F9-271D-9EB8-5E31-AA362D86F2C3", "modelName":"ieee8500", "region":3,"scale":0.8,"seed":0}, + {"modelId": "_AAE94E4A-2465-6F5E-37B1-3E72183A4E44", "modelName":"ieee9500", "region":3,"scale":0.8,"seed":0} ] + } + + +Example Response: +:: + true + + +Python API function: +:: + +.. note:: Future Capability. Not yet available. + + + + + + + From 046b4e8f740051ed66a40219a4de87ee0139f01d Mon Sep 17 00:00:00 2001 From: tdtalbot Date: Thu, 12 Jan 2023 13:08:57 -0800 Subject: [PATCH 3/3] Update pg_data_manager.rst Add documentation for the rest of the house and measurment calls --- .../api_examples/pg_data_manager.rst | 208 +++++++++++++++++- 1 file changed, 204 insertions(+), 4 deletions(-) diff --git a/docs/source/using_gridappsd/api_examples/pg_data_manager.rst b/docs/source/using_gridappsd/api_examples/pg_data_manager.rst index 7d0a5e2..c01fee5 100644 --- a/docs/source/using_gridappsd/api_examples/pg_data_manager.rst +++ b/docs/source/using_gridappsd/api_examples/pg_data_manager.rst @@ -373,14 +373,13 @@ Example Response: ] - -Insert All Houses +Insert Houses for multiple models ^^^^^ -Inserts houses for all of the models passed into the modelList parameter, or in the modelhouses one or all models. +Inserts houses for all of the models passed into the modelList parameter, or if no list is supplied then for the models in the static list on the server. Allowed parameters are: -- modelList (optional) - when specified it searches against that model, if empty it will search against all models +- modelList (optional) - when specified it generates houses in the powergrid data store for each of the models supplied with the house generation parameters (modelId, modelName, region, scale, seed) Example Request: goss.gridappsd.process.request.data.powergridmodel :: @@ -405,9 +404,210 @@ Python API function: +Insert Houses for a single model +^^^^^ +Inserts houses for the model passed into the model parameter. + +Allowed parameters are: + +- model - when specified it generates houses for the model supplied with the house generation parameters (modelId, modelName, region, scale, seed). + +Example Request: goss.gridappsd.process.request.data.powergridmodel +:: + + { + "requestType": "INSERT_HOUSES", + "model": {"modelId": "_4F76A5F9-271D-9EB8-5E31-AA362D86F2C3", "modelName":"ieee8500", "region":3,"scale":0.8,"seed":0} + } + + +Example Response: +:: + true + + +Python API function: +:: + +.. note:: Future Capability. Not yet available. + + +Drop Houses for multiple models +^^^^^ +Deletes houses for all of the models passed into the modelList parameter, or if no list is supplied then for the models in the static list on the server. + +Allowed parameters are: + +- modelList (optional) - when specified it generates houses in the powergrid data store for each of the models supplied + +Example Request: goss.gridappsd.process.request.data.powergridmodel +:: + + { + "requestType": "DROP_ALL_HOUSES", + "modelList": [ + {"modelId": "_4F76A5F9-271D-9EB8-5E31-AA362D86F2C3", "modelName":"ieee8500"}, + {"modelId": "_AAE94E4A-2465-6F5E-37B1-3E72183A4E44", "modelName":"ieee9500"} ] + } + + +Example Response: +:: + true + + +Python API function: +:: + +.. note:: Future Capability. Not yet available. + + + +Drop Houses for a single model +^^^^^ +Deletes houses for the model passed into the modelId parameter. + +Allowed parameters are: + +- modelId - when specified it deletes houses for the model id supplied. + +Example Request: goss.gridappsd.process.request.data.powergridmodel +:: + + { + "requestType": "DROP_HOUSES", + "modelId": "_4F76A5F9-271D-9EB8-5E31-AA362D86F2C3" + } + + +Example Response: +:: + true + + +Python API function: +:: + +.. note:: Future Capability. Not yet available. + + + +Insert Measurments for multiple models +^^^^^ +Inserts measurements for all of the models passed into the modelList parameter, or if no list is supplied then for the models in the static list on the server. + +Allowed parameters are: + +- modelList (optional) - when specified it generates measurements in the powergrid data store for each of the models supplied with the house generation parameters (modelId, modelName) + +Example Request: goss.gridappsd.process.request.data.powergridmodel +:: + + { + "requestType": "INSERT_ALL_MEASUREMENTS", + "modelList": [ + {"modelId": "_4F76A5F9-271D-9EB8-5E31-AA362D86F2C3", "modelName":"ieee8500"}, + {"modelId": "_AAE94E4A-2465-6F5E-37B1-3E72183A4E44", "modelName":"ieee9500"} ] + } + + +Example Response: +:: + true + + +Python API function: +:: + +.. note:: Future Capability. Not yet available. + + + +Insert Measurments for a single model +^^^^^ +Inserts measurements for the model passed into the model parameter. + +Allowed parameters are: + +- model - when specified it generates measurements for the model supplied with the house generation parameters (modelId, modelName). + +Example Request: goss.gridappsd.process.request.data.powergridmodel +:: + + { + "requestType": "INSERT_MEASUREMENTS", + "model": {"modelId": "_4F76A5F9-271D-9EB8-5E31-AA362D86F2C3", "modelName":"ieee8500"} + } + + +Example Response: +:: + true + + +Python API function: +:: + +.. note:: Future Capability. Not yet available. + + +Drop Measurments for multiple models +^^^^^ +Deletes measurements for all of the models passed into the modelList parameter, or if no list is supplied then for the models in the static list on the server. + +Allowed parameters are: + +- modelList (optional) - when specified it generates measurements in the powergrid data store for each of the models supplied + +Example Request: goss.gridappsd.process.request.data.powergridmodel +:: + + { + "requestType": "DROP_ALL_MEASUREMENTS", + "modelList": [ + {"modelId": "_4F76A5F9-271D-9EB8-5E31-AA362D86F2C3", "modelName":"ieee8500"}, + {"modelId": "_AAE94E4A-2465-6F5E-37B1-3E72183A4E44", "modelName":"ieee9500"} ] + } + + +Example Response: +:: + true + + +Python API function: +:: + +.. note:: Future Capability. Not yet available. + + + +Drop Measurements for a single model +^^^^^ +Deletes measurements for the model passed into the modelId parameter. + +Allowed parameters are: + +- modelId - when specified it deletes measurements for the model id supplied. + +Example Request: goss.gridappsd.process.request.data.powergridmodel +:: + + { + "requestType": "DROP_MEASUREMENTS", + "modelId": "_4F76A5F9-271D-9EB8-5E31-AA362D86F2C3" + } +Example Response: +:: + true + + +Python API function: +:: +.. note:: Future Capability. Not yet available.