Skip to content
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

Fix infinite loop during parameter estimation #40

Merged
merged 2 commits into from
Oct 16, 2024

Conversation

k-arakane
Copy link
Contributor

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.

@k-arakane k-arakane changed the title Refactor code for checking simulation exit status Fix infinite loop during parameter estimation Oct 16, 2024
@himoto
Copy link
Contributor

himoto commented Oct 16, 2024

Well spotted! Thanks @k-arakane!

@himoto himoto merged commit 52d7e2e into pasmopy:master Oct 16, 2024
1 check 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