cloudsim-plus-master/cloudsim-plus-master/cloudsim-plus-examples/src/main/java/org/cloudbus/cloudsim/examples/power/util/RandomRunner.java
public static List<Cloudlet> createCloudletList(DatacenterBroker broker, int cloudletsNumber) {
        List<Cloudlet> list = new ArrayList<>(cloudletsNumber);

        long fileSize = 300;
        long outputSize = 300;
        long seed = CLOUDLET_UTILIZATION_SEED;
        UtilizationModel utilizationModelNull = UtilizationModel.NULL;

        for (int i = 0; i < cloudletsNumber; i++) {
            CloudletSimple cloudlet;
            if (seed == -1) {
                cloudlet = new CloudletSimple(i, Constants.CLOUDLET_LENGTH, Constants.CLOUDLET_PES);
                cloudlet
                    .setFileSize(fileSize)
                    .setOutputSize(outputSize)
                    .setUtilizationModelCpu(new UtilizationModelStochastic())
                    .setUtilizationModelRam(utilizationModelNull)
                    .setUtilizationModelBw(utilizationModelNull);
            } else {
                cloudlet = new CloudletSimple(i, Constants.CLOUDLET_LENGTH, Constants.CLOUDLET_PES);
                cloudlet
                    .setFileSize(fileSize)
                    .setOutputSize(outputSize)
                    .setUtilizationModelCpu(new UtilizationModelStochastic(seed * i))
                    .setUtilizationModelRam(utilizationModelNull)
                    .setUtilizationModelBw(utilizationModelNull);

            }
            //cloudlet.setVm(i);
            list.add(cloudlet);
        }

        return list;
    }
/**
     * Creates the cloudlet list.
     *
     * @param broker          the broker
     * @param cloudletsNumber the cloudlets number
     * @return the list< cloudlet>
     */
Creates the cloudlet list.
@param broker          the broker
@param cloudletsNumber the cloudlets number
@return the list< cloudlet>
Creates the cloudlet list . @param broker the broker @param cloudletsNumber the cloudlets number @return the list< cloudlet >
public static List<Cloudlet> createCloudletList(DatacenterBroker broker, int cloudletsNumber) {
        List<Cloudlet> list = new ArrayList<>(cloudletsNumber);
        long fileSize = 300;
        long outputSize = 300;
        long seed = CLOUDLET_UTILIZATION_SEED;
        UtilizationModel utilizationModelNull = UtilizationModel.NULL;
        for (int i = 0; i < cloudletsNumber; i++) {
            CloudletSimple cloudlet;
            if (seed == -1) {
                cloudlet = new CloudletSimple(i, Constants.CLOUDLET_LENGTH, Constants.CLOUDLET_PES);
                cloudlet
                    .setFileSize(fileSize)
                    .setOutputSize(outputSize)
                    .setUtilizationModelCpu(new UtilizationModelStochastic())
                    .setUtilizationModelRam(utilizationModelNull)
                    .setUtilizationModelBw(utilizationModelNull);
            } else {
                cloudlet = new CloudletSimple(i, Constants.CLOUDLET_LENGTH, Constants.CLOUDLET_PES);
                cloudlet
                    .setFileSize(fileSize)
                    .setOutputSize(outputSize)
                    .setUtilizationModelCpu(new UtilizationModelStochastic(seed * i))
                    .setUtilizationModelRam(utilizationModelNull)
                    .setUtilizationModelBw(utilizationModelNull);
            }
            list.add(cloudlet);
        }
        return list;
    }
public static List < Cloudlet > createCloudletList ( DatacenterBroker broker , int cloudletsNumber ) { List < Cloudlet > list = new ArrayList < > ( cloudletsNumber ) ; long fileSize = 300 ; long outputSize = 300 ; long seed = CLOUDLET_UTILIZATION_SEED ; UtilizationModel utilizationModelNull = UtilizationModel . NULL ; for ( int i = 0 ; i < cloudletsNumber ; i ++ ) { CloudletSimple cloudlet ; if ( seed == - 1 ) { cloudlet = new CloudletSimple ( i , Constants . CLOUDLET_LENGTH , Constants . CLOUDLET_PES ) ; cloudlet . setFileSize ( fileSize ) . setOutputSize ( outputSize ) . setUtilizationModelCpu ( new UtilizationModelStochastic ( ) ) . setUtilizationModelRam ( utilizationModelNull ) . setUtilizationModelBw ( utilizationModelNull ) ; } else { cloudlet = new CloudletSimple ( i , Constants . CLOUDLET_LENGTH , Constants . CLOUDLET_PES ) ; cloudlet . setFileSize ( fileSize ) . setOutputSize ( outputSize ) . setUtilizationModelCpu ( new UtilizationModelStochastic ( seed * i ) ) . setUtilizationModelRam ( utilizationModelNull ) . setUtilizationModelBw ( utilizationModelNull ) ; } list . add ( cloudlet ) ; } return list ; }
Creates the cloudlet list.
Creates the cloudlet list .
//cloudlet.setVm(i);