gridappsd-python 2.8.20230413192559a0__tar.gz → 2023.5.1a1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. {gridappsd_python-2.8.20230413192559a0 → gridappsd_python-2023.5.1a1}/PKG-INFO +1 -2
  2. {gridappsd_python-2.8.20230413192559a0 → gridappsd_python-2023.5.1a1}/README.md +0 -1
  3. {gridappsd_python-2.8.20230413192559a0 → gridappsd_python-2023.5.1a1}/gridappsd/field_interface/agents/agents.py +11 -11
  4. {gridappsd_python-2.8.20230413192559a0 → gridappsd_python-2023.5.1a1}/gridappsd/field_interface/context.py +2 -3
  5. {gridappsd_python-2.8.20230413192559a0 → gridappsd_python-2023.5.1a1}/pyproject.toml +1 -1
  6. {gridappsd_python-2.8.20230413192559a0 → gridappsd_python-2023.5.1a1}/gridappsd/__init__.py +0 -0
  7. {gridappsd_python-2.8.20230413192559a0 → gridappsd_python-2023.5.1a1}/gridappsd/__main__.py +0 -0
  8. {gridappsd_python-2.8.20230413192559a0 → gridappsd_python-2023.5.1a1}/gridappsd/app_registration.py +0 -0
  9. {gridappsd_python-2.8.20230413192559a0 → gridappsd_python-2023.5.1a1}/gridappsd/conf/entrypoint.sh +0 -0
  10. {gridappsd_python-2.8.20230413192559a0 → gridappsd_python-2023.5.1a1}/gridappsd/conf/run-gridappsd.sh +0 -0
  11. {gridappsd_python-2.8.20230413192559a0 → gridappsd_python-2023.5.1a1}/gridappsd/difference_builder.py +0 -0
  12. {gridappsd_python-2.8.20230413192559a0 → gridappsd_python-2023.5.1a1}/gridappsd/docker_handler.py +0 -0
  13. {gridappsd_python-2.8.20230413192559a0 → gridappsd_python-2023.5.1a1}/gridappsd/field_interface/__init__.py +0 -0
  14. {gridappsd_python-2.8.20230413192559a0 → gridappsd_python-2023.5.1a1}/gridappsd/field_interface/agents/__init__.py +0 -0
  15. {gridappsd_python-2.8.20230413192559a0 → gridappsd_python-2023.5.1a1}/gridappsd/field_interface/gridappsd_field_bus.py +0 -0
  16. {gridappsd_python-2.8.20230413192559a0 → gridappsd_python-2023.5.1a1}/gridappsd/field_interface/interfaces.py +0 -0
  17. {gridappsd_python-2.8.20230413192559a0 → gridappsd_python-2023.5.1a1}/gridappsd/goss.py +0 -0
  18. {gridappsd_python-2.8.20230413192559a0 → gridappsd_python-2023.5.1a1}/gridappsd/gridappsd.py +0 -0
  19. {gridappsd_python-2.8.20230413192559a0 → gridappsd_python-2023.5.1a1}/gridappsd/houses.py +0 -0
  20. {gridappsd_python-2.8.20230413192559a0 → gridappsd_python-2023.5.1a1}/gridappsd/loghandler.py +0 -0
  21. {gridappsd_python-2.8.20230413192559a0 → gridappsd_python-2023.5.1a1}/gridappsd/register_app.py +0 -0
  22. {gridappsd_python-2.8.20230413192559a0 → gridappsd_python-2023.5.1a1}/gridappsd/simulation.py +0 -0
  23. {gridappsd_python-2.8.20230413192559a0 → gridappsd_python-2023.5.1a1}/gridappsd/timeseries.py +0 -0
  24. {gridappsd_python-2.8.20230413192559a0 → gridappsd_python-2023.5.1a1}/gridappsd/topics.py +0 -0
  25. {gridappsd_python-2.8.20230413192559a0 → gridappsd_python-2023.5.1a1}/gridappsd/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: gridappsd-python
3
- Version: 2.8.20230413192559a0
3
+ Version: 2023.5.1a1
4
4
  Summary: A GridAPPS-D Python Adapter
5
5
  Home-page: https://gridappsd.readthedocs.io
6
6
  License: BSD-3-Clause
@@ -348,7 +348,6 @@ def test_gridappsd_status(gridappsd_client):
348
348
  gappsd.set_service_status("Foo")
349
349
  assert gappsd.get_service_status() == ProcessStatusEnum.COMPLETE.value
