/** * Creates a new VmAllocationPolicySimple object. * * @param list the list of hosts * @pre $none * @post $none */ public VmAllocationPolicySimple(List<? extends Host> list) { super(list); setFreePes(new ArrayList<Integer>()); for (Host host : getHostList()) { getFreePes().add(host.getNumberOfPes()); } setVmTable(new HashMap<String, Host>()); setUsedPes(new HashMap<String, Integer>()); }
/** * Creates a new VmAllocationPolicySimple object. * * @param list list Machines available in a {@link Datacenter} * * @pre $none * @post $none */ public NetworkVmAllocationPolicy(List<? extends Host> list) { super(list); setFreePes(new ArrayList<Integer>()); for (Host host : getHostList()) { getFreePes().add(host.getNumberOfPes()); } setVmTable(new HashMap<String, Host>()); setUsedPes(new HashMap<String, Integer>()); }