Open AGeissler opened 2 years ago
I am concerned about the performance concerns outweighing the potential gains here. This will require checking whether it's a regex for all variables, while providing the benefit of saving 10 lines in the IDF (assuming you have the maximum of 10 layers, so 11 nodes). I don't think there are many other variables like this. This is just my personal opinion though, others might disagree.
@jmarrec: thanks for labelling my issue. I do not know enough about the code structure to assess performance implications. However, my current case that gave me the idea has > 45 nodes in the construction of interest. And if the number of time-steps needs to be increased in the future e.g. due to the afn, this number will further increase (I have not, however, "played around" with the Space Discretization Constant). And of course this detailed "look into a construction" may not be of interest to many users. But, I would expect such a "book-keeping" functionality to be called at startup, so only once (when the run-time results dictionary is set up) and likely not really turn out to be a performance issue.
I'm saying this having investigated a similar performance bottleneck recently: https://github.com/NREL/EnergyPlus/pull/9556, which made me aware of the cost of instantiating regexes.
I'll defer to others on whether this is something we want to do or not.
In the meantime, I'd use python to generate that list of variables, eg this one-liner command line call python -c "for i in range(1, 46): print('Output:Variable,Surface 328,CondFD Surface Temperature Node {i},Timestep;'.format(i=i))"
or the same in a REPL:
In [1]: for i in range(1, 46):
...: print('Output:Variable,Surface 328,CondFD Surface Temperature Node {i},Timestep;'.format(i=i))
Issue overview
Input-for-output in .idf allows for using regex expressions in the "specifier" field (e.g. zone name, construction name etc.), however it does not allow for regex in the actual variable name. Especially for the output of construction node values this is a nuisance. The number of nodes changes with time step (and/or other parameters) and adding "sufficient" node entries for all possible cases clutters the .idf. There are likely other output variables where such a functional extension could make sense.
Details
Some additional details for this issue (if relevant):
Checklist
Add to this list or remove from it as applicable. This is a simple templated set of guidelines.