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

Diploid simulations taking too long #36

Open
bradduthie opened this issue Aug 10, 2021 · 3 comments
Open

Diploid simulations taking too long #36

bradduthie opened this issue Aug 10, 2021 · 3 comments
Assignees

Comments

@bradduthie
Copy link
Owner

Diploid simulations are taking too long; there is no reason that I can see why they should be taking orders of magnitude longer than haploid simulations. I need to figure out why this is and fix it as best as possible. There's just no reason that I can tell why add_sexual, sire_genes, or assign_sire should be taking so long. The way that the traits are inserted, mutation occurs, or inbreeding coefficients are calculated also just shouldn't take that much time. Maybe calling is_in_range so many times is the problem?

@bradduthie bradduthie self-assigned this Aug 10, 2021
@bradduthie
Copy link
Owner Author

Long hanging fruit is to not call is_in_range in any loop unless other criteria of opp_sex, age, min_age, and max_age are met. This might lower time a bit, though the need to loop through all individuals still remains. I don't think that there's a way to avoid this loop.

@bradduthie
Copy link
Owner Author

In the reproduction type, specifically, there is no need to even call mate_available if the sex, min_age, or max_age are not appropriate.

bradduthie added a commit that referenced this issue Aug 11, 2021
…e unless within the correct age and sex category
bradduthie added a commit that referenced this issue Aug 11, 2021
…ed unless the potential individual is of the mating sex and of the correct age, working towards Issue #36 resolution
@bradduthie
Copy link
Owner Author

I've made some progress on this now with the above commits, but I'm going to leave this issue open just to keep it in mind. Even with the fixes, the diploid simulations are taking much more time, mainly to get the paternal genome integrated into the offspring; if there is a way to do this more quickly, then it would be good to find it!

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

No branches or pull requests

1 participant