本文整理汇总了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);
}
示例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;
}
示例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);
}
示例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);
}
示例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);/***********/
}
示例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>();
}
示例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;
}
示例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>>());
}
示例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);
}
示例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;
}
示例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);
}
}
示例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
}
示例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);
}
示例14: getCloudletSchedulerClass
import org.cloudbus.cloudsim.CloudletScheduler; //导入依赖的package包/类
public Class<? extends CloudletScheduler> getCloudletSchedulerClass() {
return cloudletSchedulerClass;
}
示例15: setCloudletSchedulerClass
import org.cloudbus.cloudsim.CloudletScheduler; //导入依赖的package包/类
public void setCloudletSchedulerClass(Class<? extends CloudletScheduler> cloudletSchedulerClass) {
this.cloudletSchedulerClass = cloudletSchedulerClass;
}