gridappsd-python 2025.3.2a9__tar.gz → 2025.3.2a12__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 (19) hide show
  1. {gridappsd_python-2025.3.2a9 → gridappsd_python-2025.3.2a12}/PKG-INFO +1 -1
  2. {gridappsd_python-2025.3.2a9 → gridappsd_python-2025.3.2a12}/gridappsd/simulation.py +33 -35
  3. {gridappsd_python-2025.3.2a9 → gridappsd_python-2025.3.2a12}/pyproject.toml +1 -1
  4. {gridappsd_python-2025.3.2a9 → gridappsd_python-2025.3.2a12}/README.md +0 -0
  5. {gridappsd_python-2025.3.2a9 → gridappsd_python-2025.3.2a12}/gridappsd/__init__.py +0 -0
  6. {gridappsd_python-2025.3.2a9 → gridappsd_python-2025.3.2a12}/gridappsd/__main__.py +0 -0
  7. {gridappsd_python-2025.3.2a9 → gridappsd_python-2025.3.2a12}/gridappsd/app_registration.py +0 -0
  8. {gridappsd_python-2025.3.2a9 → gridappsd_python-2025.3.2a12}/gridappsd/difference_builder.py +0 -0
  9. {gridappsd_python-2025.3.2a9 → gridappsd_python-2025.3.2a12}/gridappsd/docker_handler.py +0 -0
  10. {gridappsd_python-2025.3.2a9 → gridappsd_python-2025.3.2a12}/gridappsd/field_interface/__init__.py +0 -0
  11. {gridappsd_python-2025.3.2a9 → gridappsd_python-2025.3.2a12}/gridappsd/goss.py +0 -0
  12. {gridappsd_python-2025.3.2a9 → gridappsd_python-2025.3.2a12}/gridappsd/gridappsd.py +0 -0
  13. {gridappsd_python-2025.3.2a9 → gridappsd_python-2025.3.2a12}/gridappsd/houses.py +0 -0
  14. {gridappsd_python-2025.3.2a9 → gridappsd_python-2025.3.2a12}/gridappsd/json_extension.py +0 -0
  15. {gridappsd_python-2025.3.2a9 → gridappsd_python-2025.3.2a12}/gridappsd/loghandler.py +0 -0
  16. {gridappsd_python-2025.3.2a9 → gridappsd_python-2025.3.2a12}/gridappsd/register_app.py +0 -0
  17. {gridappsd_python-2025.3.2a9 → gridappsd_python-2025.3.2a12}/gridappsd/timeseries.py +0 -0
  18. {gridappsd_python-2025.3.2a9 → gridappsd_python-2025.3.2a12}/gridappsd/topics.py +0 -0
  19. {gridappsd_python-2025.3.2a9 → gridappsd_python-2025.3.2a12}/gridappsd/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: gridappsd-python
3
- Version: 2025.3.2a9
3
+ Version: 2025.3.2a12
4
4
  Summary: A GridAPPS-D Python Adapter
5
5
  License: BSD-3-Clause
6
6
  Keywords: gridappsd,grid,activemq,powergrid,simulation,library
@@ -1,13 +1,11 @@
1
- from dataclasses import dataclass, field, fields
2
- from pathlib import Path
3
- import sys
1
+ from dataclasses import dataclass, field
2
+
4
3
  import time
5
- from copy import deepcopy
6
- #import json
7
4
  import logging
8
5
  from typing import Dict, List, Union
9
6
 
10
7
  import gridappsd.topics as t
8
+ from gridappsd import GridAPPSD
11
9
  from . import json_extension as json
12
10
 
13
11
  _log = logging.getLogger(__name__)
@@ -36,33 +34,33 @@ class ConfigBase:
36
34
 
37
35
  @dataclass
38
36
  class ModelCreationConfig(ConfigBase):
39
- load_scaling_factor: str = "1"
40
- schedule_name: str = "ieeezipload"
41
- z_fraction: str = "0"
42
- i_fraction: str = "1"
43
- p_fraction: str = "0"
44
- randomize_zipload_fractions: bool = False
45
- use_houses: bool = False
37
+ load_scaling_factor: str = field(default = "1")
38
+ schedule_name: str = field(default = "ieeezipload")
39
+ z_fraction: str = field(default = "0")
40
+ i_fraction: str = field(default = "1")
41
+ p_fraction: str = field(default = "0")
42
+ randomize_zipload_fractions: bool = field(default = False)
43
+ use_houses: bool = field(default = False)
46
44
 
47
45
 
