You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I change the simulation.toml in the examples/monte_carlo to have
"Export Data Tables" = true
I get
2022-10-14 11:56:33,245 - ERROR [PyDSS.pydss_project pydss_project.py:384] : Simulation failed
Traceback (most recent call last):
File "/Users/nick/projects/pydss/PyDSS/PyDSS/pydss_project.py", line 378, in run
scenario.export_data()
File "/Users/nick/projects/pydss/PyDSS/PyDSS/pydss_results.py", line 350, in export_data
self._export_element_timeseries(path, fmt, compress)
File "/Users/nick/projects/pydss/PyDSS/PyDSS/pydss_results.py", line 356, in _export_element_timeseries
for elem_class in self.list_element_classes():
File "/Users/nick/projects/pydss/PyDSS/PyDSS/pydss_results.py", line 725, in list_element_classes
return self._elem_classes[:]
AttributeError: 'PyDssScenarioResults' object has no attribute '_elem_classes'
Traceback (most recent call last):
File "/Users/nick/projects/pydss/env/bin/pydss", line 33, in <module>
sys.exit(load_entry_point('dsspy', 'console_scripts', 'pydss')())
File "/Users/nick/projects/pydss/env/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/Users/nick/projects/pydss/env/lib/python3.10/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/Users/nick/projects/pydss/env/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/nick/projects/pydss/env/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/nick/projects/pydss/env/lib/python3.10/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/Users/nick/projects/pydss/PyDSS/PyDSS/cli/run.py", line 105, in run
project.run(tar_project=tar_project, zip_project=zip_project, dry_run=dry_run)
File "/Users/nick/projects/pydss/PyDSS/PyDSS/pydss_project.py", line 378, in run
scenario.export_data()
File "/Users/nick/projects/pydss/PyDSS/PyDSS/pydss_results.py", line 350, in export_data
self._export_element_timeseries(path, fmt, compress)
File "/Users/nick/projects/pydss/PyDSS/PyDSS/pydss_results.py", line 356, in _export_element_timeseries
for elem_class in self.list_element_classes():
File "/Users/nick/projects/pydss/PyDSS/PyDSS/pydss_results.py", line 725, in list_element_classes
return self._elem_classes[:]
AttributeError: 'PyDssScenarioResults' object has no attribute '_elem_classes'
I did some debugging and discovered that this line:
evaluates to True, which returns before PyDssScenarioResults._group and PyDssScenarioResults_elem_classes are defined.
Maybe not understanding the Exports options, which looks outdated. I was hoping to understand the Monte Carlo capability better and what I can get in the results exports.
The text was updated successfully, but these errors were encountered:
The problem is that the project scenario names get defined in the simulation.toml but then at runtime, for Monte Carlo simulations, each iteration gets a new scenario name, like my_scenario_MC0. The code that processes the results does not know about the name changes, and so that's why it crashes.
It probably wouldn't be hard to fix this. In the meantime, if you want to see the raw data, it is in the store.h5 file.
Is there documentation of what is in the tables that come with "Export Data Tables" = true ? I am looking for bus voltages specifically; so wondering if I should spend the time to figure out how to fix this issue or if I can get a bus voltage report another way?
This is loosely covered in https://nrel.github.io/PyDSS/tutorial.html, but it could be improved. Anyway, once you define the exports, that data will get stored in <your-project-path>/store.h5. The docs give instructions about how to read the data into pandas DataFrames. If you prefer CSV files, you can set Export Data Tables to true and those CSVs files will get recorded to <your-project-path>/Exports.
If I change the
simulation.toml
in the examples/monte_carlo to haveI get
I did some debugging and discovered that this line:
PyDSS/PyDSS/pydss_results.py
Line 247 in 8a208ea
evaluates to
True
, which returns beforePyDssScenarioResults._group
andPyDssScenarioResults_elem_classes
are defined.Maybe not understanding the Exports options, which looks outdated. I was hoping to understand the Monte Carlo capability better and what I can get in the results exports.
The text was updated successfully, but these errors were encountered: