private double sumOfConstraintViolations(Solution solution){
  double result=0.0;
  for (int i=0; i < solution.getNumberOfConstraints(); i++) {
    result+=Math.abs(solution.getConstraint(i));
  }
  return result;
}

private double sumOfConstraintViolations ( Solution solution ) { double result = 0.0 ; for ( int i = 0 ; i < solution . getNumberOfConstraints ( ) ; i ++ ) { result += Math . abs ( solution . getConstraint ( i ) ) ; } return result ; }
return the sum of absolute constraint violations for the given solution .
