richelbilderbeek / pbdmms

Some models
GNU General Public License v3.0
2 stars 0 forks source link

sado: Get indivs in correct species #249

Closed Lumphie closed 7 years ago

Lumphie commented 7 years ago

I was thinking about using connected components and filtered graphs

Lumphie commented 7 years ago

Marked as FIX_ISSUE_249

richelbilderbeek commented 7 years ago

assert fails here:

void sado::add_edges_impl_2(
  const attractivenesses& as,
  genotype_graph& g,
  const double min_attractiveness
)
{
  assert(is_valid(as));

It is right: attractivenesses is a matrix that should have a diagonal of zeroes, as individuals have a zero probability to mate with themselves.

Lumphie commented 7 years ago

This seems to work. Only one thing I overlooked. The model is able to give output every X generations. So there won't be any parents in generation 0 for individuals in generation X if X does not equal 1. Easily fixed by just giving output every generation, but no so easily fixed if we want to keep the flexible output.