cloudsim-plus-master/cloudsim-plus-master/cloudsim-plus-examples/src/main/java/org/cloudbus/cloudsim/examples/network/applications/NetworkVmsExample1.java
private NetworkDatacenter createDatacenter() {
        List<Host> hostList = new ArrayList<>();
        for (int i = 0; i < NUMBER_OF_HOSTS; i++) {
            Host host = createHost(i);
            hostList.add(host);
        }

        DatacenterCharacteristics characteristics
                = new DatacenterCharacteristicsSimple(hostList)
                        .setCostPerSecond(COST)
                        .setCostPerMem(COST_PER_MEM)
                        .setCostPerStorage(COST_PER_STORAGE)
                        .setCostPerBw(COST_PER_BW);

        NetworkDatacenter newDatacenter
                = new NetworkDatacenter(simulation, characteristics, new VmAllocationPolicySimple());
        newDatacenter.setSchedulingInterval(5);

        createNetwork(newDatacenter);
        return newDatacenter;
    }
/**
     * Creates the Datacenter.
     *
     * @return the Datacenter
     */
Creates the Datacenter.
@return the Datacenter
Creates the Datacenter . @return the Datacenter
private NetworkDatacenter createDatacenter() {
        List<Host> hostList = new ArrayList<>();
        for (int i = 0; i < NUMBER_OF_HOSTS; i++) {
            Host host = createHost(i);
            hostList.add(host);
        }
        DatacenterCharacteristics characteristics
                = new DatacenterCharacteristicsSimple(hostList)
                        .setCostPerSecond(COST)
                        .setCostPerMem(COST_PER_MEM)
                        .setCostPerStorage(COST_PER_STORAGE)
                        .setCostPerBw(COST_PER_BW);
        NetworkDatacenter newDatacenter
                = new NetworkDatacenter(simulation, characteristics, new VmAllocationPolicySimple());
        newDatacenter.setSchedulingInterval(5);
        createNetwork(newDatacenter);
        return newDatacenter;
    }
private NetworkDatacenter createDatacenter ( ) { List < Host > hostList = new ArrayList < > ( ) ; for ( int i = 0 ; i < NUMBER_OF_HOSTS ; i ++ ) { Host host = createHost ( i ) ; hostList . add ( host ) ; } DatacenterCharacteristics characteristics = new DatacenterCharacteristicsSimple ( hostList ) . setCostPerSecond ( COST ) . setCostPerMem ( COST_PER_MEM ) . setCostPerStorage ( COST_PER_STORAGE ) . setCostPerBw ( COST_PER_BW ) ; NetworkDatacenter newDatacenter = new NetworkDatacenter ( simulation , characteristics , new VmAllocationPolicySimple ( ) ) ; newDatacenter . setSchedulingInterval ( 5 ) ; createNetwork ( newDatacenter ) ; return newDatacenter ; }
Creates the Datacenter.
Creates the Datacenter .