本文整理汇总了Java中org.cloudbus.cloudsim.power.PowerHostUtilizationHistory类的典型用法代码示例。如果您正苦于以下问题:Java PowerHostUtilizationHistory类的具体用法?Java PowerHostUtilizationHistory怎么用?Java PowerHostUtilizationHistory使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PowerHostUtilizationHistory类属于org.cloudbus.cloudsim.power包,在下文中一共展示了PowerHostUtilizationHistory类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: createHostList
import org.cloudbus.cloudsim.power.PowerHostUtilizationHistory; //导入依赖的package包/类
/**
* Creates the host list.
*
* @param hostsNumber the hosts number
*
* @return the list< power host>
*/
public static List<PowerHost> createHostList(int hostsNumber) {
List<PowerHost> hostList = new ArrayList<PowerHost>();
for (int i = 0; i < hostsNumber; i++) {
int hostType = i % Constants.HOST_TYPES;
List<Pe> peList = new ArrayList<Pe>();
for (int j = 0; j < Constants.HOST_PES[hostType]; j++) {
peList.add(new Pe(j, new PeProvisionerSimple(Constants.HOST_MIPS[hostType])));
}
hostList.add(new PowerHostUtilizationHistory(
i,
new RamProvisionerSimple(Constants.HOST_RAM[hostType]),
new BwProvisionerSimple(Constants.HOST_BW),
Constants.HOST_STORAGE,
peList,
new VmSchedulerTimeSharedOverSubscription(peList),
Constants.HOST_POWER[hostType]));
}
return hostList;
}
开发者ID:Udacity2048,项目名称:CloudSimDisk,代码行数:29,代码来源:Helper.java
示例2: createHostList
import org.cloudbus.cloudsim.power.PowerHostUtilizationHistory; //导入依赖的package包/类
/**
* Creates the host list.
*
* @param hostsNumber the hosts number
*
* @return the list< power host>
*/
public static List<PowerHost> createHostList(int hostsNumber) {
List<PowerHost> hostList = new ArrayList<PowerHost>();
for (int i = 0; i < hostsNumber; i++) {
int hostType = i % Constants.HOST_TYPES;
List<Pe> peList = new ArrayList<Pe>();
//HOST_PES 每台物理机中的处理单元个数
for (int j = 0; j < Constants.HOST_PES[hostType]; j++) {
peList.add(new Pe(j, new PeProvisionerSimple(Constants.HOST_MIPS[hostType])));
}
hostList.add(new PowerHostUtilizationHistory(
i,
new RamProvisionerSimple(Constants.HOST_RAM[hostType]),
new BwProvisionerSimple(Constants.HOST_BW),
Constants.HOST_STORAGE,
peList,
new VmSchedulerTimeSharedOverSubscription(peList),
// 设置能耗模型
Constants.HOST_POWER[hostType]));
}
return hostList;
}
开发者ID:demiaowu,项目名称:annotation-of-cloudsim3.0.3,代码行数:31,代码来源:Helper.java
示例3: createHost
import org.cloudbus.cloudsim.power.PowerHostUtilizationHistory; //导入依赖的package包/类
private PowerHostUtilizationHistory createHost(Properties prop, int ram){
List<Pe> peList = new ArrayList<Pe>();
peList.add(new Pe(0, new PeProvisionerSimple(Double.parseDouble(prop.getProperty(Constant.MIPS)))));
HostProfile prof = HostProfile.getDefault();
prof.set(HostParams.RAM_AMOUNT_MB, Integer.toString(ram));
return HostProviderMetaScheduler.get(prof, peList);
}
开发者ID:ecarlini,项目名称:smartfed,代码行数:8,代码来源:SimpleTest.java
示例4: createHost
import org.cloudbus.cloudsim.power.PowerHostUtilizationHistory; //导入依赖的package包/类
private PowerHostUtilizationHistory createHost(Properties prop){
List<Pe> peList = new ArrayList<Pe>();
peList.add(new Pe(0, new PeProvisionerSimple(Double.parseDouble(prop.getProperty(Constant.MIPS)))));
HostProfile prof = HostProfile.getDefault();
prof.set(HostParams.RAM_AMOUNT_MB, ramAmount+"");
return HostProviderMetaScheduler.get(prof, peList);
}
开发者ID:ecarlini,项目名称:smartfed,代码行数:8,代码来源:EdgeTest.java
示例5: getDefault
import org.cloudbus.cloudsim.power.PowerHostUtilizationHistory; //导入依赖的package包/类
public static PowerHostUtilizationHistory getDefault(List<Pe> pes)
{
return createHost(HostProfile.getDefault(), pes);
}
开发者ID:ecarlini,项目名称:smartfed,代码行数:5,代码来源:HostProviderMetaScheduler.java
示例6: get
import org.cloudbus.cloudsim.power.PowerHostUtilizationHistory; //导入依赖的package包/类
public static PowerHostUtilizationHistory get(HostProfile profile, List<Pe> pes)
{
return createHost(profile, pes);
}
开发者ID:ecarlini,项目名称:smartfed,代码行数:5,代码来源:HostProviderMetaScheduler.java
注:本文中的org.cloudbus.cloudsim.power.PowerHostUtilizationHistory类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论