architecture-building-systems / CityEnergyAnalyst

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

Plots: Cannot run solar potential plots unless all technologies are simulated #1354

Closed amraladdin closed 6 years ago

amraladdin commented 6 years ago

I ran the solar energy potential for technologies PV1 and SC1 only. When I tried to run the plots for the solar energy potentials, I got the below error. My interpretation, and @martin-mosteiro as well, is that the tool is trying to find the CSV file with the Evacuated Tube solar collector (SC2) results.

@JIMENOFONSECA @shanshanhsieh sorry for assigning you directly, but this is kind of an emergency.

Executing: PlotsTool C:\reference-case\reference-case-WTP\RES_low_density # # solar_technology_potentials 1;2;3 ind1 DH #
Start Time: Fri May 18 14:12:09 2018
Running script PlotsTool...
Executing: C:\ProgramData\Miniconda2\envs\cea\python.exe -u -m cea.interfaces.cli.cli plots --buildings  --network-names  --scenario C:\reference-case\reference-case-WTP\RES_low_density --network-type DH --scenarios  --individual ind1 --generations 1, 2, 3 --categories solar_technology_potentials
Running plots for the next categories = ['solar_technology_potentials']
Traceback (most recent call last):
  File "C:\ProgramData\Miniconda2\envs\cea\lib\runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "C:\ProgramData\Miniconda2\envs\cea\lib\runpy.py", line 72, in _run_code
    exec code in run_globals
  File "c:\users\aelesawy\documents\github\cityenergyanalyst\cea\interfaces\cli\cli.py", line 79, in <module>
    main(cea.config.Configuration())
  File "c:\users\aelesawy\documents\github\cityenergyanalyst\cea\interfaces\cli\cli.py", line 33, in main
    script_module.main(config)
  File "c:\users\aelesawy\documents\github\cityenergyanalyst\cea\plots\plots_main.py", line 76, in main
    plots_main(config)
  File "c:\users\aelesawy\documents\github\cityenergyanalyst\cea\plots\plots_main.py", line 38, in plots_main
    plots_solar_technology(locator, config)
  File "c:\users\aelesawy\documents\github\cityenergyanalyst\cea\plots\solar_technology_potentials\main.py", line 39, in plot_main
    plots = Plots(locator, buildings, weather)
  File "c:\users\aelesawy\documents\github\cityenergyanalyst\cea\plots\solar_technology_potentials\main.py", line 78, in __init__
    self.sc_analysis_fields, self.buildings)
  File "c:\users\aelesawy\documents\github\cityenergyanalyst\cea\plots\solar_technology_potentials\main.py", line 110, in preprocessing_data
    usecols=SC_analysis_fields)
  File "C:\ProgramData\Miniconda2\envs\cea\lib\site-packages\pandas\io\parsers.py", line 655, in parser_f
    return _read(filepath_or_buffer, kwds)
  File "C:\ProgramData\Miniconda2\envs\cea\lib\site-packages\pandas\io\parsers.py", line 405, in _read
    parser = TextFileReader(filepath_or_buffer, **kwds)
  File "C:\ProgramData\Miniconda2\envs\cea\lib\site-packages\pandas\io\parsers.py", line 764, in __init__
    self._make_engine(self.engine)
  File "C:\ProgramData\Miniconda2\envs\cea\lib\site-packages\pandas\io\parsers.py", line 985, in _make_engine
    self._engine = CParserWrapper(self.f, **self.options)
  File "C:\ProgramData\Miniconda2\envs\cea\lib\site-packages\pandas\io\parsers.py", line 1605, in __init__
    self._reader = parsers.TextReader(src, **kwds)
  File "pandas/_libs/parsers.pyx", line 394, in pandas._libs.parsers.TextReader.__cinit__ (pandas\_libs\parsers.c:4209)
  File "pandas/_libs/parsers.pyx", line 710, in pandas._libs.parsers.TextReader._setup_parser_source (pandas\_libs\parsers.c:8873)
IOError: File C:\reference-case\reference-case-WTP\RES_low_density\outputs\data\potentials\solar\B001_SC_ET.csv does not exist

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

Failed to execute (PlotsTool).
Failed at Fri May 18 14:12:13 2018 (Elapsed Time: 4.09 seconds)
shanshanhsieh commented 6 years ago

Hi @amraladdin , at the moment, you will have to run all the solar technology potentials to execute the solar technology plots. This means you have to run:

  1. PV
  2. SC1, t-sc-supply =75
  3. SC2, t-sc-supply=150
  4. PVT

I am planning to disaggregate them, so you can run the plot with the technologies you have simulated, however, it will not happen for the test run. sorry about that.

martin-mosteiro commented 6 years ago

In that case, @amraladdin we will need to supply students in the test run with the results of the solar technologies potential since we won't have time to run all of the potentials during the test run and @shanshanhsieh has confirmed her exercise does involve running the solar technologies potential plots. So I'll create a separate issue asking everyone to upload their results.

jimenofonseca commented 6 years ago

@shanshanhsieh is there a way we can find the most efficient way to run the tools? maybe by changing to only roof-tops and low temperatures? Is it possible that we run optimisation without having to run all technologies? @BhargavaKrishnaSreepathi can we do this? it would make possible to actually use the tool during the executive course.

BhargavaKrishnaSreepathi commented 6 years ago

It is possible, but I will not suggest to do it, as it requires changes in multiple places in CEA, which needs to be followed up by testing process. Keeping the time in consideration, I would refrain from this. One way is to pre run the technologies for each case study and have them. As per my understanding, we just show them the simulation of one technology, namely PV and provide the results for the other technologies (as PVT, SC1 and SC2 take significant time to run).

jimenofonseca commented 6 years ago

What about if you get SC2 and its files as zero when they are not present? that will be a quick fix right?


From: Bhargava Krishna Sreepathi [notifications@github.com] Sent: Wednesday, May 30, 2018 11:54 PM To: architecture-building-systems/CityEnergyAnalyst Cc: Jimeno Fonseca; Assign Subject: Re: [architecture-building-systems/CityEnergyAnalyst] Plots: Cannot run solar potential plots unless all technologies are simulated (#1354)

It is possible, but I will not suggest to do it, as it requires changes in multiple places in CEA, which needs to be followed up by testing process. Keeping the time in consideration, I would refrain from this. One way is to pre run the technologies for each case study and have them. As per my understanding, we just show them the simulation of one technology, namely PV and provide the results for the other technologies (as PVT, SC1 and SC2 take significant time to run).

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHubhttps://github.com/architecture-building-systems/CityEnergyAnalyst/issues/1354#issuecomment-393215264, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AIjrgvXRDWKBJ2tGkGupsAj4OX9pOmDoks5t3sCXgaJpZM4UEuDe.

shanshanhsieh commented 6 years ago

I started working on it in i1244 (will be ready to merge today)

  1. for the plotting function, it will only plot the files that are simulated
  2. for SC2, we can run for roof tops, but the rest of the technologies can still consider walls and roofs
  3. in the case of cooling, PVT is not required, i thought you made a quick fix to bypass it last time in the individual evaluation branch, @BhargavaKrishnaSreepathi ?
BhargavaKrishnaSreepathi commented 6 years ago

yes @shanshanhsieh, as PVT is not being used, we can make sure that it is not necessary to run it, just need to add a conditional statement in cea\optimization\optimization_main