Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in PVSystems.dss #44

Open
tanushree04 opened this issue Oct 28, 2022 · 2 comments
Open

Error in PVSystems.dss #44

tanushree04 opened this issue Oct 28, 2022 · 2 comments

Comments

@tanushree04
Copy link
Collaborator

tanushree04 commented Oct 28, 2022

To replicate the error:

In the URBANopt cli,

  • create disco project
  • create REopt Scenario
  • run REopt Scenario
  • default Post Process
  • REopt Feature Post Process
  • Run OpenDSS
  • Run DISCO

within PVSystems.dss file the following error occurs:
PVSystem.solar_1.phases: Value (0) cannot be zero

Complete error on running DISCO


Running DISCO...
ERROR running DISCO: 2022-10-28 15:26:38,958 - ERROR [disco.cli.upgrade_cost_analysis upgrade_cost_analysis.py:227] : Unexpected error in upgrade cost analysis job=REopt_baseline_scenario
Traceback (most recent call last):
  File "C:\urbanopt-cli\example_files\python_deps\python-3.10\lib\site-packages\disco\cli\upgrade_cost_analysis.py", line 221, in run
    run_job(job, config, jobs_output_dir, file_log_level)
  File "C:\urbanopt-cli\example_files\python_deps\python-3.10\lib\site-packages\disco\cli\upgrade_cost_analysis.py", line 308, in run_job
    simulation.run(
  File "C:\urbanopt-cli\example_files\python_deps\python-3.10\lib\site-packages\disco\extensions\upgrade_simulation\upgrade_simulation.py", line 125, in run
    determine_thermal_upgrades(
  File "C:\urbanopt-cli\example_files\python_deps\python-3.10\lib\site-packages\jade\utils\timing_utils.py", line 130, in timed_
    return _timed_func(collector, func, *args, **kwargs)
  File "C:\urbanopt-cli\example_files\python_deps\python-3.10\lib\site-packages\jade\utils\timing_utils.py", line 139, in _timed_func
    return func(*args, **kwargs)
  File "C:\urbanopt-cli\example_files\python_deps\python-3.10\lib\site-packages\disco\extensions\upgrade_simulation\upgrades\automated_thermal_upgrades.py", line 48, in determine_thermal_upgrades      
    simulation_params = reload_dss_circuit(dss_file_list=initial_dss_file_list, commands_list=None, **initial_simulation_params)
  File "C:\urbanopt-cli\example_files\python_deps\python-3.10\lib\site-packages\jade\utils\timing_utils.py", line 130, in timed_
    return _timed_func(collector, func, *args, **kwargs)
  File "C:\urbanopt-cli\example_files\python_deps\python-3.10\lib\site-packages\jade\utils\timing_utils.py", line 139, in _timed_func
    return func(*args, **kwargs)
  File "C:\urbanopt-cli\example_files\python_deps\python-3.10\lib\site-packages\disco\extensions\upgrade_simulation\upgrades\common_functions.py", line 65, in reload_dss_circuit
    check_dss_run_command(f"Redirect '{dss_file}'")
  File "C:\urbanopt-cli\example_files\python_deps\python-3.10\lib\site-packages\disco\extensions\upgrade_simulation\upgrades\common_functions.py", line 1362, in check_dss_run_command
    result = dss.Text.Command(f"{command_string}")
  File "C:\urbanopt-cli\example_files\python_deps\python-3.10\lib\site-packages\opendssdirect\Text.py", line 17, in Command
    CheckForError()
  File "C:\urbanopt-cli\example_files\python_deps\python-3.10\lib\site-packages\dss\_cffi_api_util.py", line 128, in _check_for_error
    raise DSSException(error_num, self._get_string(self._lib.Error_Get_Description()))
dss._cffi_api_util.DSSException: (#2020031) PVSystem.solar_1.phases: Value (0) cannot be zero.

[file: "C:\urbanopt-cli\disco_example_project\run\reopt_baseline_scenario\opendss\dss_files\PVSystems.dss", line: 1]

[file: "C:\urbanopt-cli\disco_example_project\run\reopt_baseline_scenario\opendss\dss_files\Master.dss", line: 12]


attached PVSystems.dss:


New PVSystem.solar_1 bus1=e4bcf9d6-e0b7-421c-91d4-554d06c69364 phases=0 kVA=5022.928900000001 Pmpp=4566.299 Model=1 pf=1.0 irradiance=1 yearly=pv_feature_1
New PVSystem.solar_2 bus1=53c917d8-b04d-4110-bdd9-cbf044e6a1fa.1.2.3 phases=3 kV=0.48 kVA=232.11441000000005 Pmpp=211.0131 conn=wye Model=1 pf=1.0 irradiance=1 yearly=pv_feature_2
New PVSystem.solar_3 bus1=67b07fac-6666-4954-98b8-3e08b0896646 phases=0 kVA=1216.0399900000002 Pmpp=1105.4909 Model=1 pf=1.0 irradiance=1 yearly=pv_feature_3
New PVSystem.solar_4 bus1=be6e5e58-e73e-4172-a939-250c6a7a3c2c.1.2.3 phases=3 kV=0.48 kVA=322.15062 Pmpp=292.8642 conn=wye Model=1 pf=1.0 irradiance=1 yearly=pv_feature_4
New PVSystem.solar_5 bus1=3d1aa47d-69dd-4200-ab34-9b6244ad82d7.1.2.3 phases=3 kV=0.48 kVA=11.903760000000002 Pmpp=10.8216 conn=wye Model=1 pf=1.0 irradiance=1 yearly=pv_feature_5
New PVSystem.solar_6 bus1=db52eea7-f395-4fb1-999d-47c82333a4a7.1.2.3 phases=3 kV=0.48 kVA=15.713390000000004 Pmpp=14.2849 conn=wye Model=1 pf=1.0 irradiance=1 yearly=pv_feature_6
New PVSystem.solar_7 bus1=9d037967-7ac1-4296-8f87-2d4a842d7a87.1.2.3 phases=3 kV=0.48 kVA=1046.25323 Pmpp=951.1393 conn=wye Model=1 pf=1.0 irradiance=1 yearly=pv_feature_7
New PVSystem.solar_8 bus1=18fe5a25-2547-4c32-a225-8bd455e93c9b phases=0 kVA=1565.2780000000002 Pmpp=1422.98 Model=1 pf=1.0 irradiance=1 yearly=pv_feature_8
New PVSystem.solar_9 bus1=40867501-5a41-4626-a9d4-be5444a5b575 phases=0 kVA=1465.50503 Pmpp=1332.2773 Model=1 pf=1.0 irradiance=1 yearly=pv_feature_9
New PVSystem.solar_10 bus1=44963046-644a-4c03-b81c-f65d80475015 phases=0 kVA=5681.75564 Pmpp=5165.2324 Model=1 pf=1.0 irradiance=1 yearly=pv_feature_10
New PVSystem.solar_11 bus1=14072af7-3121-4e3d-b85f-c79868702ec9.1.2.3 phases=3 kV=0.48 kVA=331.2553200000001 Pmpp=301.1412 conn=wye Model=1 pf=1.0 irradiance=1 yearly=pv_feature_11
New PVSystem.solar_12 bus1=753b77b9-b88b-443f-9c3b-3cd977bb3558 phases=0 kVA=1339.53556 Pmpp=1217.7595999999999 Model=1 pf=1.0 irradiance=1 yearly=pv_feature_12
New PVSystem.solar_13 bus1=38a42375-ff02-497e-90ef-c5d9eb78850e phases=0 kVA=450.71279000000004 Pmpp=409.73890000000006 Model=1 pf=1.0 irradiance=1 yearly=pv_feature_13

@vtnate
Copy link
Collaborator

vtnate commented Nov 28, 2022

With the caveat that I haven't investigated this issue in any detail, it's possible that addressing #42 will resolve this.

@PMeira
Copy link

PMeira commented Mar 30, 2023

Hi,
A bit of context about why this error message was introduced: previously this invalid phases=0 was being silently ignored and the phases value was left as the previously set value, or default value (3).

You could see that by running the .dss script and then inspecting the elements through one of the APIs.

This kind of issue is usually a conversion error and blows up sooner or later.

I'd recommend either investigating why phases=0 is being used in the first place (doesn't make much sense but there could be more context I'm not aware). If the intention is to leave phases at the default value, just removing phases=0 would do that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants