Fix infinite loop during parameter estimation #40
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.
Hello @himoto! I hope this finds you well.
While reproducing the results in this repository, we found that the code gets stuck in an infinite loop during the parameter estimation step.
More specifically, it was failing to generate the initial values for the parameters, causing the code to retry indefinitely.
After some investigation, I think I have pinned down the cause of this problem to the line that checked the exit status of the simulation:
is_successful = ifelse(sol.retcode === :Success, true, false)
Changing the comparison operator to a looser
==
fixed the problem.It's a very subtle change, but I thought I'd push this in case anyone else wants to reproduce the results.