architecture-building-systems / CityEnergyAnalyst

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

Clipped list when entering buildings to sim in config #3657

Open justinfmccarty opened 1 week ago

justinfmccarty commented 1 week ago

Describe the bug I was listing out specific buildings to run with cea radiation in the config file. The first and the last building were not simulated. They seem to be clipped from the list... "building_list[1:-1], somehow?". I am not deep enough into the management of the config file to figure this one out :(. I also was having some issues with the DAYSIM binary option in the Advanced tab in the new dashboard (which is incredible by the way, nice work).

To Reproduce Steps to reproduce the behavior:

  1. Open your cea.config
  2. Under Radation options enter the names of the buildings you want to sim ['B1020', 'B1021', 'B1022', 'B1023']
  3. In console run cea radiation
  4. See error in the parameters printout

Expected behaviour Building list would be ['B1020', 'B1021', 'B1022', 'B1023'], not ['B1021', 'B1022']

Screenshots

Screenshot 2024-09-21 at 16 24 38 Screenshot 2024-09-21 at 16 25 17

Hardware (please complete the following information):

reyery commented 6 days ago

@justinfmccarty, you do not need to include the square brackets when listing the buildings e.g. B1020, B1021, B1022, B1023. Currently it is parsing it as "[B1020" , "B1021" , "B1022", "B1023]", and after filtering the invalid choices i.e. the first and last items with the brackets, only the ones in the middle are taken as valid choices.

I think we could add a warning message to alert the users of invalid choices, that would make it clearer.

justinfmccarty commented 6 days ago

Thanks @reyery, I'll just go feel foolish for a few hours 😅