Skip to content

Refactor and reorganize handling of linked cooling costs in ecm_prep #621

@jtlangevin

Description

@jtlangevin

The section of the code that links cooling costs to associated heating equipment is lengthy, convoluted and potentially error prone, and deserves its own function/separate handling. (Here in ecm_prep.) In those lines we normalize the added (aggregate) cooling equipment costs by the aggregate number of cooling units, to get a per unit added cooling cost number that can be attached to the per unit anchor (heating) tech costs. But much of the data prepared currently are extraneous and the code can be made more concise and readable.

Moreover, a bug was discovered in the ordering of this section of code. Namely, we have zeroed out the aggregate number of cooling units in the lines just above to make the aggregate reporting work out. This zeroing out for reporting purposes needs to come after the per unit calculations described above, otherwise the code will see a divide by zero and zero out the added per unit cooling costs.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions