当前位置: 首页>>代码示例>>Java>>正文


Java ContinuousDistribution类代码示例

本文整理汇总了Java中org.cloudbus.cloudsim.distributions.ContinuousDistribution的典型用法代码示例。如果您正苦于以下问题:Java ContinuousDistribution类的具体用法?Java ContinuousDistribution怎么用?Java ContinuousDistribution使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ContinuousDistribution类属于org.cloudbus.cloudsim.distributions包,在下文中一共展示了ContinuousDistribution类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setAvgSeekTime

import org.cloudbus.cloudsim.distributions.ContinuousDistribution; //导入依赖的package包/类
/**
 * Sets the average seek time and a new generator of seek times in seconds. The generator
 * determines a randomized seek time.
 * 
 * @param seekTime the average seek time in seconds
 * @param gen the ContinuousGenerator which generates seek times
 * @return <tt>true</tt> if the setting succeeded, <tt>false</tt> otherwise
 */
public boolean setAvgSeekTime(double seekTime, ContinuousDistribution gen) {
	if (seekTime <= 0.0) {
		return false;
	}

	avgSeekTime = seekTime;
	this.gen = gen;
	return true;
}
 
开发者ID:gmartinezramirez,项目名称:Fog-Computing-Mobile-Architecture,代码行数:18,代码来源:HarddriveStorage.java

示例2: changeMiBaseline

import org.cloudbus.cloudsim.distributions.ContinuousDistribution; //导入依赖的package包/类
private void changeMiBaseline() {
	double mean = 1d;
	double dev = Parameters.cpuDynamicsCV;
	ContinuousDistribution dist = Parameters.getDistribution(Parameters.cpuDynamicsDistribution, mean, Parameters.cpuDynamicsAlpha, Parameters.cpuDynamicsBeta,
	    dev, Parameters.cpuDynamicsShape, Parameters.cpuDynamicsLocation, Parameters.cpuDynamicsShift, Parameters.cpuDynamicsMin, Parameters.cpuDynamicsMax,
	    Parameters.cpuDynamicsPopulation);
	miCurrentBaseline = 0;
	while (miCurrentBaseline <= 0) {
		miCurrentBaseline = dist.sample();
	}
}
 
开发者ID:marcbux,项目名称:dynamiccloudsim,代码行数:12,代码来源:DynamicModel.java

示例3: changeIoBaseline

import org.cloudbus.cloudsim.distributions.ContinuousDistribution; //导入依赖的package包/类
private void changeIoBaseline() {
	double mean = 1d;
	double dev = Parameters.ioDynamicsCV;
	ContinuousDistribution dist = Parameters.getDistribution(Parameters.ioDynamicsDistribution, mean, Parameters.ioDynamicsAlpha, Parameters.ioDynamicsBeta,
	    dev, Parameters.ioDynamicsShape, Parameters.ioDynamicsLocation, Parameters.ioDynamicsShift, Parameters.ioDynamicsMin, Parameters.ioDynamicsMax,
	    Parameters.ioDynamicsPopulation);
	ioCurrentBaseline = 0;
	while (ioCurrentBaseline <= 0) {
		ioCurrentBaseline = dist.sample();
	}
}
 
开发者ID:marcbux,项目名称:dynamiccloudsim,代码行数:12,代码来源:DynamicModel.java

示例4: changeBwBaseline

import org.cloudbus.cloudsim.distributions.ContinuousDistribution; //导入依赖的package包/类
private void changeBwBaseline() {
	double mean = 1d;
	double dev = Parameters.bwDynamicsCV;
	ContinuousDistribution dist = Parameters.getDistribution(Parameters.bwDynamicsDistribution, mean, Parameters.bwDynamicsAlpha, Parameters.bwDynamicsBeta,
	    dev, Parameters.bwDynamicsShape, Parameters.bwDynamicsLocation, Parameters.bwDynamicsShift, Parameters.bwDynamicsMin, Parameters.bwDynamicsMax,
	    Parameters.bwDynamicsPopulation);
	bwCurrentBaseline = 0;
	while (bwCurrentBaseline <= 0) {
		bwCurrentBaseline = dist.sample();
	}
}
 
开发者ID:marcbux,项目名称:dynamiccloudsim,代码行数:12,代码来源:DynamicModel.java

示例5: createCloudletPesArray

import org.cloudbus.cloudsim.distributions.ContinuousDistribution; //导入依赖的package包/类
/**
 * Creates an array with the configuration of PEs for each Cloudlet to be
 * created in each experiment run. Every experiment will use the same
 * Cloudlets configurations.
 *
 * @return the created cloudlet PEs array
 */
