Skip to content

Allow Resurrection from Failed Filter Simulations #1371

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 24, 2018
Merged

Conversation

mjohnson541
Copy link
Contributor

This adds a try except that allows model runs to continue after failed filter simulations. I believe this caused #1367 and #1258. It worked as expected on the example in #1367. However, its worth noting that nothing is reacted until a regular or a filter simulation succeeds and changes the react flags. In the example in #1367 the run doesn't recover which results in the resurrection process consuming species from the edge until the edge is empty and then crashing.

@codecov
Copy link

codecov bot commented May 19, 2018

Codecov Report

Merging #1371 into master will decrease coverage by <.01%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1371      +/-   ##
==========================================
- Coverage   42.18%   42.18%   -0.01%     
==========================================
  Files         172      172              
  Lines       28001    28005       +4     
  Branches     5503     5503              
==========================================
  Hits        11813    11813              
- Misses      15393    15397       +4     
  Partials      795      795
Impacted Files Coverage Δ
rmgpy/rmg/main.py 22.81% <0%> (-0.09%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 02926fc...1c6066e. Read the comment docs.

@@ -735,9 +736,14 @@ def execute(self, **kwargs):
simulatorSettings = simulatorSettings,
conditions = self.rmg_memories[index].get_cond()
)
self.updateReactionThresholdAndReactFlags(
self.updateReactionThresholdAndReactFlags(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think here we're capturing exceptions from simulate(). Perhaps updateReactionThresholdAndReactFlags should be relocated to an else clause after the try-except?

This allows model runs to continue after failed filter simulations.  However, its worth noting that since the filter simulation failed nothing is reacted until a filter simulation succeeds.
@mjohnson541 mjohnson541 force-pushed the filterResurrection branch from eb54f3f to 1c6066e Compare May 24, 2018 18:38
@mjohnson541
Copy link
Contributor Author

Ok, I've made that change is this ready to merge?

Copy link
Member

@alongd alongd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@alongd alongd merged commit 6d94f5e into master May 24, 2018
@alongd alongd deleted the filterResurrection branch May 24, 2018 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Complexity: Low Status: Ready for Review PR is complete and ready to be reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants