Fix state carry-over in red tag function#15
Open
wangz539 wants to merge 1 commit intoOpenPBEE:atc138_prp_updatesfrom
Open
Fix state carry-over in red tag function#15wangz539 wants to merge 1 commit intoOpenPBEE:atc138_prp_updatesfrom
wangz539 wants to merge 1 commit intoOpenPBEE:atc138_prp_updatesfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces minor fixes to the red-tag function:
fn_red_tag.mthat can lead to incorrect red-tag calculations.red_tag_optionsinmain_PBEErecovery.mto maintain compatibility.Files Modified:
fn_red_tag.mmain_PBEErecovery.m1. Fix: reset series arrays in
fn_red_tag.mIssue:
The arrays used to accumulate damage and component quantities for each structural series (
ser_dmgandser_qty) are populated column-by-column inside a loop over structural series. Therefore, when structural systems contain multiple series, previously allocated columns can carry over and lead to incorrect red-tag calculations.Fix:
Reset and allocate arrays explicitly for each structural system:
2. Fix: initialize
sys_tagfor each directionIssue:
sys_tagwas populated inside the loop over structural systems but not explicitly initialized for each direction. Again, this could cause residual values from previous iterations to carry over when computing.Fix:
sys_tagis now initialized inside the direction loop:3. Compatibility improvement in
main_PBEErecovery.mIssue:
Recent updates introduce
red_tag_options. Existing workflows that do not define this field will encounter the error:Unrecognized field name "red_tag_options"when the code attempts to access it.Fix:
Default values are assigned when
red_tag_optionsor its fields are missing:The original default behavior is preserved.