private HashMap<Integer, Set<Integer>> createInstallationDepartureChromosome() { HashMap<Integer, Set<Integer>> individualInstallationDeparturePatterns = new HashMap<Integer, Set<Integer>>(); for (Installation installation : problemData .getCustomerInstallations()) { // for each installation, choose a random installation // pattern based on the frequency Set<Set<Integer>> possibleInstallationDeparturePatterns = problemData.getInstallationDeparturePatterns().get(installation.getFrequency()); Set<Integer> randomInstallationDeparturePattern = Utilities.pickRandomElementFromSet(possibleInstallationDeparturePatterns); individualInstallationDeparturePatterns.put( installation.getNumber(), randomInstallationDeparturePattern); } return individualInstallationDeparturePatterns; }