From 3d0db369bc468c72fe13901c88bb881e93199211 Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Fri, 21 Jun 2013 11:09:15 +0200 Subject: [PATCH] Use the feasibility of the current individual for the feasability of the metric in dual fitness assignment --- ...BinaryIndicatorBasedDualFitnessAssignment.h | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/moeo/src/fitness/moeoExpBinaryIndicatorBasedDualFitnessAssignment.h b/moeo/src/fitness/moeoExpBinaryIndicatorBasedDualFitnessAssignment.h index af57e372f..d3b01eaed 100644 --- a/moeo/src/fitness/moeoExpBinaryIndicatorBasedDualFitnessAssignment.h +++ b/moeo/src/fitness/moeoExpBinaryIndicatorBasedDualFitnessAssignment.h @@ -130,7 +130,10 @@ protected: metric( pop[i].objectiveVector(), pop[j].objectiveVector() ), pop[i].objectiveVector().is_feasible() ); - } // if i != j + } else { // if i != j + assert( i == j ); + values[i][j] = Type( 0.0, pop[i].objectiveVector().is_feasible() ); + } } // for j in pop } // for i in pop } @@ -145,15 +148,14 @@ protected: virtual Type computeFitness(const unsigned int _idx) { - Type result( 0.0, values[_idx][_idx].is_feasible() ); - for (unsigned int i=0; i