Skip to content

Conversation

@zsarnoczay
Copy link
Contributor

No description provided.

rWHALE used to blindly try to open every type of result file, collect
the information and then check what to save in the output. Instead, this
commit adds code that checks what outputs are requested and utilizes the
existing argument of aggregate_results to ask for only a subset of
output types if that's what the user needs.
The aggregate_results function was aggregating losses across components
for each asset. This is unnecessary since it is already done by Pelicun
earlier in the workflow. Aggregation can be more complex than simply
summing up losses for each component. So, it is more appropriate to use
the DL_summary_stats file directly and rely on Pelicun to take care of
the appropriate aggregation.

This commit modifies the code to drop the old functionality and utilize
DL_summary_stats.

In another, minor update, it also fixes a bug in naming.
R2Dres_mean_RepairCost is used when results are scaled with replacement
costs. When such scaling is not performed, the
R2Dres_mean_RepairCost_{cost_unit} naming is used. Consequently, when
loss ratios are returned by a method and we have replacement cost
available, rWHALE will return both the loss ratios and the absolute
losses.
@fmckenna fmckenna merged commit 437f7a1 into NHERI-SimCenter:master Aug 13, 2025
0 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants