code: public Collection<Constraint<? super SolutionType, ? super DataType>> getViolatedConstraints(SolutionType solution){
          // return set with all violated constraints
          return Stream.concat(mandatoryConstraints.stream(), penalizingConstraints.stream())
                       .filter(c -> !c.validate(solution, data).passed())
                       .collect(Collectors.toSet());
      }
docs: Returns a collection of all violated constraints (both mandatory and penalizing).
  
  @param solution solution for which all violated constraints are determined
  @return collection of all violated constraints (mandatory and penalizing); possibly empty