power-grid-model 1.12.58__py3-none-win_amd64.whl → 1.12.59__py3-none-win_amd64.whl

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.

Potentially problematic release.


This version of power-grid-model might be problematic. Click here for more details.

Files changed (59) hide show
  1. power_grid_model/__init__.py +54 -54
  2. power_grid_model/_core/__init__.py +3 -3
  3. power_grid_model/_core/buffer_handling.py +493 -493
  4. power_grid_model/_core/data_handling.py +141 -141
  5. power_grid_model/_core/data_types.py +132 -132
  6. power_grid_model/_core/dataset_definitions.py +109 -109
  7. power_grid_model/_core/enum.py +226 -226
  8. power_grid_model/_core/error_handling.py +206 -206
  9. power_grid_model/_core/errors.py +130 -130
  10. power_grid_model/_core/index_integer.py +17 -17
  11. power_grid_model/_core/options.py +71 -71
  12. power_grid_model/_core/power_grid_core.py +563 -563
  13. power_grid_model/_core/power_grid_dataset.py +535 -535
  14. power_grid_model/_core/power_grid_meta.py +243 -243
  15. power_grid_model/_core/power_grid_model.py +686 -686
  16. power_grid_model/_core/power_grid_model_c/__init__.py +3 -3
  17. power_grid_model/_core/power_grid_model_c/bin/power_grid_model_c.dll +0 -0
  18. power_grid_model/_core/power_grid_model_c/get_pgm_dll_path.py +63 -63
  19. power_grid_model/_core/power_grid_model_c/include/power_grid_model_c/basics.h +255 -255
  20. power_grid_model/_core/power_grid_model_c/include/power_grid_model_c/buffer.h +108 -108
  21. power_grid_model/_core/power_grid_model_c/include/power_grid_model_c/dataset.h +316 -316
  22. power_grid_model/_core/power_grid_model_c/include/power_grid_model_c/dataset_definitions.h +1052 -1052
  23. power_grid_model/_core/power_grid_model_c/include/power_grid_model_c/handle.h +99 -99
  24. power_grid_model/_core/power_grid_model_c/include/power_grid_model_c/meta_data.h +189 -189
  25. power_grid_model/_core/power_grid_model_c/include/power_grid_model_c/model.h +125 -125
  26. power_grid_model/_core/power_grid_model_c/include/power_grid_model_c/options.h +142 -142
  27. power_grid_model/_core/power_grid_model_c/include/power_grid_model_c/serialization.h +118 -118
  28. power_grid_model/_core/power_grid_model_c/include/power_grid_model_c.h +36 -36
  29. power_grid_model/_core/power_grid_model_c/include/power_grid_model_cpp/basics.hpp +65 -65
  30. power_grid_model/_core/power_grid_model_c/include/power_grid_model_cpp/buffer.hpp +61 -61
  31. power_grid_model/_core/power_grid_model_c/include/power_grid_model_cpp/dataset.hpp +220 -220
  32. power_grid_model/_core/power_grid_model_c/include/power_grid_model_cpp/handle.hpp +108 -108
  33. power_grid_model/_core/power_grid_model_c/include/power_grid_model_cpp/meta_data.hpp +84 -84
  34. power_grid_model/_core/power_grid_model_c/include/power_grid_model_cpp/model.hpp +63 -63
  35. power_grid_model/_core/power_grid_model_c/include/power_grid_model_cpp/options.hpp +52 -52
  36. power_grid_model/_core/power_grid_model_c/include/power_grid_model_cpp/serialization.hpp +124 -124
  37. power_grid_model/_core/power_grid_model_c/include/power_grid_model_cpp/utils.hpp +81 -81
  38. power_grid_model/_core/power_grid_model_c/include/power_grid_model_cpp.hpp +19 -19
  39. power_grid_model/_core/power_grid_model_c/lib/cmake/power_grid_model/power_grid_modelConfigVersion.cmake +3 -3
  40. power_grid_model/_core/serialization.py +317 -317
  41. power_grid_model/_core/typing.py +20 -20
  42. power_grid_model/_core/utils.py +798 -798
  43. power_grid_model/data_types.py +321 -321
  44. power_grid_model/enum.py +27 -27
  45. power_grid_model/errors.py +37 -37
  46. power_grid_model/typing.py +43 -43
  47. power_grid_model/utils.py +473 -473
  48. power_grid_model/validation/__init__.py +25 -25
  49. power_grid_model/validation/_rules.py +1171 -1171
  50. power_grid_model/validation/_validation.py +1172 -1172
  51. power_grid_model/validation/assertions.py +93 -93
  52. power_grid_model/validation/errors.py +602 -602
  53. power_grid_model/validation/utils.py +313 -313
  54. {power_grid_model-1.12.58.dist-info → power_grid_model-1.12.59.dist-info}/METADATA +1 -1
  55. power_grid_model-1.12.59.dist-info/RECORD +65 -0
  56. power_grid_model-1.12.58.dist-info/RECORD +0 -65
  57. {power_grid_model-1.12.58.dist-info → power_grid_model-1.12.59.dist-info}/WHEEL +0 -0
  58. {power_grid_model-1.12.58.dist-info → power_grid_model-1.12.59.dist-info}/entry_points.txt +0 -0
  59. {power_grid_model-1.12.58.dist-info → power_grid_model-1.12.59.dist-info}/licenses/LICENSE +0 -0
