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


Java UtilizationModel类代码示例

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


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

示例1: createCloudlet

import org.cloudbus.cloudsim.UtilizationModel; //导入依赖的package包/类
private static List<Cloudlet> createCloudlet(int userId, int cloudlets){
	// Creates a container to store Cloudlets
	LinkedList<Cloudlet> list = new LinkedList<Cloudlet>();

	//cloudlet parameters
	long length ;
	long fileSize = 300;
	long outputSize = 300;
	int pesNumber = 1;
	UtilizationModel utilizationModel = new UtilizationModelFull();
	Random r1 = new Random(1);
	// Random r2 = new Random(2);
	Cloudlet[] cloudlet = new Cloudlet[cloudlets];

	for(int i=0;i<cloudlets;i++){
		length = 100 + r1.nextInt(900);
		// fileSize = 100 + r2.nextInt(200);
		cloudlet[i] = new Cloudlet(i, length, pesNumber, fileSize, outputSize, utilizationModel, utilizationModel, utilizationModel);
		// setting the owner of these Cloudlets
		cloudlet[i].setUserId(userId);
		list.add(cloudlet[i]);
	}

	return list;
}
 
开发者ID:sidjee,项目名称:Ant-Colony-Optimization-Framework,代码行数:26,代码来源:graphImplement.java

示例2: NetworkCloudlet

import org.cloudbus.cloudsim.UtilizationModel; //导入依赖的package包/类
public NetworkCloudlet(
		int cloudletId,
		long cloudletLength,
		int pesNumber,
		long cloudletFileSize,
		long cloudletOutputSize,
		long memory,
		UtilizationModel utilizationModelCpu,
		UtilizationModel utilizationModelRam,
		UtilizationModel utilizationModelBw) {
	super(
			cloudletId,
			cloudletLength,
			pesNumber,
			cloudletFileSize,
			cloudletOutputSize,
			utilizationModelCpu,
			utilizationModelRam,
			utilizationModelBw);

	currStagenum = -1;
	this.memory = memory;
	stages = new ArrayList<TaskStage>();
}
 
开发者ID:gmartinezramirez,项目名称:Fog-Computing-Mobile-Architecture,代码行数:25,代码来源:NetworkCloudlet.java

示例3: createJob

import org.cloudbus.cloudsim.UtilizationModel; //导入依赖的package包/类
/**
 * Creates a Gridlet with the given information and adds to the list
 * 
 * @param id a Gridlet ID
 * @param submitTime Gridlet's submit time
 * @param runTime Gridlet's run time
 * @param numProc number of processors
 * @param reqRunTime user estimated run time
 * @param userID user id
 * @param groupID user's group id
 * @pre id >= 0
 * @pre submitTime >= 0
 * @pre runTime >= 0
 * @pre numProc > 0
 * @post $none
 */
private void createJob(
		final int id,
		final long submitTime,
		final int runTime,
		final int numProc,
		final int reqRunTime,
		final int userID,
		final int groupID) {
	// create the cloudlet
	final int len = runTime * rating;
	UtilizationModel utilizationModel = new UtilizationModelFull();
	final Cloudlet wgl = new Cloudlet(
			id,
			len,
			numProc,
			0,
			0,
			utilizationModel,
			utilizationModel,
			utilizationModel);
	jobs.add(wgl);
}
 
开发者ID:gmartinezramirez,项目名称:Fog-Computing-Mobile-Architecture,代码行数:39,代码来源:WorkloadFileReader.java

示例4: PSCloudlet

