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 created modelica model for ghp #687

Closed
tanushree04 opened this issue Dec 23, 2024 · 2 comments
Closed

Error in created modelica model for ghp #687

tanushree04 opened this issue Dec 23, 2024 · 2 comments

Comments

@tanushree04
Copy link
Collaborator

tanushree04 commented Dec 23, 2024

balanced_load_5_3.json

Expected Behavior

Modelica model is created

Actual Behavior

Error

Steps to Reproduce

uo_des create-model .\ghe_project_3\sys_param_5_3.json .\ghe_project_3\balanced_load_5_3.json .\ghe_project_3\modelica_balanced_3

Version Information

GMT 0.9.1

Modelica Buildings Library: 11

PS C:\Users\tcharan\urbanopt-cli> uo_des create-model .\ghe_project_3\sys_param_5_3.json .\ghe_project_3\balanced_load_5_3.json .\ghe_project_3\modelica_balanced_3         
Traceback (most recent call last):
  File "C:\Users\tcharan\urbanopt-cli\example_files\python_deps\python-3.10\lib\runpy.py", line 196, in _run_module_as_main 
    return _run_code(code, main_globals, None,
  File "C:\Users\tcharan\urbanopt-cli\example_files\python_deps\python-3.10\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Users\tcharan\urbanopt-cli\example_files\python_deps\python-3.10\Scripts\uo_des.exe\__main__.py", line 7, in <module>
  File "C:\Users\tcharan\urbanopt-cli\example_files\python_deps\python-3.10\lib\site-packages\click\core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "C:\Users\tcharan\urbanopt-cli\example_files\python_deps\python-3.10\lib\site-packages\click\core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "C:\Users\tcharan\urbanopt-cli\example_files\python_deps\python-3.10\lib\site-packages\click\core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "C:\Users\tcharan\urbanopt-cli\example_files\python_deps\python-3.10\lib\site-packages\click\core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\Users\tcharan\urbanopt-cli\example_files\python_deps\python-3.10\lib\site-packages\click\core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "C:\Users\tcharan\urbanopt-cli\example_files\python_deps\python-3.10\lib\site-packages\management\uo_des.py", line 160, in create_model
    gmt = GeoJsonModelicaTranslator(geojson_feature_file, sys_param_file, project_path.parent, project_path.name)
  File "C:\Users\tcharan\urbanopt-cli\example_files\python_deps\python-3.10\lib\site-packages\geojson_modelica_translator\geojson_modelica_translator.py", line 186, in __init__
    self._couplings = _parse_couplings(self._geojson, self._system_parameters, sys_param_district_type)
  File "C:\Users\tcharan\urbanopt-cli\example_files\python_deps\python-3.10\lib\site-packages\geojson_modelica_translator\geojson_modelica_translator.py", line 99, in _parse_couplings
    all_couplings.append(Coupling(distribution, borefield, district_type="fifth_generation"))
UnboundLocalError: local variable 'borefield' referenced before assignment

balanced_load_5_3.json
sys_param_5_3.json

@vtnate
Copy link
Contributor

vtnate commented Dec 24, 2024

I think this comes from a poorly built _loop_order.json file. That might happen if the is_ghe_start_loop parameter isn't set correctly in the geojson file. NREL/ThermalNetwork#58 is removing that parameter altogether, so this shouldn't be a problem for much longer.

@vtnate
Copy link
Contributor

vtnate commented Jan 2, 2025

Closed by #688

@vtnate vtnate closed this as completed Jan 2, 2025
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

2 participants