Skip to content

do simplify() in steps #24

@petrelharp

Description

@petrelharp

Currently we record all of history and then simplify() it all at once. This ends up taking rather a lot of memory. As discussed with @jeromekelleher, we ought to be able to do this stepwise. To do this, we'll need to make sure there's room enough to sample the entire population, and then:

  1. add_samples(ids) where ids is the current generation, and remember that ids -> range(len(ids))
  2. simplify()
  3. restart the argrecorder and remember that range(len(ids)) -> initial_gen
  4. run for a while longer
  5. append results to tree sequence and return to 1

To append more things to a tree sequence we need to:

  1. shift time in the NodeTable
  2. move the samples to the end as new IDs
  3. append new nodes and edgesets while remapping the IDs by adding a constant to all IDs and remapping initial_gen to whatever they should be

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions