architecture-building-systems / CityEnergyAnalyst

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

Error using building solar radiation #3145

Closed Mar-Ges closed 1 year ago

Mar-Ges commented 2 years ago

What I try to do I'm working on a case study with 291 buildings in Germany. The geometry in OSM is bad - so i created my own geometry file and added a typology.dbf with building ages, occupancy information and building standard. I started creating a baselinescenario using data management tools.

Where is the problem? Using building solar radiation creats the following error


Running `cea radiation` with the following parameters:
- general:scenario = C:\Users\Geske\Desktop\aktuell\ICAE\20220421 -Kopie
  (default: {general:project}\{general:scenario-name})
- general:multiprocessing = True
  (default: True)
- general:number-of-cpus-to-keep-free = 1
  (default: 1)
- general:debug = False
  (default: False)
- radiation:buildings = ['DETHL56P0000TsfQ', (...) ,'DETHL56P00018Yb3']
  (default: [])
- radiation:use-latest-daysim-binaries = False
  (default: True)
- radiation:albedo = 0.2
  (default: 0.2)
- radiation:roof-grid = 10
  (default: 10)
- radiation:walls-grid = 200
  (default: 200)
- radiation:zone-geometry = 2
  (default: 2)
- radiation:surrounding-geometry = 5
  (default: 5)
- radiation:consider-floors = True
  (default: True)
- radiation:consider-intersections = True
  (default: False)
- radiation:rad-ab = 4
  (default: 4)
- radiation:rad-ad = 512
  (default: 512)
- radiation:rad-as = 32
  (default: 32)
- radiation:rad-ar = 20
  (default: 20)
- radiation:rad-aa = 0.15
  (default: 0.15)
- radiation:rad-lr = 8
  (default: 8)
- radiation:rad-st = 0.5
  (default: 0.5)
- radiation:rad-sj = 0.7
  (default: 0.7)
- radiation:rad-lw = 0.05
  (default: 0.05)
- radiation:rad-dj = 0.7
  (default: 0.7)
- radiation:rad-ds = 0.0
  (default: 0.0)
- radiation:rad-dr = 0
  (default: 0)
- radiation:rad-dp = 32
  (default: 32)
- radiation:daysim-bin-directory = C:\Users\Geske\Desktop\CityEnergyAnalyst\Dependencies\Daysim
  (default: C:\Users\Geske\Desktop\CityEnergyAnalyst)
- radiation:n-buildings-in-chunk = 100
  (default: 100)
- radiation:write-sensor-data = True
  (default: True)
<frozen importlib._bootstrap>:219: RuntimeWarning: scipy._lib.messagestream.MessageStream size changed, may indicate binary incompatibility. Expected 56 from C header, got 64 from PyObject
Using Daysim binaries from path: c:\users\geske\desktop\cityenergyanalyst\dependencies\daysim\bin
Using Daysim data from path: c:\users\geske\desktop\cityenergyanalyst\dependencies\daysim\lib
verifying geometry files
zone: C:\Users\Geske\Desktop\aktuell\ICAE\20220421 - Kopie\inputs\building-geometry\zone.shp
surroundings: C:\Users\Geske\Desktop\aktuell\ICAE\20220421 - Kopie\inputs\building-geometry\surroundings.shp
Getting geometry materials
Creating 3D geometry and surfaces
Saving geometry pickle files in: C:\Users\Geske\AppData\Local\Temp\tmpdo7fra9s\20220421 - Kopie_radiation_geometry_pickle
Standardizing coordinate systems
Reading terrain geometry
Creating 3D building surfaces
Calculating terrain intersection of building geometries
Using 5 CPU's
<frozen importlib._bootstrap>:219: RuntimeWarning: scipy._lib.messagestream.MessageStream size changed, may indicate binary incompatibility. Expected 56 from C header, got 64 from PyObject
Calculation of terrain intersection for building 1 completed out of 291<frozen importlib._bootstrap>:219: RuntimeWarning: scipy._lib.messagestream.MessageStream size changed, may indicate binary incompatibility. Expected 56 from C header, got 64 from PyObject
<frozen importlib._bootstrap>:219: RuntimeWarning: scipy._lib.messagestream.MessageStream size changed, may indicate binary incompatibility. Expected 56 from C header, got 64 from PyObject
<frozen importlib._bootstrap>:219: RuntimeWarning: scipy._lib.messagestream.MessageStream size changed, may indicate binary incompatibility. Expected 56 from C header, got 64 from PyObject
<frozen importlib._bootstrap>:219: RuntimeWarning: scipy._lib.messagestream.MessageStream size changed, may indicate binary incompatibility. Expected 56 from C header, got 64 from PyObject

