Skip to content

Fix simulate() returning 0 for unfailed components#158

Open
Chessing234 wants to merge 1 commit intomitmath:Fall24from
Chessing234:fix-simulate-component-failure
Open

Fix simulate() returning 0 for unfailed components#158
Chessing234 wants to merge 1 commit intomitmath:Fall24from
Chessing234:fix-simulate-component-failure

Conversation

@Chessing234
Copy link
Copy Markdown

Summary

  • Fix the simulate function in simulating_component_failure.jl to initialize the grid with max_steps instead of 0
  • Components that don't fail within the simulation now correctly show max_steps instead of 0, which previously made them appear as if they failed at time 0

Fixes #154.

Test plan

  • Verified the fix matches the approach described in the issue
  • Downstream visualization code (simulation .< tt) works correctly with the new values

Components that never fail within max_steps were left with v[i,j]=0,
incorrectly suggesting they failed at time 0. Initialize with
max_steps instead, so unfailed components are distinguishable from
those that failed early.
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.

An error in the function simulate in simulating_component_failure.jl

1 participant