From 826ab30d7160dd048ffc5b92ed5f186e006c4a81 Mon Sep 17 00:00:00 2001 From: Adam Zsarnoczay <33822153+zsarnoczay@users.noreply.github.com> Date: Tue, 5 May 2026 13:17:40 -0700 Subject: [PATCH] fix(ATC138): ensure Full Recovery >= Functional Recovery in summary The wrapper extracted Full Recovery from the construction repair schedule (building_repair_schedule.full.repair_complete_day.per_story), which excludes functional impedances modeled as parallel temp repairs in atc138 -- most notably flooding_repair_day. As a result, Full Recovery could be reported as shorter than Functional Recovery in summary.json. Envelope the schedule completion with the functional recovery day so Full Recovery >= Functional Recovery always holds. --- modules/performanceAssessment/ATC138/ATC138Wrapper.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/performanceAssessment/ATC138/ATC138Wrapper.py b/modules/performanceAssessment/ATC138/ATC138Wrapper.py index c5174327a..2060c5a6e 100644 --- a/modules/performanceAssessment/ATC138/ATC138Wrapper.py +++ b/modules/performanceAssessment/ATC138/ATC138Wrapper.py @@ -190,9 +190,14 @@ def generate_summary(output_dir: Path) -> None: recovery = data['recovery'] reoc = np.array(recovery['reoccupancy']['building_level']['recovery_day']) func = np.array(recovery['functional']['building_level']['recovery_day']) - full = np.array( + # The building_repair_schedule captures construction completion but + # excludes functional impedances modeled as parallel temp repairs (e.g. + # flooding_repair_day). Full Recovery must be >= Functional Recovery by + # definition, so envelope the schedule with the functional recovery day. + construction_complete = np.array( data['building_repair_schedule']['full']['repair_complete_day']['per_story'] ).max(axis=-1) + full = np.fmax(construction_complete, func) def _stats(a: np.ndarray) -> dict: return {