cloudsim-plus-master/cloudsim-plus-master/cloudsim-plus-examples/src/main/java/org/cloudsimplus/examples/listeners/VmListenersExample3_DynamicVmCreation.java
private Datacenter createDatacenter() {
        Host host = createHost(0);
        hostList.add(host);

        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 Datacenter
        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(simulation, characteristics, new VmAllocationPolicySimple());
    }
/**
     * Creates a Datacenter with pre-defined configuration.
     *
     * @return the created Datacenter
     */
Creates a Datacenter with pre-defined configuration.
@return the created Datacenter
Creates a Datacenter with pre - defined configuration . @return the created Datacenter
private Datacenter createDatacenter() {
        Host host = createHost(0);
        hostList.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(simulation, characteristics, new VmAllocationPolicySimple());
    }
private Datacenter createDatacenter ( ) { Host host = createHost ( 0 ) ; hostList . 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 ( simulation , characteristics , new VmAllocationPolicySimple ( ) ) ; }
Creates a Datacenter with pre-defined configuration.
Creates a Datacenter with pre - defined configuration .
// the cost of using processing in this resource // the cost of using memory in this resource // the cost of using storage in this Datacenter // the cost of using bw in this resource