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

Add tests of evolving demes models in multiple stages #774

Merged

Conversation

molpopgen
Copy link
Owner

No description provided.

@molpopgen
Copy link
Owner Author

molpopgen commented Jun 15, 2021

This PR is revealing a rare/subtle/corner case bug: if we leave a model at a time when a deme will go extinct, the next deme sizes are off if we re-enter the simulation.

By changing the second == in this line to !=, we can make the failing test pass. However, then tests of two-step simulations involving non-demes models fail. It also changes which of the new tests fail.

population splits.

* When a migration lookup table is NULL, the exception
now reports the offspring deme index.

* Keep track of whether demographic_model_state pointer was null
  at start of simulation.  If not, then we do NOT call the "model
  updating" code path prior to entering the main loop.

  Fixes #775
  Causes #777
@molpopgen molpopgen force-pushed the add_tests_of_evolving_demes_models_in_multiple_stages branch from 70f76b2 to 6221ba2 Compare June 16, 2021 18:45
@molpopgen molpopgen added this to the 0.16.0 milestone Jun 16, 2021
@molpopgen molpopgen merged commit 2ca07e2 into dev Jun 16, 2021
@molpopgen molpopgen deleted the add_tests_of_evolving_demes_models_in_multiple_stages branch June 16, 2021 19:08
molpopgen added a commit that referenced this pull request Jul 5, 2021
…ation splits. (#774)

* When a migration lookup table is NULL, the exception
now reports the offspring deme index.

* Keep track of whether demographic_model_state pointer was null
  at start of simulation.  If not, then we do NOT call the "model
  updating" code path prior to entering the main loop.

  Fixes #775
  Causes #777
molpopgen added a commit that referenced this pull request Jul 19, 2021
The new class is completely independent of DiscreteDemography.

Closes #782
Closes #783

This PR also affects the implementation of changes made in
PRs #773 and #774
molpopgen added a commit that referenced this pull request Jul 19, 2021
#791)

The new class is completely independent of DiscreteDemography.

Closes #782
Closes #783

This PR also affects the implementation of changes made in
PRs #773 and #774
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.

Stopping/restarting demographic models at boundaries of deme extinction leads to model errors.
1 participant