After PR 2876 was merged, any output variables that might get reported via ReportGenerator are required to have a "simulation_day" key (indicating when the output was recorded) present in their info_map in order to be compatible with padding. Many output variables still do not meet this requirement.
Current Behavior
Because of the missing key, many report filters no longer work, producing errors like:
and
Expected Behavior
The following report filter (output/output_filters/report_all-variables.json) should create an output file with each output variable padded to all simulation days, without producing errors
{
"multiple": [
{
"name": "All_Output",
"filters": [
".*"
],
"expand_data": true,
"fill_value": ""
}
]
}
Possible Solution
Add a reference to RufasTime.simulation_day to every output's info map, at the time it is recorded. Rather than manually editing each and every info map, it may be best to update OutputManager.add_variable and OutputManager.add_variable_bulk (and any other methods that add variables to the output pool) to update the variable info_map with this information automatically.
Context
Discussed in #2910
After PR 2876 was merged, any output variables that might get reported via
ReportGeneratorare required to have a "simulation_day" key (indicating when the output was recorded) present in their info_map in order to be compatible with padding. Many output variables still do not meet this requirement.Current Behavior
Because of the missing key, many report filters no longer work, producing errors like:
and
Expected Behavior
The following report filter (output/output_filters/report_all-variables.json) should create an output file with each output variable padded to all simulation days, without producing errors
{ "multiple": [ { "name": "All_Output", "filters": [ ".*" ], "expand_data": true, "fill_value": "" } ] }Possible Solution
Add a reference to
RufasTime.simulation_dayto every output's info map, at the time it is recorded. Rather than manually editing each and every info map, it may be best to updateOutputManager.add_variableandOutputManager.add_variable_bulk(and any other methods that add variables to the output pool) to update the variableinfo_mapwith this information automatically.Context
Discussed in #2910