@Test public void penaltyScoreForFixedVmsIsZeroWhenFixedVmsHaveNotBeenMoved() { assertEquals(0, ScoreCalculatorCommon.getClusterPenaltyScoreForFixedVms( getClusterWithFixedVmsNotMigrated()), DOUBLE_COMPARISON_DELTA); }
public static double getClusterPenaltyScoreForFixedVms(ClusterState clusterState) { double result = 0; for (Host host: clusterState.getHosts()) { if (host.missingFixedVMs(clusterState.getVms())) { result -= PENALTY_FOR_MOVING_FIXED_VMS; } } if(result < 0) { System.out.println("getClusterPenaltyScoreForFixedVms: " + result); } return result; }
ScoreCalculatorCommon { public static double getClusterPenaltyScoreForFixedVms(ClusterState clusterState) { double result = 0; for (Host host: clusterState.getHosts()) { if (host.missingFixedVMs(clusterState.getVms())) { result -= PENALTY_FOR_MOVING_FIXED_VMS; } } if(result < 0) { System.out.println("getClusterPenaltyScoreForFixedVms: " + result); } return result; } }
ScoreCalculatorCommon { public static double getClusterPenaltyScoreForFixedVms(ClusterState clusterState) { double result = 0; for (Host host: clusterState.getHosts()) { if (host.missingFixedVMs(clusterState.getVms())) { result -= PENALTY_FOR_MOVING_FIXED_VMS; } } if(result < 0) { System.out.println("getClusterPenaltyScoreForFixedVms: " + result); } return result; }  }
ScoreCalculatorCommon { public static double getClusterPenaltyScoreForFixedVms(ClusterState clusterState) { double result = 0; for (Host host: clusterState.getHosts()) { if (host.missingFixedVMs(clusterState.getVms())) { result -= PENALTY_FOR_MOVING_FIXED_VMS; } } if(result < 0) { System.out.println("getClusterPenaltyScoreForFixedVms: " + result); } return result; }  static double getClusterOverCapacityScore(ClusterState clusterState); static double getClusterPenaltyScoreForFixedVms(ClusterState clusterState); }
ScoreCalculatorCommon { public static double getClusterPenaltyScoreForFixedVms(ClusterState clusterState) { double result = 0; for (Host host: clusterState.getHosts()) { if (host.missingFixedVMs(clusterState.getVms())) { result -= PENALTY_FOR_MOVING_FIXED_VMS; } } if(result < 0) { System.out.println("getClusterPenaltyScoreForFixedVms: " + result); } return result; }  static double getClusterOverCapacityScore(ClusterState clusterState); static double getClusterPenaltyScoreForFixedVms(ClusterState clusterState); final static int PENALTY_FOR_MOVING_FIXED_VMS; }