48
- __default_model_creation_config__ = ModelCreationConfig()
46
+ # __default_model_creation_config__ = ModelCreationConfig()
49
47
 
50
48
 
51
49
  @dataclass
52
50
  class SimulationArgs(ConfigBase):
53
- start_time: str = "1655321830"
54
- duration: str = "300"
55
- simulator: str = "GridLAB-D"
56
- timestep_frequency: str = "1000"
57
- timestep_increment: str = "1000"
58
- run_realtime: bool = True
59
- pause_after_measurements: bool = False
60
- simulation_name: str = "ieee13nodeckt"
61
- power_flow_solver_method: str = "NR"
62
- model_creation_config: ModelCreationConfig = __default_model_creation_config__
51
+ start_time: str = field(default = "1655321830")
52
+ duration: str = field(default = "300")
53
+ simulator: str = field(default = "GridLAB-D")
54
+ timestep_frequency: str = field(default = "1000")
55
+ timestep_increment: str = field(default = "1000")
56
+ run_realtime: bool = field(default = True)
57
+ pause_after_measurements: bool = field(default = False)
58
+ simulation_name: str = field(default = "ieee13nodeckt")
59
+ power_flow_solver_method: str = field(default = "NR")
60
+ model_creation_config: ModelCreationConfig = field(default_factory = ModelCreationConfig)
63
61
 
64
62
 
65
- __default_simulation_args__ = SimulationArgs()
63
+ # __default_simulation_args__ = SimulationArgs()
66
64
 
67
65
 
68
66
  @dataclass
@@ -75,16 +73,16 @@ class ApplicationConfig(ConfigBase):
75
73
  applications: List[Application] = field(default_factory=list)
76
74
 
77
75
 
78
- __default_application_config__ = ApplicationConfig()
76
+ # __default_application_config__ = ApplicationConfig()
79
77
 
80
78
 
81
79
  @dataclass
82
80
  class TestConfig(ConfigBase):
83
81
  events: List[Dict] = field(default_factory=list)
84
- appId: str = ""
82
+ appId: str = field(default = "")
85
83
 
86
84
 
87
- __default_test_config__ = TestConfig()
85
+ # __default_test_config__ = TestConfig()
88
86
 
89
87
 
90
88
  @dataclass
@@ -95,18 +93,18 @@ class ServiceConfig(ConfigBase):
95
93
  @dataclass
96
94
  class PowerSystemConfig(ConfigBase):
97
95
  Line_name: str
98
- GeographicalRegion_name: str = None
99
- SubGeographicalRegion_name: str = None
96
+ GeographicalRegion_name: str = field(default = None)
97
+ SubGeographicalRegion_name: str = field(default = None)
100
98
 
101
99
 
102
100
  @dataclass
103
101
  class SimulationConfig(ConfigBase):
104
102
  power_system_config: PowerSystemConfig
105
- application_config: List[ApplicationConfig] = field(default_factory=list)
106
- simulation_config: SimulationArgs = __default_simulation_args__
103
+ application_configs: List[ApplicationConfig] = field(default_factory=list)
104
+ simulation_config: SimulationArgs = field(default_factory=SimulationArgs)
107
105
  service_configs: List[ServiceConfig] = field(default_factory=list)
108
- application_config: ApplicationConfig = __default_application_config__
109
- test_config: TestConfig = __default_test_config__
106
+ application_config: ApplicationConfig = field(default_factory=ApplicationConfig)
107
+ test_config: TestConfig = field(default_factory=TestConfig)
110
108
 
111
109
 
112
110
  class Simulation:
@@ -121,8 +119,8 @@ class Simulation:
121
119
  add_onmeasurement_callback, add_oncomplete_callback or add_onstart_callback method respectively.
122
120
  """
123
121
 
124
- def __init__(self, gapps: 'GridAPPSD', run_config: Union[Dict, SimulationConfig]):
125
- assert type(gapps).__name__ == 'GridAPPSD', "Must be an instance of GridAPPSD"
122
+ def __init__(self, gapps: GridAPPSD, run_config: Union[Dict, SimulationConfig]):
123
+ assert isinstance(gapps, GridAPPSD), "Must be an instance of GridAPPSD"
126
124
  if isinstance(run_config, SimulationConfig):
127
125
  self._run_config = run_config.asdict()
128
126
  elif isinstance(run_config, dict):
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "gridappsd-python"
3
- version = "2025.3.2a9"
3
+ version = "2025.3.2a12"
4
4
  description = "A GridAPPS-D Python Adapter"
5
5
  authors = [
6
6
  "C. Allwardt <3979063+craig8@users.noreply.github.com>",