@Test public void getLocalSearchAlgorithms() { Map<LocalSearchHeuristic, List<LocalSearchHeuristicOption>> expectedLocalSearchAlgorithms = new HashMap<>(); expectedLocalSearchAlgorithms.put( LocalSearchHeuristic.HILL_CLIMBING, Collections.<LocalSearchHeuristicOption>emptyList()); expectedLocalSearchAlgorithms.put( LocalSearchHeuristic.LATE_ACCEPTANCE, Arrays.asList(LocalSearchHeuristicOption.SIZE)); expectedLocalSearchAlgorithms.put( LocalSearchHeuristic.LATE_SIMULATED_ANNEALING, Arrays.asList(LocalSearchHeuristicOption.SIZE, LocalSearchHeuristicOption.ACCEPTED_COUNT_LIMIT)); expectedLocalSearchAlgorithms.put( LocalSearchHeuristic.SIMULATED_ANNEALING, Arrays.asList(LocalSearchHeuristicOption.INITIAL_HARD_TEMPERATURE, LocalSearchHeuristicOption.INITIAL_SOFT_TEMPERATURE)); expectedLocalSearchAlgorithms.put( LocalSearchHeuristic.STEP_COUNTING_HILL_CLIMBING, Arrays.asList(LocalSearchHeuristicOption.SIZE)); expectedLocalSearchAlgorithms.put( LocalSearchHeuristic.TABU_SEARCH, Arrays.asList(LocalSearchHeuristicOption.SIZE, LocalSearchHeuristicOption.ACCEPTED_COUNT_LIMIT)); assertTrue(clopla.getLocalSearchAlgorithms().equals(expectedLocalSearchAlgorithms)); }
@Override public Map<LocalSearchHeuristic, List<LocalSearchHeuristicOption>> getLocalSearchAlgorithms() { Map<LocalSearchHeuristic, List<LocalSearchHeuristicOption>> result = new HashMap<>(); result.put(LocalSearchHeuristic.HILL_CLIMBING, Collections.<LocalSearchHeuristicOption>emptyList()); result.put(LocalSearchHeuristic.LATE_ACCEPTANCE, Arrays.asList(LocalSearchHeuristicOption.SIZE)); result.put(LocalSearchHeuristic.LATE_SIMULATED_ANNEALING, Arrays.asList(LocalSearchHeuristicOption.SIZE, LocalSearchHeuristicOption.ACCEPTED_COUNT_LIMIT)); result.put(LocalSearchHeuristic.SIMULATED_ANNEALING, Arrays.asList(LocalSearchHeuristicOption.INITIAL_HARD_TEMPERATURE, LocalSearchHeuristicOption.INITIAL_SOFT_TEMPERATURE)); result.put(LocalSearchHeuristic.STEP_COUNTING_HILL_CLIMBING, Arrays.asList(LocalSearchHeuristicOption.SIZE)); result.put(LocalSearchHeuristic.TABU_SEARCH, Arrays.asList(LocalSearchHeuristicOption.SIZE, LocalSearchHeuristicOption.ACCEPTED_COUNT_LIMIT)); return result; }
Clopla implements IClopla { @Override public Map<LocalSearchHeuristic, List<LocalSearchHeuristicOption>> getLocalSearchAlgorithms() { Map<LocalSearchHeuristic, List<LocalSearchHeuristicOption>> result = new HashMap<>(); result.put(LocalSearchHeuristic.HILL_CLIMBING, Collections.<LocalSearchHeuristicOption>emptyList()); result.put(LocalSearchHeuristic.LATE_ACCEPTANCE, Arrays.asList(LocalSearchHeuristicOption.SIZE)); result.put(LocalSearchHeuristic.LATE_SIMULATED_ANNEALING, Arrays.asList(LocalSearchHeuristicOption.SIZE, LocalSearchHeuristicOption.ACCEPTED_COUNT_LIMIT)); result.put(LocalSearchHeuristic.SIMULATED_ANNEALING, Arrays.asList(LocalSearchHeuristicOption.INITIAL_HARD_TEMPERATURE, LocalSearchHeuristicOption.INITIAL_SOFT_TEMPERATURE)); result.put(LocalSearchHeuristic.STEP_COUNTING_HILL_CLIMBING, Arrays.asList(LocalSearchHeuristicOption.SIZE)); result.put(LocalSearchHeuristic.TABU_SEARCH, Arrays.asList(LocalSearchHeuristicOption.SIZE, LocalSearchHeuristicOption.ACCEPTED_COUNT_LIMIT)); return result; } }
Clopla implements IClopla { @Override public Map<LocalSearchHeuristic, List<LocalSearchHeuristicOption>> getLocalSearchAlgorithms() { Map<LocalSearchHeuristic, List<LocalSearchHeuristicOption>> result = new HashMap<>(); result.put(LocalSearchHeuristic.HILL_CLIMBING, Collections.<LocalSearchHeuristicOption>emptyList()); result.put(LocalSearchHeuristic.LATE_ACCEPTANCE, Arrays.asList(LocalSearchHeuristicOption.SIZE)); result.put(LocalSearchHeuristic.LATE_SIMULATED_ANNEALING, Arrays.asList(LocalSearchHeuristicOption.SIZE, LocalSearchHeuristicOption.ACCEPTED_COUNT_LIMIT)); result.put(LocalSearchHeuristic.SIMULATED_ANNEALING, Arrays.asList(LocalSearchHeuristicOption.INITIAL_HARD_TEMPERATURE, LocalSearchHeuristicOption.INITIAL_SOFT_TEMPERATURE)); result.put(LocalSearchHeuristic.STEP_COUNTING_HILL_CLIMBING, Arrays.asList(LocalSearchHeuristicOption.SIZE)); result.put(LocalSearchHeuristic.TABU_SEARCH, Arrays.asList(LocalSearchHeuristicOption.SIZE, LocalSearchHeuristicOption.ACCEPTED_COUNT_LIMIT)); return result; }  }
Clopla implements IClopla { @Override public Map<LocalSearchHeuristic, List<LocalSearchHeuristicOption>> getLocalSearchAlgorithms() { Map<LocalSearchHeuristic, List<LocalSearchHeuristicOption>> result = new HashMap<>(); result.put(LocalSearchHeuristic.HILL_CLIMBING, Collections.<LocalSearchHeuristicOption>emptyList()); result.put(LocalSearchHeuristic.LATE_ACCEPTANCE, Arrays.asList(LocalSearchHeuristicOption.SIZE)); result.put(LocalSearchHeuristic.LATE_SIMULATED_ANNEALING, Arrays.asList(LocalSearchHeuristicOption.SIZE, LocalSearchHeuristicOption.ACCEPTED_COUNT_LIMIT)); result.put(LocalSearchHeuristic.SIMULATED_ANNEALING, Arrays.asList(LocalSearchHeuristicOption.INITIAL_HARD_TEMPERATURE, LocalSearchHeuristicOption.INITIAL_SOFT_TEMPERATURE)); result.put(LocalSearchHeuristic.STEP_COUNTING_HILL_CLIMBING, Arrays.asList(LocalSearchHeuristicOption.SIZE)); result.put(LocalSearchHeuristic.TABU_SEARCH, Arrays.asList(LocalSearchHeuristicOption.SIZE, LocalSearchHeuristicOption.ACCEPTED_COUNT_LIMIT)); return result; }  @Override ClusterState getBestSolution(List<Host> hosts, List<Vm> vms, VmPlacementConfig config); @Override List<ConstructionHeuristic> getConstructionHeuristics(); @Override Map<LocalSearchHeuristic, List<LocalSearchHeuristicOption>> getLocalSearchAlgorithms(); }
Clopla implements IClopla { @Override public Map<LocalSearchHeuristic, List<LocalSearchHeuristicOption>> getLocalSearchAlgorithms() { Map<LocalSearchHeuristic, List<LocalSearchHeuristicOption>> result = new HashMap<>(); result.put(LocalSearchHeuristic.HILL_CLIMBING, Collections.<LocalSearchHeuristicOption>emptyList()); result.put(LocalSearchHeuristic.LATE_ACCEPTANCE, Arrays.asList(LocalSearchHeuristicOption.SIZE)); result.put(LocalSearchHeuristic.LATE_SIMULATED_ANNEALING, Arrays.asList(LocalSearchHeuristicOption.SIZE, LocalSearchHeuristicOption.ACCEPTED_COUNT_LIMIT)); result.put(LocalSearchHeuristic.SIMULATED_ANNEALING, Arrays.asList(LocalSearchHeuristicOption.INITIAL_HARD_TEMPERATURE, LocalSearchHeuristicOption.INITIAL_SOFT_TEMPERATURE)); result.put(LocalSearchHeuristic.STEP_COUNTING_HILL_CLIMBING, Arrays.asList(LocalSearchHeuristicOption.SIZE)); result.put(LocalSearchHeuristic.TABU_SEARCH, Arrays.asList(LocalSearchHeuristicOption.SIZE, LocalSearchHeuristicOption.ACCEPTED_COUNT_LIMIT)); return result; }  @Override ClusterState getBestSolution(List<Host> hosts, List<Vm> vms, VmPlacementConfig config); @Override List<ConstructionHeuristic> getConstructionHeuristics(); @Override Map<LocalSearchHeuristic, List<LocalSearchHeuristicOption>> getLocalSearchAlgorithms();  }