From 10ac67f77ccda1cee8e63fcf08b7fcc549389be2 Mon Sep 17 00:00:00 2001 From: "Jeremy L." <5149279+lymereJ@users.noreply.github.com> Date: Thu, 17 Oct 2024 13:14:31 -0700 Subject: [PATCH] Fix LCT-based chiller model aggregation ranges. (#119) --- copper/chiller.py | 38 +++++++++++++++++++++++++++----------- 1 file changed, 27 insertions(+), 11 deletions(-) diff --git a/copper/chiller.py b/copper/chiller.py index 79d2149..43dcde6 100644 --- a/copper/chiller.py +++ b/copper/chiller.py @@ -528,17 +528,33 @@ def get_ranges(self): """ norm_val = {"ect_lwt": self.ref_ect, "lct_lwt": self.ref_lct}[self.model] - ranges = { - "eir-f-t": { - "vars_range": [(4, 10), (10.0, 40.0)], - "normalization": (self.ref_lwt, norm_val), - }, - "cap-f-t": { - "vars_range": [(4, 10), (10.0, 40.0)], - "normalization": (self.ref_lwt, norm_val), - }, - "eir-f-plr": {"vars_range": [(0.0, 1.0)], "normalization": (1.0)}, - } + if self.model == "ect_lwt": + ranges = { + "eir-f-t": { + "vars_range": [(4, 10), (10.0, 40.0)], + "normalization": (self.ref_lwt, norm_val), + }, + "cap-f-t": { + "vars_range": [(4, 10), (10.0, 40.0)], + "normalization": (self.ref_lwt, norm_val), + }, + "eir-f-plr": {"vars_range": [(0.0, 1.0)], "normalization": (1.0)}, + } + elif self.model == "lct_lwt": + ranges = { + "eir-f-t": { + "vars_range": [(4, 10), (10.0, 45.0)], + "normalization": (self.ref_lwt, norm_val), + }, + "cap-f-t": { + "vars_range": [(4, 10), (10.0, 45.0)], + "normalization": (self.ref_lwt, norm_val), + }, + "eir-f-plr": { + "vars_range": [(10, 45.0), (0, 1)], + "normalization": (norm_val, 1.0), + }, + } return ranges