@@ -1,321 +1,321 @@
1
- # SPDX-FileCopyrightText: Contributors to the Power Grid Model project <powergridmodel@lfenergy.org>
2
- #
3
- # SPDX-License-Identifier: MPL-2.0
4
-
5
- """
6
- Data types involving PGM datasets.
7
-
8
- Many data types are used throughout the power grid model project. In an attempt to clarify type hints, some types
9
- are defined/exposed and explained.
10
- """
11
-
12
- # Import non class symbols as private to reassign and provide a docstring.
13
- # Not necessary for class, as sphinx autodoc finds their docstrings
14
- from power_grid_model._core.data_types import ( # noqa: F401
15
- AsymValue as _AsymValue,
16
- AttributeType as _AttributeType,
17
- AttributeValue as _AttributeValue,
18
- BatchArray as _BatchArray,
19
- BatchColumn as _BatchColumn,
20
- BatchColumnarData as _BatchColumnarData,
21
- BatchComponentData as _BatchComponentData,
22
- BatchDataset as _BatchDataset,
23
- BatchList as _BatchList,
24
- BatchPythonDataset as _BatchPythonDataset,
25
- ColumnarData as _ColumnarData,
26
- Component as _Component,
27
- ComponentData as _ComponentData,
28
- ComponentList as _ComponentList,
29
- DataArray as _DataArray,
30
- Dataset as _Dataset,
31
- DenseBatchArray as _DenseBatchArray,
32
- DenseBatchColumnarData as _DenseBatchColumnarData,
33
- DenseBatchData as _DenseBatchData,
34
- IndexPointer as _IndexPointer,
35
- NominalValue as _NominalValue,
36
- PythonDataset as _PythonDataset,
37
- RealValue as _RealValue,
38
- SingleArray as _SingleArray,
39
- SingleColumn as _SingleColumn,
40
- SingleColumnarData as _SingleColumnarData,
41
- SingleComponentData as _SingleComponentData,
42
- SingleDataset as _SingleDataset,
43
- SinglePythonDataset as _SinglePythonDataset,
44
- SparseBatchArray,
45
- SparseBatchColumnarData,
46
- SparseBatchData as _SparseBatchData,
47
- SparseDataComponentType as _SparseDataComponentType,
48
- )
49
-
50
- AsymValue = _AsymValue
51
- """
52
- Asymmetrical values are three-phase values like p or u_measured.
53
-
54
- - Example: (10400.0, 10500.0, 10600.0)
55
- """
56
-
57
- AttributeType = _AttributeType
58
- """
59
- An attribute type is a string reprenting the attribute type of a specific component.
60
-
61
- - Examples:
62
-
63
- - "id"
64
- - "u_rated"
65
- """
66
-
67
- AttributeValue = _AttributeValue
68
- """
69
- When representing a grid as a native python structure, each attribute (u_rated etc) is either a nominal value,
70
- a real value, or a tuple of three real values.
71
-
72
- - Examples:
73
-
74
- - real: 10500.0
75
- - nominal: 123
76
- - asym: (10400.0, 10500.0, 10600.0)
77
- """
78
-
79
- BatchArray = _BatchArray
80
- """
81
- A batch array is a either a :class:`DenseBatchArray` or a :class:`SparseBatchArray`.
82
- """
83
-
84
- BatchColumn = _BatchColumn
85
- """
86
- A batch column is a two-dimensional structured numpy array containing a list of the same attribute of
87
- multiple components of the same type. Otherwise, similar to :class:`SingleColumn`.
88
- """
89
-
90
- BatchColumnarData = _BatchColumnarData
91
- """
92
- Batch columnar data is either a :class:`DenseBatchColumnarData` or a :class:`SparseBatchColumnarData`.
93
- """
94
-
95
- BatchComponentData = _BatchComponentData
96
- """
97
- Batch component data can be :class:`BatchArray` or :class:`BatchColumnarData`.
98
- """
99
-
100
- BatchDataset = _BatchDataset
101
- """
102
- A batch dataset is a dictionary where the keys are the component types and the values are :class:`BatchComponentData`
103
-
104
- - Example: {
105
- ComponentType.node: :class:`DenseBatchArray`,
106
- ComponentType.line: :class:`SparseBatchArray`,
107
- ComponentType.link: :class:`DenseBatchColumnarData`,
108
- ComponentType.transformer: :class:`SparseBatchColumnarData`
109
- }
110
- """
111
-
112
- BatchList = _BatchList
113
- """
114
- A batch list is an alternative representation of a batch. It is a list of single datasets, where each single dataset
115
- is actually a batch. The batch list is intended as an intermediate data type, during conversions.
116
-
117
- - Example: [:class:`SingleDataset`, {ComponentType.node: :class:`SingleDataset`}]
118
- """
119
-
120
- BatchPythonDataset = _BatchPythonDataset
121
- """
122
- A batch dataset in native python representation is a list of dictionaries, where the keys are the component names and
123
- the values are a list of all the instances of such a component. In essence it stores the same information as a
124
- BatchDataset, but in a native python format, without using numpy. Actually it looks more like the BatchList.
125
-
126
- - Example:
127
-
128
- [{ComponentType.line: [{"id": 3, "from_status": 0, "to_status": 0, ...}],},
129
- {ComponentType.line: [{"id": 3, "from_status": 1, "to_status": 1, ...}],}]
130
- """
131
-
132
- ColumnarData = _ColumnarData
133
- """
134
- Columnar data can be :class:`SingleColumnarData` or :class:`BatchColumnarData`.
135
- """
136
-
137
- Component = _Component
138
- """
139
- A component, when represented in native python format, is a dictionary, where the keys are the attributes and the values
140
- are the corresponding values. It is allowed to add extra fields, containing either an AttributeValue or a string.
141
-
142
- - Example: {"id": 1, "u_rated": 10500.0, "original_id": "Busbar #1"}
143
- """
144
-
145
- ComponentData = _ComponentData
146
- """
147
- Component data can be :class:`DataArray` or :class:`ColumnarData`.
148
- """
149
-
150
- ComponentList = _ComponentList
151
- """
152
- A component list is a list containing components. In essence it stores the same information as a np.ndarray,
153
- but in a native python format, without using numpy.
154
-
155
- - Example: [{"id": 1, "u_rated": 10500.0}, {"id": 2, "u_rated": 10500.0}]
156
- """
157
-
158
- DataArray = _DataArray
159
- """
160
- A data array can be a :class:`SingleArray` or a :class:`BatchArray`.
161
- """
162
-
163
- Dataset = _Dataset
164
- """
165
- A general data set can be a :class:`SingleDataset` or a :class:`BatchDataset`.
166
-
167
- - Examples:
168
-
169
- - single: {ComponentType.node: :class:`SingleArray`, ComponentType.line: :class:`SingleColumnarData`}
170
-
171
- - batch: {
172
- ComponentType.node: :class:`DenseBatchArray`,
173
- ComponentType.line: :class:`SparseBatchArray`,
174
- ComponentType.link: :class:`DenseBatchColumnarData`,
175
- ComponentType.transformer: :class:`SparseBatchColumnarData`
176
- }
177
-
178
- """
179
-
180
- DenseBatchArray = _DenseBatchArray
181
- """
182
- A dense batch array is a two-dimensional structured numpy array containing a list of components of
183
- the same type for each scenario. Otherwise similar to :class:`SingleArray`.
184
- """
185
-
186
-
187
- DenseBatchColumnarData = _DenseBatchColumnarData
188
- """
189
- Batch columnar data is a dictionary where the keys are the attribute types of the same component
190
- and the values are :class:`BatchColumn`.
191
-
192
- - Example: {"id": :class:`AttributeType`, "from_status": :class:`BatchColumn`}
193
- """
194
-
195
- DenseBatchData = _DenseBatchData
196
- """
197
- Dense batch data can be a :class:`DenseBatchArray` or a :class:`DenseBatchColumnarData`.
198
- """
199
-
200
- IndexPointer = _IndexPointer
201
- """
202
- An index pointer is a one-dimensional numpy int64 array containing n+1 elements where n is the amount
203
- of scenarios, representing the start and end indices for each batch scenario as follows:
204
-
205
- - The elements are the indices in the data that point to the first element of that scenario.
206
- - The last element is one after the data index of the last element of the last scenario.
207
- - The first element and last element will therefore be 0 and the size of the data, respectively.
208
- """
209
-
210
-
211
- NominalValue = _NominalValue
212
- """
213
- Nominal values can be IDs, booleans, enums, tap pos.
214
-
215
- - Example: 123
216
- """
217
-
218
- PythonDataset = _PythonDataset
219
- """
220
- A general python data set can be a single or a batch python dataset.
221
-
222
- - Examples:
223
-
224
- - single:
225
-
226
- {
227
- ComponentType.node: [{"id": 1, "u_rated": 10500.0}, {"id": 2, "u_rated": 10500.0}],
228
- ComponentType.line: [{"id": 3, "from_node": 1, "to_node": 2, ...}],
229
- }
230
-
231
- - batch:
232
-
233
- [{ComponentType.line: [{"id": 3, "from_status": 0, "to_status": 0, ...}],},
234
- {ComponentType.line: [{"id": 3, "from_status": 1, "to_status": 1, ...}],}]
235
- """
236
-
237
- RealValue = _RealValue
238
- """
239
- Symmetrical values can be anything like cable properties, symmetric loads, etc.
240
-
241
- - Example: 10500.0
242
- """
243
-
244
- SingleArray = _SingleArray
245
- """
246
- A single array is a one-dimensional structured numpy array containing a list of components of the same type.
247
-
248
- - Examples:
249
-
250
- - structure: <1d-array>
251
- - concrete: array(
252
- [(0, 10500.0), (0, 10500.0)],
253
- dtype=power_grid_meta_data[DatasetType.input][ComponentType.node].dtype
254
- )
255
- """
256
-
257
- SingleColumn = _SingleColumn
258
- """
259
- A single column is a one-dimensional structured numpy array containing a list of the same attribute of
260
- multiple components of the same type.
261
-
262
- - Examples:
263
-
264
- - structure: <1d-array>
265
- - concrete:
266
-
267
- - array([0, 1], dtype=power_grid_meta_data[DatasetType.input][ComponentType.node].dtype.fields["id"][0])
268
- - array(
269
- [10500.0, 10500.0],
270
- dtype=power_grid_meta_data[DatasetType.input][ComponentType.node].dtype.fields["u_rated"][0]
271
- )
272
- """
273
-
274
-
275
- SingleColumnarData = _SingleColumnarData
276
- """
277
- Single columnar data is a dictionary where the keys are the attribute types of the same component
278
- and the values are :class:`SingleColumn`.
279
-
280
- - Example: {"id": :class:`AttributeType`, "u_rated": :class:`SingleColumn`}
281
- """
282
-
283
-
284
- SingleComponentData = _SingleComponentData
285
- """
286
- Single component data can be :class:`SingleArray` or :class:`SingleColumnarData`.
287
- """
288
-
289
- SingleDataset = _SingleDataset
290
- """
291
- A single dataset is a dictionary where the keys are the component types and the values are
292
- :class:`ComponentData`
293
-
294
- - Example: {ComponentType.node: :class:`SingleArray`, ComponentType.line: :class:`SingleColumnarData`}
295
- """
296
-
297
- SinglePythonDataset = _SinglePythonDataset
298
- """
299
- A single dataset in native python representation is a dictionary, where the keys are the component names and the
300
- values are a list of all the instances of such a component. In essence it stores the same information as a
301
- SingleDataset, but in a native python format, without using numpy.
302
-
303
- - Example:
304
-
305
- {
306
- ComponentType.node: [{"id": 1, "u_rated": 10500.0}, {"id": 2, "u_rated": 10500.0}],
307
- ComponentType.line: [{"id": 3, "from_node": 1, "to_node": 2, ...}],
308
- }
309
- """
310
-
311
- SparseBatchData = _SparseBatchData
312
- """
313
- Sparse batch data can be a :class:`SparseBatchArray` or a :class:`SparseBatchColumnarData`.
314
- """
315
-
316
- SparseDataComponentType = _SparseDataComponentType
317
- """
318
- A string representing the component type of sparse data structures.
319
-
320
- Must be either "data" or "indptr".
321
- """
1
+ # SPDX-FileCopyrightText: Contributors to the Power Grid Model project <powergridmodel@lfenergy.org>
2
+ #
3
+ # SPDX-License-Identifier: MPL-2.0
4
+
5
+ """
6
+ Data types involving PGM datasets.
7
+
8
+ Many data types are used throughout the power grid model project. In an attempt to clarify type hints, some types
9
+ are defined/exposed and explained.
10
+ """
11
+
12
+ # Import non class symbols as private to reassign and provide a docstring.
13
+ # Not necessary for class, as sphinx autodoc finds their docstrings
14
+ from power_grid_model._core.data_types import ( # noqa: F401
15
+ AsymValue as _AsymValue,
16
+ AttributeType as _AttributeType,
17
+ AttributeValue as _AttributeValue,
18
+ BatchArray as _BatchArray,
19
+ BatchColumn as _BatchColumn,
20
+ BatchColumnarData as _BatchColumnarData,
21
+ BatchComponentData as _BatchComponentData,
22
+ BatchDataset as _BatchDataset,
23
+ BatchList as _BatchList,
24
+ BatchPythonDataset as _BatchPythonDataset,
25
+ ColumnarData as _ColumnarData,
26
+ Component as _Component,
27
+ ComponentData as _ComponentData,
28
+ ComponentList as _ComponentList,
29
+ DataArray as _DataArray,
30
+ Dataset as _Dataset,
31
+ DenseBatchArray as _DenseBatchArray,
32
+ DenseBatchColumnarData as _DenseBatchColumnarData,
33
+ DenseBatchData as _DenseBatchData,
34
+ IndexPointer as _IndexPointer,
35
+ NominalValue as _NominalValue,
36
+ PythonDataset as _PythonDataset,
37
+ RealValue as _RealValue,
38
+ SingleArray as _SingleArray,
39
+ SingleColumn as _SingleColumn,
40
+ SingleColumnarData as _SingleColumnarData,
41
+ SingleComponentData as _SingleComponentData,
42
+ SingleDataset as _SingleDataset,
43
+ SinglePythonDataset as _SinglePythonDataset,
44
+ SparseBatchArray,
45
+ SparseBatchColumnarData,
46
+ SparseBatchData as _SparseBatchData,
47
+ SparseDataComponentType as _SparseDataComponentType,
48
+ )
49
+
50
+ AsymValue = _AsymValue
51
+ """
52
+ Asymmetrical values are three-phase values like p or u_measured.
53
+
54
+ - Example: (10400.0, 10500.0, 10600.0)
55
+ """
56
+
57
+ AttributeType = _AttributeType
58
+ """
59
+ An attribute type is a string reprenting the attribute type of a specific component.
60
+
61
+ - Examples:
62
+
63
+ - "id"
64
+ - "u_rated"
65
+ """
66
+
67
+ AttributeValue = _AttributeValue
68
+ """
69
+ When representing a grid as a native python structure, each attribute (u_rated etc) is either a nominal value,
70
+ a real value, or a tuple of three real values.
71
+
72
+ - Examples:
73
+
74
+ - real: 10500.0
75
+ - nominal: 123
76
+ - asym: (10400.0, 10500.0, 10600.0)
77
+ """
78
+
79
+ BatchArray = _BatchArray
80
+ """
81
+ A batch array is a either a :class:`DenseBatchArray` or a :class:`SparseBatchArray`.
82
+ """
83
+
84
+ BatchColumn = _BatchColumn
85
+ """
86
+ A batch column is a two-dimensional structured numpy array containing a list of the same attribute of
87
+ multiple components of the same type. Otherwise, similar to :class:`SingleColumn`.
88
+ """
89
+
90
+ BatchColumnarData = _BatchColumnarData
91
+ """
92
+ Batch columnar data is either a :class:`DenseBatchColumnarData` or a :class:`SparseBatchColumnarData`.
93
+ """
94
+
95
+ BatchComponentData = _BatchComponentData
96
+ """
97
+ Batch component data can be :class:`BatchArray` or :class:`BatchColumnarData`.
98
+ """
99
+
100
+ BatchDataset = _BatchDataset
101
+ """
102
+ A batch dataset is a dictionary where the keys are the component types and the values are :class:`BatchComponentData`
103
+
104
+ - Example: {
105
+ ComponentType.node: :class:`DenseBatchArray`,
106
+ ComponentType.line: :class:`SparseBatchArray`,
107
+ ComponentType.link: :class:`DenseBatchColumnarData`,
108
+ ComponentType.transformer: :class:`SparseBatchColumnarData`
109
+ }
110
+ """
111
+
112
+ BatchList = _BatchList
113
+ """
114
+ A batch list is an alternative representation of a batch. It is a list of single datasets, where each single dataset
115
+ is actually a batch. The batch list is intended as an intermediate data type, during conversions.
116
+
117
+ - Example: [:class:`SingleDataset`, {ComponentType.node: :class:`SingleDataset`}]
118
+ """
119
+
120
+ BatchPythonDataset = _BatchPythonDataset
121
+ """
122
+ A batch dataset in native python representation is a list of dictionaries, where the keys are the component names and
123
+ the values are a list of all the instances of such a component. In essence it stores the same information as a
124
+ BatchDataset, but in a native python format, without using numpy. Actually it looks more like the BatchList.
125
+
126
+ - Example:
127
+
128
+ [{ComponentType.line: [{"id": 3, "from_status": 0, "to_status": 0, ...}],},
129
+ {ComponentType.line: [{"id": 3, "from_status": 1, "to_status": 1, ...}],}]
130
+ """
131
+
132
+ ColumnarData = _ColumnarData
133
+ """
134
+ Columnar data can be :class:`SingleColumnarData` or :class:`BatchColumnarData`.
135
+ """
136
+
137
+ Component = _Component
138
+ """
139
+ A component, when represented in native python format, is a dictionary, where the keys are the attributes and the values
140
+ are the corresponding values. It is allowed to add extra fields, containing either an AttributeValue or a string.
141
+
142
+ - Example: {"id": 1, "u_rated": 10500.0, "original_id": "Busbar #1"}
143
+ """
144
+
145
+ ComponentData = _ComponentData
146
+ """
147
+ Component data can be :class:`DataArray` or :class:`ColumnarData`.
148
+ """
149
+
150
+ ComponentList = _ComponentList
151
+ """
152
+ A component list is a list containing components. In essence it stores the same information as a np.ndarray,
153
+ but in a native python format, without using numpy.
154
+
155
+ - Example: [{"id": 1, "u_rated": 10500.0}, {"id": 2, "u_rated": 10500.0}]
156
+ """
157
+
158
+ DataArray = _DataArray
159
+ """
160
+ A data array can be a :class:`SingleArray` or a :class:`BatchArray`.
161
+ """
162
+
163
+ Dataset = _Dataset
164
+ """
165
+ A general data set can be a :class:`SingleDataset` or a :class:`BatchDataset`.
166
+
167
+ - Examples:
168
+
169
+ - single: {ComponentType.node: :class:`SingleArray`, ComponentType.line: :class:`SingleColumnarData`}
170
+
171
+ - batch: {
172
+ ComponentType.node: :class:`DenseBatchArray`,
173
+ ComponentType.line: :class:`SparseBatchArray`,
174
+ ComponentType.link: :class:`DenseBatchColumnarData`,
175
+ ComponentType.transformer: :class:`SparseBatchColumnarData`
176
+ }
177
+
178
+ """
179
+
180
+ DenseBatchArray = _DenseBatchArray
181
+ """
182
+ A dense batch array is a two-dimensional structured numpy array containing a list of components of
183
+ the same type for each scenario. Otherwise similar to :class:`SingleArray`.
184
+ """
185
+
186
+
187
+ DenseBatchColumnarData = _DenseBatchColumnarData
188
+ """
189
+ Batch columnar data is a dictionary where the keys are the attribute types of the same component
190
+ and the values are :class:`BatchColumn`.
191
+
192
+ - Example: {"id": :class:`AttributeType`, "from_status": :class:`BatchColumn`}
193
+ """
194
+
195
+ DenseBatchData = _DenseBatchData
196
+ """
197
+ Dense batch data can be a :class:`DenseBatchArray` or a :class:`DenseBatchColumnarData`.
198
+ """
199
+
200
+ IndexPointer = _IndexPointer
201
+ """
202
+ An index pointer is a one-dimensional numpy int64 array containing n+1 elements where n is the amount
203
+ of scenarios, representing the start and end indices for each batch scenario as follows:
204
+
205
+ - The elements are the indices in the data that point to the first element of that scenario.
206
+ - The last element is one after the data index of the last element of the last scenario.
207
+ - The first element and last element will therefore be 0 and the size of the data, respectively.
208
+ """
209
+
210
+
211
+ NominalValue = _NominalValue
212
+ """
213
+ Nominal values can be IDs, booleans, enums, tap pos.
214
+
215
+ - Example: 123
216
+ """
217
+
218
+ PythonDataset = _PythonDataset
219
+ """
220
+ A general python data set can be a single or a batch python dataset.
221
+
222
+ - Examples:
223
+
224
+ - single:
225
+
226
+ {
227
+ ComponentType.node: [{"id": 1, "u_rated": 10500.0}, {"id": 2, "u_rated": 10500.0}],
228
+ ComponentType.line: [{"id": 3, "from_node": 1, "to_node": 2, ...}],
229
+ }
230
+
231
+ - batch:
232
+
233
+ [{ComponentType.line: [{"id": 3, "from_status": 0, "to_status": 0, ...}],},
234
+ {ComponentType.line: [{"id": 3, "from_status": 1, "to_status": 1, ...}],}]
235
+ """
236
+
237
+ RealValue = _RealValue
238
+ """
239
+ Symmetrical values can be anything like cable properties, symmetric loads, etc.
240
+
241
+ - Example: 10500.0
242
+ """
243
+
244
+ SingleArray = _SingleArray
245
+ """
246
+ A single array is a one-dimensional structured numpy array containing a list of components of the same type.
247
+
248
+ - Examples:
249
+
250
+ - structure: <1d-array>
251
+ - concrete: array(
252
+ [(0, 10500.0), (0, 10500.0)],
253
+ dtype=power_grid_meta_data[DatasetType.input][ComponentType.node].dtype
254
+ )
255
+ """
256
+
257
+ SingleColumn = _SingleColumn
258
+ """
259
+ A single column is a one-dimensional structured numpy array containing a list of the same attribute of
260
+ multiple components of the same type.
261
+
262
+ - Examples:
263
+
264
+ - structure: <1d-array>
265
+ - concrete:
266
+
267
+ - array([0, 1], dtype=power_grid_meta_data[DatasetType.input][ComponentType.node].dtype.fields["id"][0])
268
+ - array(
269
+ [10500.0, 10500.0],
270
+ dtype=power_grid_meta_data[DatasetType.input][ComponentType.node].dtype.fields["u_rated"][0]
271
+ )
272
+ """
273
+
274
+
275
+ SingleColumnarData = _SingleColumnarData
276
+ """
277
+ Single columnar data is a dictionary where the keys are the attribute types of the same component
278
+ and the values are :class:`SingleColumn`.
279
+
280
+ - Example: {"id": :class:`AttributeType`, "u_rated": :class:`SingleColumn`}
281
+ """
282
+
283
+
284
+ SingleComponentData = _SingleComponentData
285
+ """
286
+ Single component data can be :class:`SingleArray` or :class:`SingleColumnarData`.
287
+ """
288
+
289
+ SingleDataset = _SingleDataset
290
+ """
291
+ A single dataset is a dictionary where the keys are the component types and the values are
292
+ :class:`ComponentData`
293
+
294
+ - Example: {ComponentType.node: :class:`SingleArray`, ComponentType.line: :class:`SingleColumnarData`}
295
+ """
296
+
297
+ SinglePythonDataset = _SinglePythonDataset
298
+ """
299
+ A single dataset in native python representation is a dictionary, where the keys are the component names and the
300
+ values are a list of all the instances of such a component. In essence it stores the same information as a
301
+ SingleDataset, but in a native python format, without using numpy.
302
+
303
+ - Example:
304
+
305
+ {
306
+ ComponentType.node: [{"id": 1, "u_rated": 10500.0}, {"id": 2, "u_rated": 10500.0}],
307
+ ComponentType.line: [{"id": 3, "from_node": 1, "to_node": 2, ...}],
308
+ }
309
+ """
310
+
311
+ SparseBatchData = _SparseBatchData
312
+ """
313
+ Sparse batch data can be a :class:`SparseBatchArray` or a :class:`SparseBatchColumnarData`.
314
+ """
315
+
316
+ SparseDataComponentType = _SparseDataComponentType
317
+ """
318
+ A string representing the component type of sparse data structures.
319
+
320
+ Must be either "data" or "indptr".
321
+ """