@ Override public < ActualSolutionType extends SolutionType > WeightedIndexEvaluation evaluate ( Move < ? super ActualSolutionType > move , ActualSolutionType curSolution , Evaluation curEvaluation , DataType data ) { // cast current evaluation object WeightedIndexEvaluation curEval = ( WeightedIndexEvaluation ) curEvaluation ; // initialize new evaluation object WeightedIndexEvaluation newEval = new WeightedIndexEvaluation ( ) ; // compute delta evaluation for each contained objective weights . keySet ( ) . forEach ( obj -> { // extract current evaluation Evaluation objCurEval = curEval . getEvaluation ( obj ) ; // delta evaluation of contained objective Evaluation objNewEval = obj . evaluate ( move , curSolution , objCurEval , data ) ; // flip weight sign if minimizing double w = weights . get ( obj ) ; if ( obj . isMinimizing ( ) ) { w = - w ; } // register in new weighted index evaluation newEval . addEvaluation ( obj , objNewEval , w ) ; } ) ; // return new evaluation return newEval ; }
Delta evaluation . Computes a delta evaluation for each contained objective and wraps the obtained modified evaluations in a new weighted index evaluation .