From 9250e0c3a511ffe9d6e696219a19b90948bc058c Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Wed, 12 Jun 2013 10:39:23 +0200 Subject: [PATCH] Backport feasability when computing fitness in fitness assignment --- ...ExpBinaryIndicatorBasedDualFitnessAssignment.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/moeo/src/fitness/moeoExpBinaryIndicatorBasedDualFitnessAssignment.h b/moeo/src/fitness/moeoExpBinaryIndicatorBasedDualFitnessAssignment.h index 251e590ae..793c6191a 100644 --- a/moeo/src/fitness/moeoExpBinaryIndicatorBasedDualFitnessAssignment.h +++ b/moeo/src/fitness/moeoExpBinaryIndicatorBasedDualFitnessAssignment.h @@ -45,6 +45,8 @@ public: protected: + using moeoExpBinaryIndicatorBasedFitnessAssignment::kappa; + //! Split up the population in two: in one pop the feasible individual, in the other the feasible ones virtual void split( eoPop & pop ) { @@ -94,6 +96,19 @@ protected: } } + virtual Type computeFitness(const unsigned int _idx) + { + Type result( 0.0, values[_idx][_idx].is_feasible() ); + for (unsigned int i=0; i