350
350
  assert gappsd.get_application_status() == ProcessStatusEnum.COMPLETE.value
351
-
352
351
  ```
353
352
 
354
353
 
@@ -324,6 +324,5 @@ def test_gridappsd_status(gridappsd_client):
324
324
  gappsd.set_service_status("Foo")
325
325
  assert gappsd.get_service_status() == ProcessStatusEnum.COMPLETE.value
326
326
  assert gappsd.get_application_status() == ProcessStatusEnum.COMPLETE.value
327
-
328
327
  ```
329
328
 
@@ -89,11 +89,6 @@ class DistributedAgent:
89
89
 
90
90
  def connect(self):
91
91
 
92
- if self.agent_area_dict is None:
93
- context = LocalContext.get_context_by_message_bus(
94
- self.downstream_message_bus)
95
- self.agent_area_dict = context['data']
96
-
97
92
  if self.upstream_message_bus is not None:
98
93
  self.upstream_message_bus.connect()
99
94
  if self.downstream_message_bus is not None:
@@ -101,6 +96,11 @@ class DistributedAgent:
101
96
  if self.downstream_message_bus is None and self.upstream_message_bus is None:
102
97
  raise ValueError(
103
98
  "Either upstream or downstream bus must be specified!")
99
+
100
+ if self.agent_area_dict is None:
101
+ context = LocalContext.get_context_by_message_bus(
102
+ self.downstream_message_bus)
103
+ self.agent_area_dict = context['data']
104
104
 
105
105
  self.subscribe_to_measurement()
106
106
  self.subscribe_to_messages()
@@ -230,11 +230,11 @@ class FeederAgent(DistributedAgent):
230
230
  downstream_message_bus_def, agent_config,
231
231
  feeder_dict, simulation_id)
232
232
 
233
- if feeder_dict is not None:
233
+ if self.agent_area_dict is not None:
234
234
  feeder = cim.Feeder(mRID=downstream_message_bus_def.id)
235
235
  self.feeder_area = DistributedModel(connection=self.connection,
236
236
  feeder=feeder,
237
- topology=feeder_dict)
237
+ topology=self.agent_area_dict)
238
238
 
239
239
 
240
240
  class SwitchAreaAgent(DistributedAgent):
@@ -249,10 +249,10 @@ class SwitchAreaAgent(DistributedAgent):
249
249
  super().__init__(upstream_message_bus_def, downstream_message_bus_def,
250
250
  agent_config, switch_area_dict, simulation_id)
251
251
 
252
- if switch_area_dict is not None:
252
+ if self.agent_area_dict is not None:
253
253
  self.switch_area = SwitchArea(downstream_message_bus_def.id,
254
254
  self.connection)
255
- self.switch_area.initialize_switch_area(switch_area_dict)
255
+ self.switch_area.initialize_switch_area(self.agent_area_dict)
256
256
 
257
257
 
258
258
  class SecondaryAreaAgent(DistributedAgent):
@@ -267,10 +267,10 @@ class SecondaryAreaAgent(DistributedAgent):
267
267
  super().__init__(upstream_message_bus_def, downstream_message_bus_def,
268
268
  agent_config, secondary_area_dict, simulation_id)
269
269
 
270
- if secondary_area_dict is not None:
270
+ if self.agent_area_dict is not None:
271
271
  self.secondary_area = SecondaryArea(downstream_message_bus_def.id,
272
272
  self.connection)
273
- self.secondary_area.initialize_secondary_area(secondary_area_dict)
273
+ self.secondary_area.initialize_secondary_area(self.agent_area_dict)
274
274
 
275
275
 
276
276
  class CoordinatingAgent:
@@ -23,9 +23,8 @@ class LocalContext:
23
23
 
24
24
  """
25
25
  request = {'request_type' : 'get_context',
26
- 'downstream_message_bus_id': downstream_message_bus.id,
27
- 'agents': True,
28
- 'devices': True}
26
+ 'downstream_message_bus_id': downstream_message_bus.id
27
+ }
29
28
  return downstream_message_bus.get_response(t.context_request_queue(downstream_message_bus.id), request)
30
29
 
31
30
  @classmethod
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "gridappsd-python"
3
- version = "2.8.20230413192559a0"
3
+ version = "2023.5.1a1"
4
4
  description = "A GridAPPS-D Python Adapter"
5
5
  authors = [
6
6
  "C. Allwardt <3979063+craig8@users.noreply.github.com>",