Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
235 changes: 235 additions & 0 deletions docs/source/using_gridappsd/api_examples/pg_data_manager.rst
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,241 @@ Example Response:
]


Insert Houses for multiple 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 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
::

{
"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.



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.



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down