cloudsim-plus-master/cloudsim-plus-master/cloudsim-plus-examples/src/main/java/org/cloudsimplus/examples/workload/SwfWorkloadFormatExample1.java
private List<Host> createHostsOfSameCapacity(long numberOfHosts, long numberOfPes) {
        final long ram = VM_RAM * NUMBER_OF_VMS_PER_HOST;
        final long storage = VM_SIZE * NUMBER_OF_VMS_PER_HOST;
        final long bw = VM_BW * NUMBER_OF_VMS_PER_HOST;

        List<Host> list = new ArrayList<>();
        for(int i = 0; i < numberOfHosts; i++){
            List<Pe> peList = createPeList(numberOfPes, VM_MIPS);

            Host host =
                new HostSimple(ram, bw, storage, peList)
                    .setRamProvisioner(new ResourceProvisionerSimple())
                    .setBwProvisioner(new ResourceProvisionerSimple())
                    .setVmScheduler(new VmSchedulerTimeShared());

            list.add(host);
        }

        Log.printConcatLine("#Created ", numberOfHosts, " hosts with ", numberOfPes, " PEs each one");

        return list;
    }
/**
     * Creates a specific number of PM's with the same capacity.
     *
     * @param numberOfHosts number of hosts to create
     * @param numberOfPes number of PEs of the host
     * @return the created host
     */
Creates a specific number of PM's with the same capacity.
@param numberOfHosts number of hosts to create
@param numberOfPes number of PEs of the host
@return the created host
Creates a specific number of PM ' s with the same capacity . @param numberOfHosts number of hosts to create @param numberOfPes number of PEs of the host @return the created host
private List<Host> createHostsOfSameCapacity(long numberOfHosts, long numberOfPes) {
        final long ram = VM_RAM * NUMBER_OF_VMS_PER_HOST;
        final long storage = VM_SIZE * NUMBER_OF_VMS_PER_HOST;
        final long bw = VM_BW * NUMBER_OF_VMS_PER_HOST;
        List<Host> list = new ArrayList<>();
        for(int i = 0; i < numberOfHosts; i++){
            List<Pe> peList = createPeList(numberOfPes, VM_MIPS);
            Host host =
                new HostSimple(ram, bw, storage, peList)
                    .setRamProvisioner(new ResourceProvisionerSimple())
                    .setBwProvisioner(new ResourceProvisionerSimple())
                    .setVmScheduler(new VmSchedulerTimeShared());
            list.add(host);
        }
        Log.printConcatLine("#Created ", numberOfHosts, " hosts with ", numberOfPes, " PEs each one");
        return list;
    }
private List < Host > createHostsOfSameCapacity ( long numberOfHosts , long numberOfPes ) { final long ram = VM_RAM * NUMBER_OF_VMS_PER_HOST ; final long storage = VM_SIZE * NUMBER_OF_VMS_PER_HOST ; final long bw = VM_BW * NUMBER_OF_VMS_PER_HOST ; List < Host > list = new ArrayList < > ( ) ; for ( int i = 0 ; i < numberOfHosts ; i ++ ) { List < Pe > peList = createPeList ( numberOfPes , VM_MIPS ) ; Host host = new HostSimple ( ram , bw , storage , peList ) . setRamProvisioner ( new ResourceProvisionerSimple ( ) ) . setBwProvisioner ( new ResourceProvisionerSimple ( ) ) . setVmScheduler ( new VmSchedulerTimeShared ( ) ) ; list . add ( host ) ; } Log . printConcatLine ( "#Created " , numberOfHosts , " hosts with " , numberOfPes , " PEs each one" ) ; return list ; }
Creates a specific number of PM's with the same capacity.
Creates a specific number of PM ' s with the same capacity .