shepherd-core 2025.8.1__py3-none-any.whl → 2026.2.1__py3-none-any.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.
- shepherd_core/config.py +1 -1
- shepherd_core/data_models/__init__.py +8 -4
- shepherd_core/data_models/base/cal_measurement.py +7 -2
- shepherd_core/data_models/base/calibration.py +23 -12
- shepherd_core/data_models/base/content.py +12 -2
- shepherd_core/data_models/base/shepherd.py +13 -4
- shepherd_core/data_models/base/wrapper.py +2 -0
- shepherd_core/data_models/content/__init__.py +8 -4
- shepherd_core/data_models/content/_external_fixtures.yaml +104 -96
- shepherd_core/data_models/content/_metadata_eenvs_bonito.yaml +436 -0
- shepherd_core/data_models/content/_metadata_eenvs_synthetic_multivariate_random_walk.yaml +164 -0
- shepherd_core/data_models/content/_metadata_eenvs_synthetic_on_off_markov.yaml +3280 -0
- shepherd_core/data_models/content/_metadata_eenvs_synthetic_on_off_windows.yaml +3260 -0
- shepherd_core/data_models/content/_metadata_eenvs_synthetic_static.yaml +450 -0
- shepherd_core/data_models/content/energy_environment.py +341 -23
- shepherd_core/data_models/content/energy_environment_fixture.yaml +21 -18
- shepherd_core/data_models/content/enum_datatypes.py +109 -0
- shepherd_core/data_models/content/firmware.py +44 -16
- shepherd_core/data_models/content/{virtual_harvester.py → virtual_harvester_config.py} +13 -96
- shepherd_core/data_models/content/{virtual_source.py → virtual_source_config.py} +103 -60
- shepherd_core/data_models/content/virtual_source_fixture.yaml +24 -24
- shepherd_core/data_models/content/virtual_storage_config.py +429 -0
- shepherd_core/data_models/content/virtual_storage_fixture_creator.py +267 -0
- shepherd_core/data_models/content/virtual_storage_fixture_ideal.yaml +637 -0
- shepherd_core/data_models/content/virtual_storage_fixture_lead.yaml +49 -0
- shepherd_core/data_models/content/virtual_storage_fixture_lipo.yaml +735 -0
- shepherd_core/data_models/content/virtual_storage_fixture_mlcc.yaml +200 -0
- shepherd_core/data_models/content/virtual_storage_fixture_param_experiments.py +151 -0
- shepherd_core/data_models/content/virtual_storage_fixture_super.yaml +150 -0
- shepherd_core/data_models/content/virtual_storage_fixture_tantal.yaml +550 -0
- shepherd_core/data_models/experiment/experiment.py +38 -13
- shepherd_core/data_models/experiment/observer_features.py +17 -4
- shepherd_core/data_models/experiment/target_config.py +56 -8
- shepherd_core/data_models/task/__init__.py +13 -2
- shepherd_core/data_models/task/emulation.py +10 -6
- shepherd_core/data_models/task/firmware_mod.py +3 -1
- shepherd_core/data_models/task/harvest.py +3 -1
- shepherd_core/data_models/task/helper_paths.py +2 -2
- shepherd_core/data_models/task/observer_tasks.py +8 -6
- shepherd_core/data_models/task/programming.py +4 -2
- shepherd_core/data_models/task/testbed_tasks.py +8 -2
- shepherd_core/data_models/testbed/cape.py +2 -0
- shepherd_core/data_models/testbed/gpio.py +2 -0
- shepherd_core/data_models/testbed/mcu.py +2 -0
- shepherd_core/data_models/testbed/observer.py +2 -0
- shepherd_core/data_models/testbed/target.py +7 -5
- shepherd_core/data_models/testbed/target_fixture.old1 +1 -1
- shepherd_core/data_models/testbed/target_fixture.yaml +1 -1
- shepherd_core/data_models/testbed/testbed.py +17 -15
- shepherd_core/decoder_waveform/uart.py +1 -1
- shepherd_core/exit_handler.py +22 -0
- shepherd_core/fw_tools/converter.py +2 -2
- shepherd_core/fw_tools/validation.py +1 -1
- shepherd_core/inventory/__init__.py +23 -21
- shepherd_core/inventory/system.py +3 -3
- shepherd_core/logger.py +0 -1
- shepherd_core/reader.py +32 -27
- shepherd_core/testbed_client/cache_path.py +3 -3
- shepherd_core/testbed_client/client_abc_fix.py +14 -3
- shepherd_core/testbed_client/client_web.py +7 -5
- shepherd_core/testbed_client/fixtures.py +7 -7
- shepherd_core/version.py +1 -1
- shepherd_core/vsource/__init__.py +4 -0
- shepherd_core/vsource/virtual_converter_model.py +29 -28
- shepherd_core/vsource/virtual_harvester_model.py +29 -21
- shepherd_core/vsource/virtual_harvester_simulation.py +38 -39
- shepherd_core/vsource/virtual_source_model.py +18 -14
- shepherd_core/vsource/virtual_source_simulation.py +71 -73
- shepherd_core/vsource/virtual_storage_model.py +164 -0
- shepherd_core/vsource/virtual_storage_model_fixed_point_math.py +58 -0
- shepherd_core/vsource/virtual_storage_models_kibam.py +449 -0
- shepherd_core/vsource/virtual_storage_simulator.py +104 -0
- shepherd_core/writer.py +16 -9
- {shepherd_core-2025.8.1.dist-info → shepherd_core-2026.2.1.dist-info}/METADATA +6 -3
- shepherd_core-2026.2.1.dist-info/RECORD +102 -0
- {shepherd_core-2025.8.1.dist-info → shepherd_core-2026.2.1.dist-info}/WHEEL +1 -1
- shepherd_core-2026.2.1.dist-info/licenses/LICENSE +21 -0
- shepherd_core/data_models/content/firmware_datatype.py +0 -15
- shepherd_core/data_models/virtual_source_doc.txt +0 -207
- shepherd_core-2025.8.1.dist-info/RECORD +0 -83
- {shepherd_core-2025.8.1.dist-info → shepherd_core-2026.2.1.dist-info}/top_level.txt +0 -0
- {shepherd_core-2025.8.1.dist-info → shepherd_core-2026.2.1.dist-info}/zip-safe +0 -0
|
@@ -0,0 +1,550 @@
|
|
|
1
|
+
- datatype: VirtualStorageConfig
|
|
2
|
+
comment: created by script 'virtual_storage_fixture_creator.py'
|
|
3
|
+
created: 2025-09-11 19:47:04.417937+02:00
|
|
4
|
+
parameters:
|
|
5
|
+
id: 658115076921762514
|
|
6
|
+
name: AVX TAJB106x006
|
|
7
|
+
description: Tantal-Capacitor similar to ideal Model, but with R_leak & R_series,
|
|
8
|
+
R_leak = 19600.000 Ohm, R_serial = 3 Ohm
|
|
9
|
+
comment: null
|
|
10
|
+
created: 2025-09-11 19:47:04.396525
|
|
11
|
+
updated_last: 2025-09-11 19:47:04.396525
|
|
12
|
+
owner: NES Lab
|
|
13
|
+
group: NES Lab
|
|
14
|
+
visible2group: true
|
|
15
|
+
visible2all: true
|
|
16
|
+
SoC_init: 0.8
|
|
17
|
+
q_As: 6.299999999999999e-05
|
|
18
|
+
p_VOC:
|
|
19
|
+
- 0.0
|
|
20
|
+
- 0.0
|
|
21
|
+
- 0.0
|
|
22
|
+
- 6.3
|
|
23
|
+
- 0.0
|
|
24
|
+
- 0.0
|
|
25
|
+
p_Rs:
|
|
26
|
+
- 0.0
|
|
27
|
+
- 0.0
|
|
28
|
+
- 3.0
|
|
29
|
+
- 0.0
|
|
30
|
+
- 0.0
|
|
31
|
+
- 0.0
|
|
32
|
+
p_RtS:
|
|
33
|
+
- 0.0
|
|
34
|
+
- 0.0
|
|
35
|
+
- 0.0
|
|
36
|
+
p_CtS:
|
|
37
|
+
- 0.0
|
|
38
|
+
- 0.0
|
|
39
|
+
- 0.0
|
|
40
|
+
p_RtL:
|
|
41
|
+
- 0.0
|
|
42
|
+
- 0.0
|
|
43
|
+
- 0.0
|
|
44
|
+
p_CtL:
|
|
45
|
+
- 0.0
|
|
46
|
+
- 0.0
|
|
47
|
+
- 0.0
|
|
48
|
+
p_rce: 1.0
|
|
49
|
+
kdash: 2.2250738585072014e-308
|
|
50
|
+
R_leak_Ohm: 19600000.0
|
|
51
|
+
- datatype: VirtualStorageConfig
|
|
52
|
+
comment: created by script 'virtual_storage_fixture_creator.py'
|
|
53
|
+
created: 2025-09-11 19:47:04.417991+02:00
|
|
54
|
+
parameters:
|
|
55
|
+
id: 717348422201116595
|
|
56
|
+
name: AVX TAJB156x006
|
|
57
|
+
description: Tantal-Capacitor similar to ideal Model, but with R_leak & R_series,
|
|
58
|
+
R_leak = 13066.667 Ohm, R_serial = 2 Ohm
|
|
59
|
+
comment: null
|
|
60
|
+
created: 2025-09-11 19:47:04.396569
|
|
61
|
+
updated_last: 2025-09-11 19:47:04.396569
|
|
62
|
+
owner: NES Lab
|
|
63
|
+
group: NES Lab
|
|
64
|
+
visible2group: true
|
|
65
|
+
visible2all: true
|
|
66
|
+
SoC_init: 0.8
|
|
67
|
+
q_As: 9.449999999999999e-05
|
|
68
|
+
p_VOC:
|
|
69
|
+
- 0.0
|
|
70
|
+
- 0.0
|
|
71
|
+
- 0.0
|
|
72
|
+
- 6.3
|
|
73
|
+
- 0.0
|
|
74
|
+
- 0.0
|
|
75
|
+
p_Rs:
|
|
76
|
+
- 0.0
|
|
77
|
+
- 0.0
|
|
78
|
+
- 2.0
|
|
79
|
+
- 0.0
|
|
80
|
+
- 0.0
|
|
81
|
+
- 0.0
|
|
82
|
+
p_RtS:
|
|
83
|
+
- 0.0
|
|
84
|
+
- 0.0
|
|
85
|
+
- 0.0
|
|
86
|
+
p_CtS:
|
|
87
|
+
- 0.0
|
|
88
|
+
- 0.0
|
|
89
|
+
- 0.0
|
|
90
|
+
p_RtL:
|
|
91
|
+
- 0.0
|
|
92
|
+
- 0.0
|
|
93
|
+
- 0.0
|
|
94
|
+
p_CtL:
|
|
95
|
+
- 0.0
|
|
96
|
+
- 0.0
|
|
97
|
+
- 0.0
|
|
98
|
+
p_rce: 1.0
|
|
99
|
+
kdash: 2.2250738585072014e-308
|
|
100
|
+
R_leak_Ohm: 13066666.666666666
|
|
101
|
+
- datatype: VirtualStorageConfig
|
|
102
|
+
comment: created by script 'virtual_storage_fixture_creator.py'
|
|
103
|
+
created: 2025-09-11 19:47:04.418033+02:00
|
|
104
|
+
parameters:
|
|
105
|
+
id: 259188812671774089
|
|
106
|
+
name: AVX TAJB226x006
|
|
107
|
+
description: Tantal-Capacitor similar to ideal Model, but with R_leak & R_series,
|
|
108
|
+
R_leak = 8909.091 Ohm, R_serial = 2 Ohm
|
|
109
|
+
comment: null
|
|
110
|
+
created: 2025-09-11 19:47:04.396610
|
|
111
|
+
updated_last: 2025-09-11 19:47:04.396611
|
|
112
|
+
owner: NES Lab
|
|
113
|
+
group: NES Lab
|
|
114
|
+
visible2group: true
|
|
115
|
+
visible2all: true
|
|
116
|
+
SoC_init: 0.8
|
|
117
|
+
q_As: 0.00013859999999999998
|
|
118
|
+
p_VOC:
|
|
119
|
+
- 0.0
|
|
120
|
+
- 0.0
|
|
121
|
+
- 0.0
|
|
122
|
+
- 6.3
|
|
123
|
+
- 0.0
|
|
124
|
+
- 0.0
|
|
125
|
+
p_Rs:
|
|
126
|
+
- 0.0
|
|
127
|
+
- 0.0
|
|
128
|
+
- 2.5
|
|
129
|
+
- 0.0
|
|
130
|
+
- 0.0
|
|
131
|
+
- 0.0
|
|
132
|
+
p_RtS:
|
|
133
|
+
- 0.0
|
|
134
|
+
- 0.0
|
|
135
|
+
- 0.0
|
|
136
|
+
p_CtS:
|
|
137
|
+
- 0.0
|
|
138
|
+
- 0.0
|
|
139
|
+
- 0.0
|
|
140
|
+
p_RtL:
|
|
141
|
+
- 0.0
|
|
142
|
+
- 0.0
|
|
143
|
+
- 0.0
|
|
144
|
+
p_CtL:
|
|
145
|
+
- 0.0
|
|
146
|
+
- 0.0
|
|
147
|
+
- 0.0
|
|
148
|
+
p_rce: 1.0
|
|
149
|
+
kdash: 2.2250738585072014e-308
|
|
150
|
+
R_leak_Ohm: 8909090.909090908
|
|
151
|
+
- datatype: VirtualStorageConfig
|
|
152
|
+
comment: created by script 'virtual_storage_fixture_creator.py'
|
|
153
|
+
created: 2025-09-11 19:47:04.418067+02:00
|
|
154
|
+
parameters:
|
|
155
|
+
id: 405126271430376935
|
|
156
|
+
name: AVX TAJB336x006
|
|
157
|
+
description: Tantal-Capacitor similar to ideal Model, but with R_leak & R_series,
|
|
158
|
+
R_leak = 5939.394 Ohm, R_serial = 2 Ohm
|
|
159
|
+
comment: null
|
|
160
|
+
created: 2025-09-11 19:47:04.396648
|
|
161
|
+
updated_last: 2025-09-11 19:47:04.396649
|
|
162
|
+
owner: NES Lab
|
|
163
|
+
group: NES Lab
|
|
164
|
+
visible2group: true
|
|
165
|
+
visible2all: true
|
|
166
|
+
SoC_init: 0.8
|
|
167
|
+
q_As: 0.00020789999999999996
|
|
168
|
+
p_VOC:
|
|
169
|
+
- 0.0
|
|
170
|
+
- 0.0
|
|
171
|
+
- 0.0
|
|
172
|
+
- 6.3
|
|
173
|
+
- 0.0
|
|
174
|
+
- 0.0
|
|
175
|
+
p_Rs:
|
|
176
|
+
- 0.0
|
|
177
|
+
- 0.0
|
|
178
|
+
- 2.2
|
|
179
|
+
- 0.0
|
|
180
|
+
- 0.0
|
|
181
|
+
- 0.0
|
|
182
|
+
p_RtS:
|
|
183
|
+
- 0.0
|
|
184
|
+
- 0.0
|
|
185
|
+
- 0.0
|
|
186
|
+
p_CtS:
|
|
187
|
+
- 0.0
|
|
188
|
+
- 0.0
|
|
189
|
+
- 0.0
|
|
190
|
+
p_RtL:
|
|
191
|
+
- 0.0
|
|
192
|
+
- 0.0
|
|
193
|
+
- 0.0
|
|
194
|
+
p_CtL:
|
|
195
|
+
- 0.0
|
|
196
|
+
- 0.0
|
|
197
|
+
- 0.0
|
|
198
|
+
p_rce: 1.0
|
|
199
|
+
kdash: 2.2250738585072014e-308
|
|
200
|
+
R_leak_Ohm: 5939393.939393939
|
|
201
|
+
- datatype: VirtualStorageConfig
|
|
202
|
+
comment: created by script 'virtual_storage_fixture_creator.py'
|
|
203
|
+
created: 2025-09-11 19:47:04.418098+02:00
|
|
204
|
+
parameters:
|
|
205
|
+
id: 438724114000062422
|
|
206
|
+
name: AVX TAJB476x006
|
|
207
|
+
description: Tantal-Capacitor similar to ideal Model, but with R_leak & R_series,
|
|
208
|
+
R_leak = 4170.213 Ohm, R_serial = 2 Ohm
|
|
209
|
+
comment: null
|
|
210
|
+
created: 2025-09-11 19:47:04.396689
|
|
211
|
+
updated_last: 2025-09-11 19:47:04.396689
|
|
212
|
+
owner: NES Lab
|
|
213
|
+
group: NES Lab
|
|
214
|
+
visible2group: true
|
|
215
|
+
visible2all: true
|
|
216
|
+
SoC_init: 0.8
|
|
217
|
+
q_As: 0.0002961
|
|
218
|
+
p_VOC:
|
|
219
|
+
- 0.0
|
|
220
|
+
- 0.0
|
|
221
|
+
- 0.0
|
|
222
|
+
- 6.3
|
|
223
|
+
- 0.0
|
|
224
|
+
- 0.0
|
|
225
|
+
p_Rs:
|
|
226
|
+
- 0.0
|
|
227
|
+
- 0.0
|
|
228
|
+
- 2.0
|
|
229
|
+
- 0.0
|
|
230
|
+
- 0.0
|
|
231
|
+
- 0.0
|
|
232
|
+
p_RtS:
|
|
233
|
+
- 0.0
|
|
234
|
+
- 0.0
|
|
235
|
+
- 0.0
|
|
236
|
+
p_CtS:
|
|
237
|
+
- 0.0
|
|
238
|
+
- 0.0
|
|
239
|
+
- 0.0
|
|
240
|
+
p_RtL:
|
|
241
|
+
- 0.0
|
|
242
|
+
- 0.0
|
|
243
|
+
- 0.0
|
|
244
|
+
p_CtL:
|
|
245
|
+
- 0.0
|
|
246
|
+
- 0.0
|
|
247
|
+
- 0.0
|
|
248
|
+
p_rce: 1.0
|
|
249
|
+
kdash: 2.2250738585072014e-308
|
|
250
|
+
R_leak_Ohm: 4170212.765957447
|
|
251
|
+
- datatype: VirtualStorageConfig
|
|
252
|
+
comment: created by script 'virtual_storage_fixture_creator.py'
|
|
253
|
+
created: 2025-09-11 19:47:04.418129+02:00
|
|
254
|
+
parameters:
|
|
255
|
+
id: 1009176866204862382
|
|
256
|
+
name: AVX TAJB686x006
|
|
257
|
+
description: Tantal-Capacitor similar to ideal Model, but with R_leak & R_series,
|
|
258
|
+
R_leak = 2882.353 Ohm, R_serial = 1 Ohm
|
|
259
|
+
comment: null
|
|
260
|
+
created: 2025-09-11 19:47:04.396727
|
|
261
|
+
updated_last: 2025-09-11 19:47:04.396727
|
|
262
|
+
owner: NES Lab
|
|
263
|
+
group: NES Lab
|
|
264
|
+
visible2group: true
|
|
265
|
+
visible2all: true
|
|
266
|
+
SoC_init: 0.8
|
|
267
|
+
q_As: 0.0004284
|
|
268
|
+
p_VOC:
|
|
269
|
+
- 0.0
|
|
270
|
+
- 0.0
|
|
271
|
+
- 0.0
|
|
272
|
+
- 6.3
|
|
273
|
+
- 0.0
|
|
274
|
+
- 0.0
|
|
275
|
+
p_Rs:
|
|
276
|
+
- 0.0
|
|
277
|
+
- 0.0
|
|
278
|
+
- 0.9
|
|
279
|
+
- 0.0
|
|
280
|
+
- 0.0
|
|
281
|
+
- 0.0
|
|
282
|
+
p_RtS:
|
|
283
|
+
- 0.0
|
|
284
|
+
- 0.0
|
|
285
|
+
- 0.0
|
|
286
|
+
p_CtS:
|
|
287
|
+
- 0.0
|
|
288
|
+
- 0.0
|
|
289
|
+
- 0.0
|
|
290
|
+
p_RtL:
|
|
291
|
+
- 0.0
|
|
292
|
+
- 0.0
|
|
293
|
+
- 0.0
|
|
294
|
+
p_CtL:
|
|
295
|
+
- 0.0
|
|
296
|
+
- 0.0
|
|
297
|
+
- 0.0
|
|
298
|
+
p_rce: 1.0
|
|
299
|
+
kdash: 2.2250738585072014e-308
|
|
300
|
+
R_leak_Ohm: 2882352.9411764704
|
|
301
|
+
- datatype: VirtualStorageConfig
|
|
302
|
+
comment: created by script 'virtual_storage_fixture_creator.py'
|
|
303
|
+
created: 2025-09-11 19:47:04.418164+02:00
|
|
304
|
+
parameters:
|
|
305
|
+
id: 729681208823285712
|
|
306
|
+
name: AVX TAJB107x006
|
|
307
|
+
description: Tantal-Capacitor similar to ideal Model, but with R_leak & R_series,
|
|
308
|
+
R_leak = 1960.000 Ohm, R_serial = 2 Ohm
|
|
309
|
+
comment: null
|
|
310
|
+
created: 2025-09-11 19:47:04.396770
|
|
311
|
+
updated_last: 2025-09-11 19:47:04.396770
|
|
312
|
+
owner: NES Lab
|
|
313
|
+
group: NES Lab
|
|
314
|
+
visible2group: true
|
|
315
|
+
visible2all: true
|
|
316
|
+
SoC_init: 0.8
|
|
317
|
+
q_As: 0.0006299999999999999
|
|
318
|
+
p_VOC:
|
|
319
|
+
- 0.0
|
|
320
|
+
- 0.0
|
|
321
|
+
- 0.0
|
|
322
|
+
- 6.3
|
|
323
|
+
- 0.0
|
|
324
|
+
- 0.0
|
|
325
|
+
p_Rs:
|
|
326
|
+
- 0.0
|
|
327
|
+
- 0.0
|
|
328
|
+
- 1.7
|
|
329
|
+
- 0.0
|
|
330
|
+
- 0.0
|
|
331
|
+
- 0.0
|
|
332
|
+
p_RtS:
|
|
333
|
+
- 0.0
|
|
334
|
+
- 0.0
|
|
335
|
+
- 0.0
|
|
336
|
+
p_CtS:
|
|
337
|
+
- 0.0
|
|
338
|
+
- 0.0
|
|
339
|
+
- 0.0
|
|
340
|
+
p_RtL:
|
|
341
|
+
- 0.0
|
|
342
|
+
- 0.0
|
|
343
|
+
- 0.0
|
|
344
|
+
p_CtL:
|
|
345
|
+
- 0.0
|
|
346
|
+
- 0.0
|
|
347
|
+
- 0.0
|
|
348
|
+
p_rce: 1.0
|
|
349
|
+
kdash: 2.2250738585072014e-308
|
|
350
|
+
R_leak_Ohm: 1960000.0
|
|
351
|
+
- datatype: VirtualStorageConfig
|
|
352
|
+
comment: created by script 'virtual_storage_fixture_creator.py'
|
|
353
|
+
created: 2025-09-11 19:47:04.418195+02:00
|
|
354
|
+
parameters:
|
|
355
|
+
id: 978798746708642073
|
|
356
|
+
name: AVX TAJC157x006
|
|
357
|
+
description: Tantal-Capacitor similar to ideal Model, but with R_leak & R_series,
|
|
358
|
+
R_leak = 1306.667 Ohm, R_serial = 1 Ohm
|
|
359
|
+
comment: null
|
|
360
|
+
created: 2025-09-11 19:47:04.396807
|
|
361
|
+
updated_last: 2025-09-11 19:47:04.396807
|
|
362
|
+
owner: NES Lab
|
|
363
|
+
group: NES Lab
|
|
364
|
+
visible2group: true
|
|
365
|
+
visible2all: true
|
|
366
|
+
SoC_init: 0.8
|
|
367
|
+
q_As: 0.0009449999999999999
|
|
368
|
+
p_VOC:
|
|
369
|
+
- 0.0
|
|
370
|
+
- 0.0
|
|
371
|
+
- 0.0
|
|
372
|
+
- 6.3
|
|
373
|
+
- 0.0
|
|
374
|
+
- 0.0
|
|
375
|
+
p_Rs:
|
|
376
|
+
- 0.0
|
|
377
|
+
- 0.0
|
|
378
|
+
- 1.3
|
|
379
|
+
- 0.0
|
|
380
|
+
- 0.0
|
|
381
|
+
- 0.0
|
|
382
|
+
p_RtS:
|
|
383
|
+
- 0.0
|
|
384
|
+
- 0.0
|
|
385
|
+
- 0.0
|
|
386
|
+
p_CtS:
|
|
387
|
+
- 0.0
|
|
388
|
+
- 0.0
|
|
389
|
+
- 0.0
|
|
390
|
+
p_RtL:
|
|
391
|
+
- 0.0
|
|
392
|
+
- 0.0
|
|
393
|
+
- 0.0
|
|
394
|
+
p_CtL:
|
|
395
|
+
- 0.0
|
|
396
|
+
- 0.0
|
|
397
|
+
- 0.0
|
|
398
|
+
p_rce: 1.0
|
|
399
|
+
kdash: 2.2250738585072014e-308
|
|
400
|
+
R_leak_Ohm: 1306666.6666666667
|
|
401
|
+
- datatype: VirtualStorageConfig
|
|
402
|
+
comment: created by script 'virtual_storage_fixture_creator.py'
|
|
403
|
+
created: 2025-09-11 19:47:04.418225+02:00
|
|
404
|
+
parameters:
|
|
405
|
+
id: 403726628035571227
|
|
406
|
+
name: AVX TAJC227x006
|
|
407
|
+
description: Tantal-Capacitor similar to ideal Model, but with R_leak & R_series,
|
|
408
|
+
R_leak = 890.909 Ohm, R_serial = 1 Ohm
|
|
409
|
+
comment: null
|
|
410
|
+
created: 2025-09-11 19:47:04.396844
|
|
411
|
+
updated_last: 2025-09-11 19:47:04.396845
|
|
412
|
+
owner: NES Lab
|
|
413
|
+
group: NES Lab
|
|
414
|
+
visible2group: true
|
|
415
|
+
visible2all: true
|
|
416
|
+
SoC_init: 0.8
|
|
417
|
+
q_As: 0.0013859999999999999
|
|
418
|
+
p_VOC:
|
|
419
|
+
- 0.0
|
|
420
|
+
- 0.0
|
|
421
|
+
- 0.0
|
|
422
|
+
- 6.3
|
|
423
|
+
- 0.0
|
|
424
|
+
- 0.0
|
|
425
|
+
p_Rs:
|
|
426
|
+
- 0.0
|
|
427
|
+
- 0.0
|
|
428
|
+
- 1.2
|
|
429
|
+
- 0.0
|
|
430
|
+
- 0.0
|
|
431
|
+
- 0.0
|
|
432
|
+
p_RtS:
|
|
433
|
+
- 0.0
|
|
434
|
+
- 0.0
|
|
435
|
+
- 0.0
|
|
436
|
+
p_CtS:
|
|
437
|
+
- 0.0
|
|
438
|
+
- 0.0
|
|
439
|
+
- 0.0
|
|
440
|
+
p_RtL:
|
|
441
|
+
- 0.0
|
|
442
|
+
- 0.0
|
|
443
|
+
- 0.0
|
|
444
|
+
p_CtL:
|
|
445
|
+
- 0.0
|
|
446
|
+
- 0.0
|
|
447
|
+
- 0.0
|
|
448
|
+
p_rce: 1.0
|
|
449
|
+
kdash: 2.2250738585072014e-308
|
|
450
|
+
R_leak_Ohm: 890909.0909090909
|
|
451
|
+
- datatype: VirtualStorageConfig
|
|
452
|
+
comment: created by script 'virtual_storage_fixture_creator.py'
|
|
453
|
+
created: 2025-09-11 19:47:04.418255+02:00
|
|
454
|
+
parameters:
|
|
455
|
+
id: 9706982809086515
|
|
456
|
+
name: AVX TAJC337x006
|
|
457
|
+
description: Tantal-Capacitor similar to ideal Model, but with R_leak & R_series,
|
|
458
|
+
R_leak = 593.939 Ohm, R_serial = 0 Ohm
|
|
459
|
+
comment: null
|
|
460
|
+
created: 2025-09-11 19:47:04.396886
|
|
461
|
+
updated_last: 2025-09-11 19:47:04.396886
|
|
462
|
+
owner: NES Lab
|
|
463
|
+
group: NES Lab
|
|
464
|
+
visible2group: true
|
|
465
|
+
visible2all: true
|
|
466
|
+
SoC_init: 0.8
|
|
467
|
+
q_As: 0.002079
|
|
468
|
+
p_VOC:
|
|
469
|
+
- 0.0
|
|
470
|
+
- 0.0
|
|
471
|
+
- 0.0
|
|
472
|
+
- 6.3
|
|
473
|
+
- 0.0
|
|
474
|
+
- 0.0
|
|
475
|
+
p_Rs:
|
|
476
|
+
- 0.0
|
|
477
|
+
- 0.0
|
|
478
|
+
- 0.5
|
|
479
|
+
- 0.0
|
|
480
|
+
- 0.0
|
|
481
|
+
- 0.0
|
|
482
|
+
p_RtS:
|
|
483
|
+
- 0.0
|
|
484
|
+
- 0.0
|
|
485
|
+
- 0.0
|
|
486
|
+
p_CtS:
|
|
487
|
+
- 0.0
|
|
488
|
+
- 0.0
|
|
489
|
+
- 0.0
|
|
490
|
+
p_RtL:
|
|
491
|
+
- 0.0
|
|
492
|
+
- 0.0
|
|
493
|
+
- 0.0
|
|
494
|
+
p_CtL:
|
|
495
|
+
- 0.0
|
|
496
|
+
- 0.0
|
|
497
|
+
- 0.0
|
|
498
|
+
p_rce: 1.0
|
|
499
|
+
kdash: 2.2250738585072014e-308
|
|
500
|
+
R_leak_Ohm: 593939.3939393939
|
|
501
|
+
- datatype: VirtualStorageConfig
|
|
502
|
+
comment: created by script 'virtual_storage_fixture_creator.py'
|
|
503
|
+
created: 2025-09-11 19:47:04.418284+02:00
|
|
504
|
+
parameters:
|
|
505
|
+
id: 472122620116510153
|
|
506
|
+
name: AVX TAJD477x006
|
|
507
|
+
description: Tantal-Capacitor similar to ideal Model, but with R_leak & R_series,
|
|
508
|
+
R_leak = 417.021 Ohm, R_serial = 0 Ohm
|
|
509
|
+
comment: null
|
|
510
|
+
created: 2025-09-11 19:47:04.396929
|
|
511
|
+
updated_last: 2025-09-11 19:47:04.396929
|
|
512
|
+
owner: NES Lab
|
|
513
|
+
group: NES Lab
|
|
514
|
+
visible2group: true
|
|
515
|
+
visible2all: true
|
|
516
|
+
SoC_init: 0.8
|
|
517
|
+
q_As: 0.0029609999999999997
|
|
518
|
+
p_VOC:
|
|
519
|
+
- 0.0
|
|
520
|
+
- 0.0
|
|
521
|
+
- 0.0
|
|
522
|
+
- 6.3
|
|
523
|
+
- 0.0
|
|
524
|
+
- 0.0
|
|
525
|
+
p_Rs:
|
|
526
|
+
- 0.0
|
|
527
|
+
- 0.0
|
|
528
|
+
- 0.4
|
|
529
|
+
- 0.0
|
|
530
|
+
- 0.0
|
|
531
|
+
- 0.0
|
|
532
|
+
p_RtS:
|
|
533
|
+
- 0.0
|
|
534
|
+
- 0.0
|
|
535
|
+
- 0.0
|
|
536
|
+
p_CtS:
|
|
537
|
+
- 0.0
|
|
538
|
+
- 0.0
|
|
539
|
+
- 0.0
|
|
540
|
+
p_RtL:
|
|
541
|
+
- 0.0
|
|
542
|
+
- 0.0
|
|
543
|
+
- 0.0
|
|
544
|
+
p_CtL:
|
|
545
|
+
- 0.0
|
|
546
|
+
- 0.0
|
|
547
|
+
- 0.0
|
|
548
|
+
p_rce: 1.0
|
|
549
|
+
kdash: 2.2250738585072014e-308
|
|
550
|
+
R_leak_Ohm: 417021.27659574465
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
from collections.abc import Iterable
|
|
4
4
|
from datetime import datetime
|
|
5
5
|
from datetime import timedelta
|
|
6
|
+
from typing import TYPE_CHECKING
|
|
6
7
|
from typing import Annotated
|
|
8
|
+
from typing import final
|
|
7
9
|
|
|
8
10
|
from pydantic import Field
|
|
9
11
|
from pydantic import model_validator
|
|
@@ -16,15 +18,20 @@ from shepherd_core.data_models.base.shepherd import ShpModel
|
|
|
16
18
|
from shepherd_core.data_models.base.timezone import local_now
|
|
17
19
|
from shepherd_core.data_models.testbed.target import Target
|
|
18
20
|
from shepherd_core.data_models.testbed.testbed import Testbed
|
|
21
|
+
from shepherd_core.logger import log
|
|
19
22
|
from shepherd_core.version import version
|
|
20
23
|
|
|
21
24
|
from .observer_features import SystemLogging
|
|
22
25
|
from .target_config import TargetConfig
|
|
23
26
|
|
|
27
|
+
if TYPE_CHECKING:
|
|
28
|
+
from pathlib import Path
|
|
29
|
+
|
|
24
30
|
# defaults (pre-init complex types)
|
|
25
31
|
sys_log_all = SystemLogging() # = all active
|
|
26
32
|
|
|
27
33
|
|
|
34
|
+
@final
|
|
28
35
|
class Experiment(ShpModel, title="Config of an Experiment"):
|
|
29
36
|
"""Config for experiments on the testbed emulating energy environments for target nodes."""
|
|
30
37
|
|
|
@@ -54,6 +61,7 @@ class Experiment(ShpModel, title="Config of an Experiment"):
|
|
|
54
61
|
def post_validation(self) -> Self:
|
|
55
62
|
self._validate_observers(self.target_configs)
|
|
56
63
|
self._validate_targets(self.target_configs)
|
|
64
|
+
self._validate_eenvs(self.target_configs)
|
|
57
65
|
if self.duration and self.duration.total_seconds() < 0:
|
|
58
66
|
raise ValueError("Duration of experiment can't be negative.")
|
|
59
67
|
return self
|
|
@@ -62,16 +70,16 @@ class Experiment(ShpModel, title="Config of an Experiment"):
|
|
|
62
70
|
def _validate_targets(configs: Iterable[TargetConfig]) -> None:
|
|
63
71
|
target_ids: list[int] = []
|
|
64
72
|
custom_ids: list[int] = []
|
|
65
|
-
for
|
|
66
|
-
for
|
|
67
|
-
target_ids.append(
|
|
73
|
+
for config_ in configs:
|
|
74
|
+
for id_ in config_.target_IDs:
|
|
75
|
+
target_ids.append(id_)
|
|
68
76
|
if config.VALIDATE_INFRA:
|
|
69
|
-
Target(id=
|
|
77
|
+
Target(id=id_)
|
|
70
78
|
# ⤷ this can raise exception for non-existing targets
|
|
71
|
-
if
|
|
72
|
-
custom_ids
|
|
79
|
+
if config_.custom_IDs is not None:
|
|
80
|
+
custom_ids += config_.custom_IDs[: len(config_.target_IDs)]
|
|
73
81
|
else:
|
|
74
|
-
custom_ids
|
|
82
|
+
custom_ids += config_.target_IDs
|
|
75
83
|
if len(target_ids) > len(set(target_ids)):
|
|
76
84
|
raise ValueError("Target-ID used more than once in Experiment!")
|
|
77
85
|
if len(target_ids) > len(set(custom_ids)):
|
|
@@ -82,20 +90,37 @@ class Experiment(ShpModel, title="Config of an Experiment"):
|
|
|
82
90
|
if not config.VALIDATE_INFRA:
|
|
83
91
|
return
|
|
84
92
|
testbed = Testbed()
|
|
85
|
-
target_ids = [
|
|
86
|
-
obs_ids = [testbed.get_observer(
|
|
93
|
+
target_ids = [id_ for config_ in configs for id_ in config_.target_IDs]
|
|
94
|
+
obs_ids = [testbed.get_observer(id_).id for id_ in target_ids]
|
|
87
95
|
if len(target_ids) > len(set(obs_ids)):
|
|
88
96
|
raise ValueError(
|
|
89
97
|
"Observer is used more than once in Experiment -> only 1 target per observer!"
|
|
90
98
|
)
|
|
91
99
|
|
|
100
|
+
@staticmethod
|
|
101
|
+
def _validate_eenvs(configs: Iterable[TargetConfig]) -> None:
|
|
102
|
+
"""Make sure eenvs are usable."""
|
|
103
|
+
# TODO: these individual validations should go to class itself (decoupling)
|
|
104
|
+
# TODO: data_2_copy means the data itself must be locally available
|
|
105
|
+
paths_all: list[Path] = [
|
|
106
|
+
path
|
|
107
|
+
for cfg in configs
|
|
108
|
+
for path in cfg.get_critical_paths(warn_reuse=False)
|
|
109
|
+
# direct warning inside cfg is disabled here as it is done during cfg.__init__()
|
|
110
|
+
]
|
|
111
|
+
if len(paths_all) != len(set(paths_all)):
|
|
112
|
+
log.warning(
|
|
113
|
+
"Detected re-usage of non-repeatable EnergyProfiles "
|
|
114
|
+
"in Experiment across TargetConfigs"
|
|
115
|
+
)
|
|
116
|
+
|
|
92
117
|
def get_target_ids(self) -> list:
|
|
93
|
-
return [
|
|
118
|
+
return [id_ for config_ in self.target_configs for id_ in config_.target_IDs]
|
|
94
119
|
|
|
95
120
|
def get_target_config(self, target_id: int) -> TargetConfig:
|
|
96
|
-
for
|
|
97
|
-
if target_id in
|
|
98
|
-
return
|
|
121
|
+
for config_ in self.target_configs:
|
|
122
|
+
if target_id in config_.target_IDs:
|
|
123
|
+
return config_
|
|
99
124
|
# gets already caught in target_config - but keep:
|
|
100
125
|
msg = f"Target-ID {target_id} was not found in Experiment '{self.name}'"
|
|
101
126
|
raise ValueError(msg)
|