cloudsim-plus-master/cloudsim-plus-master/cloudsim-plus-testbeds/src/main/java/org/cloudsimplus/sla/SlaMetricsWithoutNetworkExample.java
private Datacenter createDatacenter() {
        hostList = new ArrayList<>();

        int mips = 10000;
        int hostId = 0;
        int ram = 8192; // host memory (MEGABYTE)
        long storage = 1000000; // host storage
        long bw = 100000;

        for (int i = 0; i < HOSTS_NUMBER; i++) {
            List<Pe> peList = createHostPesList(HOST_PES, mips);
            Host host = new HostSimple(ram, bw, storage, peList)
                    .setRamProvisioner(new ResourceProvisionerSimple())
                    .setBwProvisioner(new ResourceProvisionerSimple())
                    .setVmScheduler(new VmSchedulerTimeShared());

            getHostList().add(host);
        }// This is our machine

        double cost = 3.0; // the cost of using processing in this resource
        double costPerMem = 0.05; // the cost of using memory in this resource
        double costPerStorage = 0.001; // the cost of using storage in this
        // resource
        double costPerBw = 0.0; // the cost of using bw in this resource

        DatacenterCharacteristics characteristics
                = new DatacenterCharacteristicsSimple(hostList)
                .setCostPerSecond(cost)
                .setCostPerMem(costPerMem)
                .setCostPerStorage(costPerStorage)
                .setCostPerBw(costPerBw);

        return new DatacenterSimple(cloudsim, characteristics,
                new VmAllocationPolicySimple());
    }
/**
     * Creates the DATACENTER.
     *
     * @return the dc
     */
Creates the DATACENTER.
@return the dc
Creates the DATACENTER . @return the dc
private Datacenter createDatacenter() {
        hostList = new ArrayList<>();
        int mips = 10000;
        int hostId = 0;
        int ram = 8192; 
        long storage = 1000000; 
        long bw = 100000;
        for (int i = 0; i < HOSTS_NUMBER; i++) {
            List<Pe> peList = createHostPesList(HOST_PES, mips);
            Host host = new HostSimple(ram, bw, storage, peList)
                    .setRamProvisioner(new ResourceProvisionerSimple())
                    .setBwProvisioner(new ResourceProvisionerSimple())
                    .setVmScheduler(new VmSchedulerTimeShared());
            getHostList().add(host);
        }
        double cost = 3.0; 
        double costPerMem = 0.05; 
        double costPerStorage = 0.001; 
        double costPerBw = 0.0; 
        DatacenterCharacteristics characteristics
                = new DatacenterCharacteristicsSimple(hostList)
                .setCostPerSecond(cost)
                .setCostPerMem(costPerMem)
                .setCostPerStorage(costPerStorage)
                .setCostPerBw(costPerBw);
        return new DatacenterSimple(cloudsim, characteristics,
                new VmAllocationPolicySimple());
    }
private Datacenter createDatacenter ( ) { hostList = new ArrayList < > ( ) ; int mips = 10000 ; int hostId = 0 ; int ram = 8192 ; long storage = 1000000 ; long bw = 100000 ; for ( int i = 0 ; i < HOSTS_NUMBER ; i ++ ) { List < Pe > peList = createHostPesList ( HOST_PES , mips ) ; Host host = new HostSimple ( ram , bw , storage , peList ) . setRamProvisioner ( new ResourceProvisionerSimple ( ) ) . setBwProvisioner ( new ResourceProvisionerSimple ( ) ) . setVmScheduler ( new VmSchedulerTimeShared ( ) ) ; getHostList ( ) . add ( host ) ; } double cost = 3.0 ; double costPerMem = 0.05 ; double costPerStorage = 0.001 ; double costPerBw = 0.0 ; DatacenterCharacteristics characteristics = new DatacenterCharacteristicsSimple ( hostList ) . setCostPerSecond ( cost ) . setCostPerMem ( costPerMem ) . setCostPerStorage ( costPerStorage ) . setCostPerBw ( costPerBw ) ; return new DatacenterSimple ( cloudsim , characteristics , new VmAllocationPolicySimple ( ) ) ; }
Creates the DATACENTER.
Creates the DATACENTER .
// host memory (MEGABYTE) // host storage // This is our machine // the cost of using processing in this resource // the cost of using memory in this resource // the cost of using storage in this // resource // the cost of using bw in this resource