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


Java CloudletScheduler类代码示例

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


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

示例1: PowerVm

import org.cloudbus.cloudsim.CloudletScheduler; //导入依赖的package包/类
/**
 * Instantiates a new power vm.
 * 
 * @param id the id
 * @param userId the user id
 * @param mips the mips
 * @param pesNumber the pes number
 * @param ram the ram
 * @param bw the bw
 * @param size the size
 * @param priority the priority
 * @param vmm the vmm
 * @param cloudletScheduler the cloudlet scheduler
 * @param schedulingInterval the scheduling interval
 */
public PowerVm(
		final int id,
		final int userId,
		final double mips,
		final int pesNumber,
		final int ram,
		final long bw,
		final long size,
		final int priority,
		final String vmm,
		final CloudletScheduler cloudletScheduler,
		final double schedulingInterval) {
	super(id, userId, mips, pesNumber, ram, bw, size, vmm, cloudletScheduler);
	setSchedulingInterval(schedulingInterval);
}
 
开发者ID:gmartinezramirez,项目名称:Fog-Computing-Mobile-Architecture,代码行数:31,代码来源:PowerVm.java

示例2: createVmList

import org.cloudbus.cloudsim.CloudletScheduler; //导入依赖的package包/类
/**
 * Creates a list of VMs
 * 
 * @param configuration
 *            the configuration used to create VMs
 * @param vmsNumber
 *            the quantity of created VMs
 * @param userId
 *            the VM owner
 * @return the list of VMs
 */
public static List<Vm> createVmList(VmConfiguration configuration, int vmsNumber, int userId) {
	List<Vm> vms = new LinkedList<Vm>();
	CloudletScheduler cloudletScheduler = null;
	try {
		Class<? extends CloudletScheduler> classType = configuration.getCloudletSchedulerClass();
		cloudletScheduler = classType.getConstructor().newInstance();
	} catch (Exception e) {
		e.printStackTrace();
		System.exit(-1);
	}
	for (int i = 0; i < vmsNumber; i++) {
		vms.add(new Vm(i, userId, configuration.getMips(), configuration.getNumberOfPes(),
				(int) configuration.getRam(), (int) configuration.getBw(), (int) configuration.getSize(),
				configuration.getVmm(), cloudletScheduler));
	}
	return vms;
}
 
开发者ID:raphaeldeaquino,项目名称:mcloudsim,代码行数:29,代码来源:Helper.java

示例3: PowerVm

import org.cloudbus.cloudsim.CloudletScheduler; //导入依赖的package包/类
/**
 * Instantiates a new power vm.
 * 
 * @param id the id
 * @param userId the user id
 * @param mips the mips
 * @param pesNumber the pes number
 * @param ram the ram
 * @param bw the bw
 * @param size the size
 * @param priority the priority
 * @param vmm the vmm
 * @param cloudletScheduler the cloudlet scheduler
 * @param schedulingInterval the scheduling interval
 */
public PowerVm(
		final int id,
		final int userId,
		final double mips,
		final int pesNumber,
		final int ram,
		final long bw,
		final long size,
		final int priority, //这次参数并没有被使用
		final String vmm,
		final CloudletScheduler cloudletScheduler,
		final double schedulingInterval) {
	super(id, userId, mips, pesNumber, ram, bw, size, vmm, cloudletScheduler);
	setSchedulingInterval(schedulingInterval);
}
 
开发者ID:demiaowu,项目名称:annotation-of-cloudsim3.0.3,代码行数:31,代码来源:PowerVm.java

示例4: PowerVm

import org.cloudbus.cloudsim.CloudletScheduler; //导入依赖的package包/类
/**
 * Instantiates a new power vm.
 * 
 * @param id the id
 * @param userId the user id
 * @param mips the mips
 * @param pesNumber the pes number
 * @param ram the ram
 * @param bw the bw
 * @param size the size
 * @param priority the priority
 * @param vmm the vmm
 * @param cloudletScheduler the cloudlet scheduler
 * @param schedulingInterval the scheduling interval
 */
public PowerVm(
		int id,
		int userId,
		double mips,
		int pesNumber,
		int ram,
		long bw,
		long size,
		int priority,
		String vmm,
		CloudletScheduler cloudletScheduler,
		double schedulingInterval) {
	super(id, userId, mips, pesNumber, ram, bw, size, vmm, cloudletScheduler);
	setSchedulingInterval(schedulingInterval);
}
 
开发者ID:marcbux,项目名称:dynamiccloudsim,代码行数:31,代码来源:PowerVm.java

示例5: SoheilSimVm

