Open bodkan opened 2 years ago
Reporting some summary statistics of number of possible mates (e.g., mean, median, range of number of other individuals within the mating choice distance) might help?
Hey @petrelharp, thanks for the suggestion. This is a great idea.
I should definitely add an option to the slim()
function for reporting some realtime statistics (debug = TRUE|FALSE
?). Adding a suggestion to the error message above that the user can switch this option on to get a better idea as to what's going wrong by repeating the run with debug = TRUE
would help a lot I think.
Just reported by @mkiravn
The following code:
gives us this error in SLiM:
In situations like this, the error is caused by the mating distance being too small, so individuals can't find mates.
The error from SLiM (to which we're trying to direct the user's attention by the "see the above") says
ERROR (Population::EvolveSubpopulation): failed to generate child after 1 million attempts; terminating to avoid infinite loop.
. This might not be super helpful to a novice user.Maybe I can look through the log output for the instance of this exact error and report something more concrete, like "There was an issue with the specification if individual interaction. Please take a look at the SLiM output above and check the value of your mating distance."
Or are there other instances where the same error would pop up? What if there is not a single pixel where an individual could be placed? I don't think a case like this can pass through the slendr compilation phase (we're checking that some pixels are habitable).
Just need to be careful not to confuse the poor user even further.