Calculation of terrain intersection for building 2 completed out of 291
(...)
Calculation of terrain intersection for building 291 completed out of 291
Using 5 CPU's
<frozen importlib._bootstrap>:219: RuntimeWarning: scipy._lib.messagestream.MessageStream size changed, may indicate binary incompatibility. Expected 56 from C header, got 64 from PyObject
Calculation of terrain intersection for building 1 completed out of 75<frozen importlib._bootstrap>:219: RuntimeWarning: scipy._lib.messagestream.MessageStream size changed, may indicate binary incompatibility. Expected 56 from C header, got 64 from PyObject
<frozen importlib._bootstrap>:219: RuntimeWarning: scipy._lib.messagestream.MessageStream size changed, may indicate binary incompatibility. Expected 56 from C header, got 64 from PyObject
<frozen importlib._bootstrap>:219: RuntimeWarning: scipy._lib.messagestream.MessageStream size changed, may indicate binary incompatibility. Expected 56 from C header, got 64 from PyObject
<frozen importlib._bootstrap>:219: RuntimeWarning: scipy._lib.messagestream.MessageStream size changed, may indicate binary incompatibility. Expected 56 from C header, got 64 from PyObject

Calculation of terrain intersection for building 2 completed out of 75
(...)
Calculation of terrain intersection for building 75 completed out of 75
Generating geometry for surrounding buildings
Generating geometry for buildings in the zone of analysis
Using 5 CPU's
Generating geometry for building 1 completed out of 291
(...)
Generating geometry for building 290 completed out of 291
Traceback (most recent call last):
  File "C:\Users\Geske\Desktop\CityEnergyAnalyst\Dependencies\Python\lib\site-packages\pandas\core\indexes\base.py", line 3621, in get_loc
    return self._engine.get_loc(casted_key)
  File "pandas\_libs\index.pyx", line 136, in pandas._libs.index.IndexEngine.get_loc
  File "pandas\_libs\index.pyx", line 163, in pandas._libs.index.IndexEngine.get_loc
  File "pandas\_libs\hashtable_class_helper.pxi", line 5198, in pandas._libs.hashtable.PyObjectHashTable.get_item
  File "pandas\_libs\hashtable_class_helper.pxi", line 5206, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'DETHL56P0000tCBD'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "c:\users\geske\desktop\cityenergyanalyst\cityenergyanalyst\cea\worker.py", line 146, in worker
    run_job(config, job, server)
  File "c:\users\geske\desktop\cityenergyanalyst\cityenergyanalyst\cea\worker.py", line 108, in run_job
    script(config=config, **parameters)
  File "c:\users\geske\desktop\cityenergyanalyst\cityenergyanalyst\cea\api.py", line 59, in __call__
    self._runner.__call__(*args, **kwargs)
  File "c:\users\geske\desktop\cityenergyanalyst\cityenergyanalyst\cea\api.py", line 37, in script_runner
    script_module.main(config)
  File "c:\users\geske\desktop\cityenergyanalyst\cityenergyanalyst\cea\resources\radiation_daysim\radiation_main.py", line 264, in main
    cea_daysim.create_radiance_geometry(geometry_terrain, building_surface_properties, zone_building_names,
  File "c:\users\geske\desktop\cityenergyanalyst\cityenergyanalyst\cea\resources\radiation_daysim\radiance.py", line 73, in create_radiance_geometry
    create_rad_geometry(self.rad_geometry_path, geometry_terrain, building_surface_properties, zone_building_names,
  File "c:\users\geske\desktop\cityenergyanalyst\cityenergyanalyst\cea\resources\radiation_daysim\radiance.py", line 510, in create_rad_geometry
    for building_surface in zone_building_to_radiance(building_geometry, building_surface_properties):
  File "c:\users\geske\desktop\cityenergyanalyst\cityenergyanalyst\cea\resources\radiation_daysim\radiance.py", line 467, in zone_building_to_radiance
    material_name = "win_{material}".format(material=building_surface_properties['type_win'][building_name])
  File "C:\Users\Geske\Desktop\CityEnergyAnalyst\Dependencies\Python\lib\site-packages\pandas\core\series.py", line 958, in __getitem__
    return self._get_value(key)
  File "C:\Users\Geske\Desktop\CityEnergyAnalyst\Dependencies\Python\lib\site-packages\pandas\core\series.py", line 1069, in _get_value
    loc = self.index.get_loc(label)
  File "C:\Users\Geske\Desktop\CityEnergyAnalyst\Dependencies\Python\lib\site-packages\pandas\core\indexes\base.py", line 3623, in get_loc
    raise KeyError(key) from err
KeyError: 'DETHL56P0000tCBD'

Generating geometry for building 291 completed out of 291
Creating radiance material file
Creating radiance geometry file```
Mar-Ges commented 2 years ago

I solved the problem from above. Now I got a new problem in the step of calculating the building energy demand:

pandas.errors.ParserError: Error tokenizing data. C error: Expected 17 fields in line 5568, saw 24

How can I solve it?

Mar-Ges commented 2 years ago

Hi @shanshanhsieh , can you help me with my Error ? I tried a lot during the last days, but still the same Error.

reyery commented 2 years ago

Hi @Mar-Ges,

Would you be able to provide more information regarding the error e.g. stack trace? Unfortunately, that error does not provide us with enough information to debug this error.