import org.cloudbus.cloudsim.CloudletScheduler; //导入依赖的package包/类
/**
 * Creates a new VMCharacteristics object.
 * 
 * @param id unique ID of the VM
 * @param userId ID of the VM's owner
 * @param mips the mips
 * @param numberOfPes amount of CPUs
 * @param ram amount of ram
 * @param bw amount of bandwidth
 * @param size amount of storage
 * @param vmm virtual machine monitor
 * @param cloudletScheduler cloudletScheduler policy for cloudlets
 * @pre id >= 0
 * @pre userId >= 0
 * @pre size > 0
 * @pre ram > 0
 * @pre bw > 0
 * @pre cpus > 0
 * @pre priority >= 0
 * @pre cloudletScheduler != null
 * @post $none
 */
public SoheilSimVm(
		int id,
		int userId,
		double mips,
		int numberOfPes,
		int ram,
		long bw,
		long size,
		String vmm,
		CloudletScheduler cloudletScheduler) {

	 super(
				 id,
				 userId,
				 mips,
				 numberOfPes,
				 ram,
				 bw,
				 size,
				 vmm,
				cloudletScheduler);
	
	setSubmissionTime(0);/***********/

}
 
开发者ID:tuwiendsg,项目名称:CAPT,代码行数:48,代码来源:SoheilSimVm.java

示例6: NetworkVm

import org.cloudbus.cloudsim.CloudletScheduler; //导入依赖的package包/类
public NetworkVm(
		int id,
		int userId,
		double mips,
		int pesNumber,
		int ram,
		long bw,
		long size,
		String vmm,
		CloudletScheduler cloudletScheduler) {
	super(id, userId, mips, pesNumber, ram, bw, size, vmm, cloudletScheduler);

	cloudletlist = new ArrayList<NetworkCloudlet>();
}
 
开发者ID:gmartinezramirez,项目名称:Fog-Computing-Mobile-Architecture,代码行数:15,代码来源:NetworkVm.java

示例7: TimedVm

import org.cloudbus.cloudsim.CloudletScheduler; //导入依赖的package包/类
public TimedVm(int id, int userId, double mips, int numberOfPes, int ram,
		long bw, long size, String vmm, CloudletScheduler cloudletScheduler, double startTime, double finishTime) {
	super(id, userId, mips, numberOfPes, ram, bw, size, vmm, cloudletScheduler);

	this.startTime = startTime;
	this.finishTime = finishTime;
}
 
开发者ID:gmartinezramirez,项目名称:Fog-Computing-Mobile-Architecture,代码行数:8,代码来源:TimedVm.java

示例8: AppModule

import org.cloudbus.cloudsim.CloudletScheduler; //导入依赖的package包/类
public AppModule(
		int id,
		String name,
		String appId,
		int userId,
		double mips,
		int ram,
		long bw,
		long size,
		String vmm,
		CloudletScheduler cloudletScheduler,
		Map<Pair<String, String>, SelectivityModel> selectivityMap) {
	super(id, userId, mips, 1, ram, bw, size, 1, vmm, cloudletScheduler, 300);
	setName(name);
	setId(id);
	setAppId(appId);
	setUserId(userId);
	setUid(getUid(userId, id));
	setMips(mips);
	setNumberOfPes(1);
	setRam(ram);
	setBw(bw);
	setSize(size);
	setVmm(vmm);
	setCloudletScheduler(cloudletScheduler);
	setInMigration(false);
	setBeingInstantiated(true);
	setCurrentAllocatedBw(0);
	setCurrentAllocatedMips(null);
	setCurrentAllocatedRam(0);
	setCurrentAllocatedSize(0);
	setSelectivityMap(selectivityMap);
	setActuatorSubscriptions(new HashMap<String, List<Integer>>());
	setNumInstances(0);
	setDownInstanceIdsMaps(new HashMap<String, List<Integer>>());
}
 
开发者ID:gmartinezramirez,项目名称:Fog-Computing-Mobile-Architecture,代码行数:37,代码来源:AppModule.java

示例9: VmConfiguration

import org.cloudbus.cloudsim.CloudletScheduler; //导入依赖的package包/类
public VmConfiguration(double mips, int numberOfPes, double ram, long bw, double size, String vmm,
		Class<? extends CloudletScheduler> cloudletSchedulerClass) {
	this.setMips(mips);
	this.setNumberOfPes(numberOfPes);
	this.setRam(ram);
	this.setBw(bw);
	this.setSize(size);
	this.setVmm(vmm);
	this.setCloudletSchedulerClass(cloudletSchedulerClass);
}
 
