architecture-building-systems / CityEnergyAnalyst

The City Energy Analyst (CEA)
https://www.cityenergyanalyst.com/
MIT License
196 stars 66 forks source link

Bug testing optimization: "Missing network edge list" #1301

Closed gabriel-happle closed 6 years ago

gabriel-happle commented 6 years ago

Start Time: Mon May 14 14:50:02 2018
Running script OptimizationTool...
Executing: C:\Users\Gabriel\Anaconda2\envs\cea\python.exe -u -m cea.interfaces.cli.cli optimization --scenario C:\Users\Gabriel\Documents\GitHub\cea-reference-case\reference-case-WTP\03_MIX_medium_density\baseline --fcheckpoint 1 --ngen 2 --halloffame 20 --iscooling true --initialind 2 --maxtime 604800 --isheating false
Missing network edge list. Consider running thermal network script first

Traceback (most recent call last):
  File "C:\Users\Gabriel\AppData\Roaming\ESRI\Desktop10.5\ArcToolbox\My Toolboxes\cea\interfaces\arcgis\arcgishelper.py", line 68, in execute
    run_cli(self.cea_tool, **kwargs)
  File "C:\Users\Gabriel\AppData\Roaming\ESRI\Desktop10.5\ArcToolbox\My Toolboxes\cea\interfaces\arcgis\arcgishelper.py", line 155, in run_cli
    raise Exception('Tool did not run successfully')
Exception: Tool did not run successfully

Failed to execute (OptimizationTool).
Failed at Mon May 14 14:50:11 2018 (Elapsed Time: 8.41 seconds)```
gabriel-happle commented 6 years ago

@daren-thomas this issue seems to have many aspects. one of them seems to be that the ArcGIS interface of optimization and thermal networks does not modify/change and save the config file in the right way. I.e., changes in the ArcGIS window are only partly transferred to the config file

daren-thomas commented 6 years ago

@gabriel-happle they're not saved to the config file at all...

daren-thomas commented 6 years ago

@gabriel-happle I think I see the problem now. Or at least, suspect what is happening: I assume, the "changes in the config file" you're talking about are the parameters to running the script. The main function of the script accepts a config parameter which contains the configuration. If, however, you decide to create your own instance of cea.config.Configuration further down in the script, these parameters will not be picked up. This is by design! Also, don't do that! Pass down the config object from the main function as intended.

daren-thomas commented 6 years ago

Here are problematic instances of creating a cea.config.Configuration instances done by searching all the files in the project:

daren-thomas commented 6 years ago

Checking for uses of gv.config:

gabriel-happle commented 6 years ago

@daren-thomas in this case, I'm just the first tester who found this problem and therefore created the issue. I think @BhargavaKrishnaSreepathi 's help is needed here to fix this.

daren-thomas commented 6 years ago

@gabriel-happle @BhargavaKrishnaSreepathi what is the current status of this issue?

daren-thomas commented 6 years ago

@gabriel-happle @BhargavaKrishnaSreepathi what is the current status of this issue?

BhargavaKrishnaSreepathi commented 6 years ago

I think this is no longer an issue. I think this got fixed in one of PRs in the past two weeks