• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java ContinuousDistribution类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: setAvgSeekTime

import org.cloudbus.cloudsim.distributions.ContinuousDistribution; //导入依赖的package包/类
private static boolean setAvgSeekTime(
        final HarddriveStorage instance, final double seekTime,
        final ContinuousDistribution gen) {
    if(gen != null) {
        return instance.setAvgSeekTime(seekTime, gen);
    }

    return instance.setAvgSeekTime(seekTime);
}
 
开发者ID:manoelcampos,项目名称:cloudsim-plus,代码行数:10,代码来源:HarddriveStorageTest.java


示例17: getCloudletPesPrng

import org.cloudbus.cloudsim.distributions.ContinuousDistribution; //导入依赖的package包/类
public ContinuousDistribution getCloudletPesPrng() {
    return cloudletPesPrng;
}
 
开发者ID:manoelcampos,项目名称:cloudsim-plus,代码行数:4,代码来源:CloudletSchedulerExperiment.java


示例18: setCloudletPesPrng

import org.cloudbus.cloudsim.distributions.ContinuousDistribution; //导入依赖的package包/类
public CloudletSchedulerExperiment setCloudletPesPrng(ContinuousDistribution cloudletPesPrng) {
    this.cloudletPesPrng = cloudletPesPrng;
    return this;
}
 
开发者ID:manoelcampos,项目名称:cloudsim-plus,代码行数:5,代码来源:CloudletSchedulerExperiment.java


示例19: createRandomGen

import org.cloudbus.cloudsim.distributions.ContinuousDistribution; //导入依赖的package包/类
/**
 * Creates a pseudo random number generator (PRNG) for a experiment run that
 * generates uniform values between [min and max[. If it is to apply the
 * {@link #isApplyAntitheticVariatesTechnique() "Antithetic Variates Technique"}
 * to reduce results variance, the second half of experiments will use the
 * seeds from the first half.
 *
 * @param experimentIndex
 * @param minValue the minimum value the generator will return (inclusive)
 * @param maxValue the maximum value the generator will return (exclusive)
 * @return the created PRNG
 *
 * @see UniformDistr#isApplyAntitheticVariatesTechnique()
 */
public ContinuousDistribution createRandomGen(int experimentIndex, double minValue, double maxValue) {
    if (isToReuseSeedFromFirstHalfOfExperiments(experimentIndex)) {
        final int expIndexFromFirstHalf = experimentIndex - halfSimulationRuns();
        return new UniformDistr(minValue, maxValue, seeds.get(expIndexFromFirstHalf))
                .setApplyAntitheticVariatesTechnique(true);
    }

    return new UniformDistr(minValue, maxValue, seeds.get(experimentIndex));
}
 
开发者ID:manoelcampos,项目名称:cloudsim-plus,代码行数:24,代码来源:ExperimentRunner.java


示例20: HostFaultInjection

import org.cloudbus.cloudsim.distributions.ContinuousDistribution; //导入依赖的package包/类
/**
 * Creates a fault injection mechanism for the Hosts of a given {@link Datacenter}.
 * The failures are randomly injected according to the given
 * mean of failures to be generated per <b>minute</b>,
 * which is also called <b>event rate</b> or <b>rate parameter</b>.
 *
 * @param datacenter the Datacenter to which failures will be randomly injected for its Hosts
 *
 * @param faultArrivalTimesGeneratorInHours a Pseudo Random Number Generator which generates the
 * times (in hours) Hosts failures will occur.
 * <b>The values returned by the generator will be considered to be hours</b>.
 * Frequently it is used a
 * {@link PoissonDistr} to generate failure arrivals, but any {@link ContinuousDistribution}
 * can be used.
 */
public HostFaultInjection(Datacenter datacenter, ContinuousDistribution faultArrivalTimesGeneratorInHours) {
    super(datacenter.getSimulation());
    this.setDatacenter(datacenter);
    this.lastFailedHost = Host.NULL;
    this.faultArrivalTimesGeneratorInHours = faultArrivalTimesGeneratorInHours;
    this.random = new UniformDistr(faultArrivalTimesGeneratorInHours.getSeed()+1);
    this.vmRecoveryTimeSecsMap = new HashMap<>();
    this.hostFaultsTimeSecsMap = new HashMap<>();
    this.faultsOfAllVmsByBroker = new HashMap<>();
    this.vmClonerMap = new HashMap<>();
    this.maxTimeToGenerateFailureInHours = Double.MAX_VALUE;
}
 
开发者ID:manoelcampos,项目名称:cloudsim-plus,代码行数:28,代码来源:HostFaultInjection.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Receiver类代码示例发布时间:2022-05-22
下一篇:
Java CollectionRegion类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap