cloudsim-plus-master/cloudsim-plus-master/cloudsim-plus-examples/src/main/java/org/cloudbus/cloudsim/examples/network/applications/NetworkVmExampleAbstract.java
protected final List<NetworkVm> createAndSubmitVMs(DatacenterBroker broker) {
        final int numberOfVms = getDatacenterHostList().size() * MAX_VMS_PER_HOST;
        final List<NetworkVm> list = new ArrayList<>();
        for (int i = 0; i < numberOfVms; i++) {
            NetworkVm vm = new NetworkVm(i,VM_MIPS, VM_PES_NUMBER);
            vm.setRam(VM_RAM)
              .setBw(VM_BW)
              .setSize(VM_SIZE)
              .setCloudletScheduler(new CloudletSchedulerTimeShared());
            list.add(vm);
        }

        broker.submitVmList(list);
        return list;
    }
/**
     * Creates a list of virtual machines in a Datacenter for a given broker
     * and submit the list to the broker.
     *
     * @param broker The broker that will own the created VMs
     * @return the list of created VMs
     */
Creates a list of virtual machines in a Datacenter for a given broker
and submit the list to the broker.

@param broker The broker that will own the created VMs
@return the list of created VMs
Creates a list of virtual machines in a Datacenter for a given broker and submit the list to the broker . @param broker The broker that will own the created VMs @return the list of created VMs
protected final List<NetworkVm> createAndSubmitVMs(DatacenterBroker broker) {
        final int numberOfVms = getDatacenterHostList().size() * MAX_VMS_PER_HOST;
        final List<NetworkVm> list = new ArrayList<>();
        for (int i = 0; i < numberOfVms; i++) {
            NetworkVm vm = new NetworkVm(i,VM_MIPS, VM_PES_NUMBER);
            vm.setRam(VM_RAM)
              .setBw(VM_BW)
              .setSize(VM_SIZE)
              .setCloudletScheduler(new CloudletSchedulerTimeShared());
            list.add(vm);
        }
        broker.submitVmList(list);
        return list;
    }
protected final List < NetworkVm > createAndSubmitVMs ( DatacenterBroker broker ) { final int numberOfVms = getDatacenterHostList ( ) . size ( ) * MAX_VMS_PER_HOST ; final List < NetworkVm > list = new ArrayList < > ( ) ; for ( int i = 0 ; i < numberOfVms ; i ++ ) { NetworkVm vm = new NetworkVm ( i , VM_MIPS , VM_PES_NUMBER ) ; vm . setRam ( VM_RAM ) . setBw ( VM_BW ) . setSize ( VM_SIZE ) . setCloudletScheduler ( new CloudletSchedulerTimeShared ( ) ) ; list . add ( vm ) ; } broker . submitVmList ( list ) ; return list ; }
Creates a list of virtual machines in a Datacenter for a given broker
 and submit the list to the broker.
Creates a list of virtual machines in a Datacenter for a given broker and submit the list to the broker .