private int[] createCloudletPesArray() {
    int[] pesArray = new int[CLOUDLETS_TO_CREATE];
    int totalNumberOfPes = 0;
    final ContinuousDistribution random = new NormalDistr(getBaseSeed(), 2, 0.6);
    for (int i = 0; i < CLOUDLETS_TO_CREATE; i++) {
        pesArray[i] = (int) random.sample() + 1;
        totalNumberOfPes += pesArray[i];
    }

    return pesArray;
}
 
开发者ID:manoelcampos,项目名称:cloudsim-plus,代码行数:19,代码来源:DatacenterBrokerHeuristicRunner.java

示例6: createExperiment

import org.cloudbus.cloudsim.distributions.ContinuousDistribution; //导入依赖的package包/类
@Override
protected DatacenterBrokerHeuristicExperiment createExperiment(int i) {
    final ContinuousDistribution prng = createRandomGen(i, 0, 1);
    final DatacenterBrokerHeuristicExperiment exp
            = new DatacenterBrokerHeuristicExperiment(i, this)
                    .setRandomGen(prng)
                    .setCloudletPesArray(cloudletPesArray)
                    .setVmPesArray(vmPesArray);

    exp.setVerbose(experimentVerbose).setAfterExperimentFinish(this::afterExperimentFinish);
    return exp;
}
 
开发者ID:manoelcampos,项目名称:cloudsim-plus,代码行数:13,代码来源:DatacenterBrokerHeuristicRunner.java

示例7: createExperiment

import org.cloudbus.cloudsim.distributions.ContinuousDistribution; //导入依赖的package包/类
@Override
protected CloudletSchedulerTimeSharedExperiment createExperiment(int i) {
    final ContinuousDistribution cloudletPesPrng = createRandomGen(i, 1, MAX_CLOUDLET_PES);
    final CloudletSchedulerTimeSharedExperiment exp = new CloudletSchedulerTimeSharedExperiment(i, this);

    exp
        .setCloudletPesPrng(cloudletPesPrng)
        .setNumCloudletsToCreate((int) getCloudletsNumberPrng().sample())
        .setAfterExperimentFinish(this::afterExperimentFinish)
        .setVerbose(false);

    return exp;
}
 
开发者ID:manoelcampos,项目名称:cloudsim-plus,代码行数:14,代码来源:CloudletSchedulerTimeSharedRunner.java

示例8: createExperiment

import org.cloudbus.cloudsim.distributions.ContinuousDistribution; //导入依赖的package包/类
@Override
protected CompletelyFairSchedulerExperiment createExperiment(int i) {
    final ContinuousDistribution cloudletPesPrng = createRandomGen(i, 1, MAX_CLOUDLET_PES);
    final CompletelyFairSchedulerExperiment exp = new CompletelyFairSchedulerExperiment(i, this);

    exp
        .setCloudletPesPrng(cloudletPesPrng)
        .setNumCloudletsToCreate((int) getCloudletsNumberPrng().sample())
        .setAfterExperimentFinish(this::afterExperimentFinish)
        .setVerbose(false);

    return exp;
}
 
开发者ID:manoelcampos,项目名称:cloudsim-plus,代码行数:14,代码来源:CompletelyFairSchedulerRunner.java

示例9: createExperiment

import org.cloudbus.cloudsim.distributions.ContinuousDistribution; //导入依赖的package包/类
@Override
protected CloudletTaskTimeCompletionWorkLoadWithoutMinimizationExperiment createExperiment(int i) {
    ContinuousDistribution randCloudlet = createRandomGen(i);
    ContinuousDistribution randVm = createRandomGen(i);
    CloudletTaskTimeCompletionWorkLoadWithoutMinimizationExperiment exp
            = new CloudletTaskTimeCompletionWorkLoadWithoutMinimizationExperiment(i, this);
    exp.setVerbose(experimentVerbose).setAfterExperimentFinish(this::afterExperimentFinish);
    return exp;
}
 
开发者ID:manoelcampos,项目名称:cloudsim-plus,代码行数:10,代码来源:CloudletTaskTimeCompletionWorkLoadWithoutMinimizationRunner.java

示例10: createExperiment

import org.cloudbus.cloudsim.distributions.ContinuousDistribution; //导入依赖的package包/类
@Override
protected CloudletTaskTimeCompletionWithoutMinimizationExperiment createExperiment(int i) {
    CloudletTaskTimeCompletionWithoutMinimizationExperiment exp
            = new CloudletTaskTimeCompletionWithoutMinimizationExperiment(i, this);
    ContinuousDistribution randCloudlet = createRandomGen(i);
    ContinuousDistribution randVm = createRandomGen(i);
    exp.setVerbose(experimentVerbose).setAfterExperimentFinish(this::afterExperimentFinish);
    return exp;
}
 