import org.cloudbus.cloudsim.UtilizationModel; //导入依赖的package包/类
public PSCloudlet(int cloudletId, String pathId, String brokerId, long cloudletLength, long bytes, int pesNumber,
		long cloudletFileSize, long cloudletOutputSize, UtilizationModel utilizationModelCpu,
		UtilizationModel utilizationModelRam, UtilizationModel utilizationModelBw, cloudletType type,
		double arrivalTime) {
	super(cloudletId, cloudletLength, pesNumber, cloudletFileSize, cloudletOutputSize, utilizationModelCpu,
			utilizationModelRam, utilizationModelBw);
	this.bytes = Math.max(1, bytes);
	this.pathId = pathId;
	this.brokerId = brokerId;
	this.type = type;
	this.arrivalTime = arrivalTime;
	this.transmissionIndex = -1;
	// Normally, a Cloudlet is only executed on a resource without being
	// migrated to others. Hence, to reduce memory consumption, set the
	// size of this ArrayList to be less than the default one.
	transmissionResList = new ArrayList<TransmissionResource>(2);
}
 
开发者ID:raphaeldeaquino,项目名称:mcloudsim,代码行数:18,代码来源:PSCloudlet.java

示例5: createCloudlet

import org.cloudbus.cloudsim.UtilizationModel; //导入依赖的package包/类
private static List<Cloudlet> createCloudlet(int userId, int cloudlets){
	// Creates a container to store Cloudlets
	LinkedList<Cloudlet> list = new LinkedList<Cloudlet>();

	//cloudlet parameters
	long length = 1000;
	long fileSize = 300;
	long outputSize = 300;
	int pesNumber = 1;
	UtilizationModel utilizationModel = new UtilizationModelFull();

	Cloudlet[] cloudlet = new Cloudlet[cloudlets];

	for(int i=0;i<cloudlets;i++){
		cloudlet[i] = new Cloudlet(i, length, pesNumber, fileSize, outputSize, utilizationModel, utilizationModel, utilizationModel);
		// setting the owner of these Cloudlets
		cloudlet[i].setUserId(userId);
		list.add(cloudlet[i]);
	}

	return list;
}
 
开发者ID:Udacity2048,项目名称:CloudSimDisk,代码行数:23,代码来源:CloudSimExample6.java

示例6: createCloudlet

import org.cloudbus.cloudsim.UtilizationModel; //导入依赖的package包/类
private static List<Cloudlet> createCloudlet(int userId, int cloudlets, int idShift){
	// Creates a container to store Cloudlets
	LinkedList<Cloudlet> list = new LinkedList<Cloudlet>();

	//cloudlet parameters
	long length = 40000;
	long fileSize = 300;
	long outputSize = 300;
	int pesNumber = 1;
	UtilizationModel utilizationModel = new UtilizationModelFull();

	Cloudlet[] cloudlet = new Cloudlet[cloudlets];

	for(int i=0;i<cloudlets;i++){
		cloudlet[i] = new Cloudlet(idShift + i, length, pesNumber, fileSize, outputSize, utilizationModel, utilizationModel, utilizationModel);
		// setting the owner of these Cloudlets
		cloudlet[i].setUserId(userId);
		list.add(cloudlet[i]);
	}

	return list;
}
 
开发者ID:Udacity2048,项目名称:CloudSimDisk,代码行数:23,代码来源:CloudSimExample7.java

示例7: createCloudlet

import org.cloudbus.cloudsim.UtilizationModel; //导入依赖的package包/类
private static List<Cloudlet> createCloudlet(int userId, int cloudlets, int idShift) {
	// Creates a container to store Cloudlets
	LinkedList<Cloudlet> list = new LinkedList<Cloudlet>();
	
	// cloudlet parameters
	long length = 40000;
	long fileSize = 300;
	long outputSize = 300;
	int pesNumber = 1;
	UtilizationModel utilizationModel = new UtilizationModelFull();
	
	Cloudlet[] cloudlet = new Cloudlet[cloudlets];
	
	for (int i = 0; i < cloudlets; i++) {
		cloudlet[i] = new Cloudlet(idShift + i, length, pesNumber, fileSize, outputSize,
				utilizationModel, utilizationModel, utilizationModel);
		// setting the owner of these Cloudlets
		cloudlet[i].setUserId(userId);
		list.add(cloudlet[i]);
	}
	
	return list;
}
 
开发者ID:Udacity2048,项目名称:CloudSimDisk,代码行数:24,代码来源:CloudSimExample8.java


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