开发者ID:raphaeldeaquino,项目名称:mcloudsim,代码行数:11,代码来源:VmConfiguration.java

示例10: SDNVm

import org.cloudbus.cloudsim.CloudletScheduler; //导入依赖的package包/类
public SDNVm(int id, int userId, double mips, int numberOfPes, int ram,
		long bw, long size, String vmm, CloudletScheduler cloudletScheduler, double startTime, double finishTime) {
	super(id, userId, mips, numberOfPes, ram, bw, size, vmm, cloudletScheduler);

	this.startTime = startTime;
	this.finishTime = finishTime;
}
 
开发者ID:jayjmin,项目名称:cloudsimsdn,代码行数:8,代码来源:SDNVm.java

示例11: DynamicVm

import org.cloudbus.cloudsim.CloudletScheduler; //导入依赖的package包/类
public DynamicVm(int id, int userId, double numberOfCusPerPe, int numberOfPes, int ram, long storage, String vmm, CloudletScheduler cloudletScheduler,
    DynamicModel dynamicModel, String performanceLogFileName, int taskSlots) {
	super(id, userId, -1, numberOfPes, ram, -1, storage, vmm, cloudletScheduler);
	setNumberOfCusPerPe(numberOfCusPerPe);
	setDynamicModel(dynamicModel);
	setCoefficients();
	previousTime = CloudSim.clock();
	this.taskSlots = taskSlots;
	if (Parameters.outputVmPerformanceLogs) {
		try {
			File file = new File(performanceLogFileName);
			file.getParentFile().mkdirs();
			performanceLog = new BufferedWriter(new FileWriter(file));
			performanceLog.write("time");
			String[] resources = { "mips", "iops", "bwps" };
			for (String resource : resources) {
				for (int i = 0; i < taskSlots; i++) {
					performanceLog.write("," + resource + " task slot " + i);
				}
				performanceLog.write("," + resource + " unassigned");
			}
			performanceLog.write("\n");
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	if (cloudletScheduler instanceof CloudletSchedulerGreedyDivided) {
		CloudletSchedulerGreedyDivided cloudletSchedulerGreedyDivided = (CloudletSchedulerGreedyDivided) cloudletScheduler;
		cloudletSchedulerGreedyDivided.setVm(this);
	}
}
 
开发者ID:marcbux,项目名称:dynamiccloudsim,代码行数:32,代码来源:DynamicVm.java

示例12: PowerVmExtra

import org.cloudbus.cloudsim.CloudletScheduler; //导入依赖的package包/类
public PowerVmExtra(int id, int userId, double mips, int pesNumber,
		int ram, long bw, long size, int priority, String vmm,
		CloudletScheduler cloudletScheduler, double schedulingInterval,double deadline,double maxMips,double minMips) {
	super(id, userId, mips, pesNumber, ram, bw, size, priority, vmm,
			cloudletScheduler, schedulingInterval);
	this.setDeadline(deadline);
	this.setMaxMips(maxMips);
	this.setMinMips(minMips);		
	// TODO Auto-generated constructor stub
}
 
开发者ID:StVak,项目名称:cloudsimPowerStats,代码行数:11,代码来源:PowerVmExtra.java

示例13: EdgeVM

import org.cloudbus.cloudsim.CloudletScheduler; //导入依赖的package包/类
public EdgeVM(int id, int userId, double mips, int numberOfPes, int ram,
		long bw, long size, String vmm, CloudletScheduler cloudletScheduler) {
	super(id, userId, mips, numberOfPes, ram, bw, size, vmm, cloudletScheduler);

}
 
开发者ID:CagataySonmez,项目名称:EdgeCloudSim,代码行数:6,代码来源:EdgeVM.java

示例14: getCloudletSchedulerClass

import org.cloudbus.cloudsim.CloudletScheduler; //导入依赖的package包/类
public Class<? extends CloudletScheduler> getCloudletSchedulerClass() {
	return cloudletSchedulerClass;
}
 
开发者ID:raphaeldeaquino,项目名称:mcloudsim,代码行数:4,代码来源:VmConfiguration.java

示例15: setCloudletSchedulerClass

import org.cloudbus.cloudsim.CloudletScheduler; //导入依赖的package包/类
public void setCloudletSchedulerClass(Class<? extends CloudletScheduler> cloudletSchedulerClass) {
	this.cloudletSchedulerClass = cloudletSchedulerClass;
}
 
开发者ID:raphaeldeaquino,项目名称:mcloudsim,代码行数:4,代码来源:VmConfiguration.java


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