开发者ID:manoelcampos,项目名称:cloudsim-plus,代码行数:10,代码来源:CloudletTaskTimeCompletionWithoutMinimizationRunner.java

示例11: createExperiment

import org.cloudbus.cloudsim.distributions.ContinuousDistribution; //导入依赖的package包/类
@Override
protected CloudletTaskTimeCompletionWorkLoadMinimizationExperiment createExperiment(int i) {
    CloudletTaskTimeCompletionWorkLoadMinimizationExperiment exp
            = new CloudletTaskTimeCompletionWorkLoadMinimizationExperiment(i, this);
    ContinuousDistribution randCloudlet = createRandomGen(i);
    ContinuousDistribution randVm = createRandomGen(i);
    ContinuousDistribution randMips = createRandomGen(i);

    exp.setVerbose(experimentVerbose).setAfterExperimentFinish(this::afterExperimentFinish);
    return exp;
}
 
开发者ID:manoelcampos,项目名称:cloudsim-plus,代码行数:12,代码来源:CloudletTaskTimeCompletionWorkLoadMinimizationRunner.java

示例12: createExperiment

import org.cloudbus.cloudsim.distributions.ContinuousDistribution; //导入依赖的package包/类
@Override
protected CloudletTaskTimeCompletionMinimizationExperiment createExperiment(int i) {
    CloudletTaskTimeCompletionMinimizationExperiment exp
            = new CloudletTaskTimeCompletionMinimizationExperiment(i, this);

    ContinuousDistribution randCloudlet = createRandomGen(i);
    ContinuousDistribution randVm = createRandomGen(i);
    ContinuousDistribution randCloudletPes = createRandomGen(i);
    ContinuousDistribution randMips = createRandomGen(i);
    exp.setVerbose(experimentVerbose)
            .setAfterExperimentFinish(this::afterExperimentFinish);
    return exp;
}
 
开发者ID:manoelcampos,项目名称:cloudsim-plus,代码行数:14,代码来源:CloudletTaskTimeCompletionMinimizationRunner.java

示例13: HeuristicAbstract

import org.cloudbus.cloudsim.distributions.ContinuousDistribution; //导入依赖的package包/类
/**
 * Creates a heuristic.
 *
 * @param random a random number generator
 * @param solutionClass reference to the generic class that will be used to instantiate heuristic solutions
 */
HeuristicAbstract(ContinuousDistribution random, Class<S> solutionClass){
	this.solutionClass = solutionClass;
	this.random = random;
	this.numberOfNeighborhoodSearchesByIteration = 1;
	setBestSolutionSoFar(newSolutionInstance());
	setNeighborSolution(bestSolutionSoFar);
}
 
开发者ID:manoelcampos,项目名称:cloudsim-plus,代码行数:14,代码来源:HeuristicAbstract.java

示例14: setAvgSeekTime

import org.cloudbus.cloudsim.distributions.ContinuousDistribution; //导入依赖的package包/类
/**
 * Sets the average seek time and a new generator of seek times in seconds. The generator
 * determines a randomized seek time.
 *
 * @param seekTime the average seek time in seconds
 * @param gen the ContinuousGenerator which generates seek times
 * @return <tt>true</tt> if the values is greater than zero and was set successfully,
 * <tt>false</tt> otherwise
 */
public boolean setAvgSeekTime(final double seekTime, final ContinuousDistribution gen) {
    if (seekTime <= 0.0) {
        return false;
    }

    avgSeekTime = seekTime;
    this.gen = gen;
    return true;
}
 
开发者ID:manoelcampos,项目名称:cloudsim-plus,代码行数:19,代码来源:HarddriveStorage.java

示例15: testSetAvgSeekTime

import org.cloudbus.cloudsim.distributions.ContinuousDistribution; //导入依赖的package包/类
/**
 * Private method called by the overloaded versions of the
 * setAvgSeekTime method.
 * @param gen A random number generator. The parameter can be
 * null in order to use the simpler version of the setAvgSeekTime.
 */
private void testSetAvgSeekTime(ContinuousDistribution gen) {
    final HarddriveStorage instance = createHardDrive();
    final double seekTime = 1;
    assertTrue(setAvgSeekTime(instance, seekTime, gen));
    assertEquals(seekTime, instance.getAvgSeekTime(), 0);

    assertFalse(setAvgSeekTime(instance, 0, gen));
    assertEquals(seekTime, instance.getAvgSeekTime(), 0);

    assertFalse(setAvgSeekTime(instance, -1, gen));
    assertEquals(seekTime, instance.getAvgSeekTime(), 0);
}
 
开发者ID:manoelcampos,项目名称:cloudsim-plus,代码行数:19,代码来源:HarddriveStorageTest.java


注:本文中的org.cloudbus.cloudsim.distributions.ContinuousDistribution类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。