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 support for discrete demography #237

Merged
merged 1 commit into from
Dec 20, 2019
Merged

Add support for discrete demography #237

merged 1 commit into from
Dec 20, 2019

Conversation

molpopgen
Copy link
Owner

@molpopgen molpopgen commented Apr 29, 2019

There are a lot of good ideas here, but they are hidden within a lot of OO complexity that is trying too hard to have 1-to-1 correspondence between C++ and Python.

To make progress:

  • Get rid of PopulationConfigurationChange. Replace with a single, simple struct, MassMigration plus helper functions.
  • Likewise with PopulationState and PopulationStateChange
  • Likewise with the growth rate classes.
  • Get rid of PopulationConfiguration class and write a function that works via the parental metadata. It should be a template that'll work with any duck-type of the current diploid metadata structure.

Also need to:

  • Decide how to set up initial individual metadata? This will be done directly via the numpy interface to metadata.
  • Decide how initial metadata can or cannot be used to define the max number of subpopulations.
  • Decide how to parameterize migration in the new class structure.
  • Implement migration in the C++ test simulation
  • Add tests for migration
  • Allow for migration rates to be non-negative floats
  • Allow for migration rates to be "unscaled" with w/respect to N_i^t > 0.
  • Update simulation code in tests to account for selfing
  • Change variable in SetSelfingRate from F to S.
  • Add GPL headers to all source files that survive.
  • DiscreteDemography Python class should support input from a numpy array in order to provide backwards compatibility with the current API.
  • Handle changes in selfing per deme over time.
  • Move back-end code from test suite to fwdpy11 headers after testing.
  • Fix an interface issue with MassMigration events. If there are > 1 from the same deme to different demes, then the fractions moved affected are interpreted with respect to who is left over after the preceding event. In other words, if you want to move 50% from 0 to 1 and 50% from 0 to 2, the current result is 50% to 1 and 25% to 2.
  • MassMigration events need to affect growth rates/onset times/onset sizes, etc., in a manner consistent to SetDemeSizes.
  • Add a constant that means "no growth"
  • Remove coupling of DiscreteDemography and the ranges class by moving range types into the former. Provide a function to make sure ranges make sense vis a vis pop.generation.
  • Add a placeholder documentation page that at least notes important things to fill in later.

@molpopgen molpopgen added this to the 0.5.0 milestone Apr 29, 2019
@molpopgen molpopgen force-pushed the discrete_demography branch 2 times, most recently from 70b9bb3 to fa19f4d Compare May 6, 2019 21:45
@molpopgen molpopgen force-pushed the discrete_demography branch 2 times, most recently from 3f952ca to f0b8479 Compare May 31, 2019 21:18
@molpopgen molpopgen force-pushed the discrete_demography branch 2 times, most recently from b926f4f to 4671afa Compare July 13, 2019 00:45
@molpopgen molpopgen removed this from the 0.5.0 milestone Jul 21, 2019
@molpopgen molpopgen force-pushed the discrete_demography branch 4 times, most recently from 12a22e7 to f1409f4 Compare September 27, 2019 17:12
@molpopgen molpopgen force-pushed the discrete_demography branch 2 times, most recently from 2beaa2f to d489596 Compare December 9, 2019 19:32
@molpopgen molpopgen added this to the 0.5.3 milestone Dec 13, 2019
@molpopgen molpopgen force-pushed the discrete_demography branch 3 times, most recently from 382ac65 to d15d8c7 Compare December 18, 2019 23:10
@molpopgen molpopgen merged commit aa00ecd into dev Dec 20, 2019
@molpopgen molpopgen deleted the discrete_demography branch December 20, 2019 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant