Added a failed boolean to indicate if fitness evaluation succeeded ( useful if programs are involved, where fitness evaluation can fail for some indis)
Avg Stats are now only evaluated of individuals if this bool is false!
This commit is contained in:
parent
6d8d7c994c
commit
500f66efbf
1 changed files with 9 additions and 2 deletions
|
|
@ -228,7 +228,11 @@ std::ostream& operator<<(std::ostream& os, const eoScalarFitnessAssembled<F, Cmp
|
|||
{
|
||||
for (unsigned i=0; i < f.size(); ++i)
|
||||
os << f[i] << " ";
|
||||
return os;
|
||||
|
||||
os << f.feasible << " ";
|
||||
os << f.failed << " ";
|
||||
|
||||
return os;
|
||||
}
|
||||
|
||||
template <class F, class Cmp, class FitnessTraits>
|
||||
|
|
@ -239,7 +243,10 @@ std::istream& operator>>(std::istream& is, eoScalarFitnessAssembled<F, Cmp, Fitn
|
|||
is >> value;
|
||||
f[i] = value;
|
||||
}
|
||||
|
||||
|
||||
is >> f.feasible;
|
||||
is >> f.failed;
|
||||
|
||||
return is;
|
||||
}
|
||||
|
||||
|
|
|
|||
Reference in a new issue