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


Java PeProvisionerSimple类代码示例

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


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

示例1: createHostList

import org.cloudbus.cloudsim.provisioners.PeProvisionerSimple; //导入依赖的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.provisioners.PeProvisionerSimple; //导入依赖的package包/类
/**
 * Creates a list of hosts
 * 
 * @param hostsNumber
 *            the quantity of hosts
 * @return the list of hosts
 */
public static List<Host> createHostList(int hostsNumber) {
	List<Host> hostList = new LinkedList<Host>();
	for (int i = 0; i < hostsNumber; i++) {
		List<Pe> peList = new ArrayList<Pe>();
		for (int j = 0; j < SimulationConstants.HOST_NUMBER_OF_PES; j++) {
			peList.add(new Pe(j, new PeProvisionerSimple(SimulationConstants.HOST_MIPS)));
		}

		try {
			hostList.add(new PSHost(i, new RamProvisionerSimple(SimulationConstants.HOST_RAM),
					new BwProvisionerSimple(SimulationConstants.HOST_BW), SimulationConstants.HOST_STORAGE, peList,
					SimulationConstants.BROKER_VM_SCHEDULER.getConstructor(List.class).newInstance(peList)));
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	return hostList;
}
 
开发者ID:raphaeldeaquino,项目名称:mcloudsim,代码行数:26,代码来源:Helper.java

示例3: createHostList

import org.cloudbus.cloudsim.provisioners.PeProvisionerSimple; //导入依赖的package包/类
/**
 * Creates a list of hosts
 * 
 * @param numHosts
 *            how many hosts to be created
 * @return the list of hosts
 * @throws SimulationCreationException
 */
public static List<Host> createHostList(int numHosts) throws SimulationCreationException {
	List<Host> hostList = new LinkedList<Host>();
	for (int i = 0; i < numHosts; i++) {
		List<Pe> peList = new ArrayList<Pe>();
		for (int j = 0; j < SimulationConstants.HOST_NUMBER_OF_PES; j++) {
			peList.add(new Pe(j, new PeProvisionerSimple(SimulationConstants.HOST_MIPS)));
		}

		try {
			hostList.add(new PSHost(i, new RamProvisionerSimple(SimulationConstants.HOST_RAM),
					new BwProvisionerSimple(SimulationConstants.HOST_BW), SimulationConstants.HOST_STORAGE, peList,
					SimulationConstants.BROKER_VM_SCHEDULER.getConstructor(List.class).newInstance(peList)));
		} catch (Exception e) {
			throw new SimulationCreationException(e.getMessage(), e);
		}
	}
	return hostList;
}
 
开发者ID:raphaeldeaquino,项目名称:mcloudsim,代码行数:27,代码来源:PSNetworkCreator.java

示例4: createHostList

import org.cloudbus.cloudsim.provisioners.PeProvisionerSimple; //导入依赖的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

示例5: createHost

import org.cloudbus.cloudsim.provisioners.PeProvisionerSimple; //导入依赖的package包/类
private Host createHost(int hostId) {
    long  mips = 1000; // capacity of each CPU core (in Million Instructions per Second)
    long  ram = 2048; // host memory (MEGABYTE)
    long storage = 1000000; // host storage (MEGABYTE)
    long bw = 10000; //in Megabits/s
    final int numberOfPes = 4;

    List<Pe> peList = new ArrayList<>(numberOfPes); //List of CPU cores
    for(int i = 0; i < numberOfPes; i++) {
        peList.add(new PeSimple(mips, new PeProvisionerSimple()));
    }

    return new HostSimple(ram, bw, storage, peList)
        .setRamProvisioner(new ResourceProvisionerSimple())
        .setBwProvisioner(new ResourceProvisionerSimple())
        .setVmScheduler(new VmSchedulerTimeShared());
}
 
开发者ID:manoelcampos,项目名称:cloudsim-plus,代码行数:18,代码来源:ParallelSimulationsExample.java

示例6: createPowerHost

import org.cloudbus.cloudsim.provisioners.PeProvisionerSimple; //导入依赖的package包/类
private PowerHostUtilizationHistory createPowerHost() {
    final List<Pe> peList = new ArrayList<>(HOST_PES);
    //List of Host's CPUs (Processing Elements, PEs)
    for (int i = 0; i < HOST_PES; i++) {
        peList.add(new PeSimple(1000, new PeProvisionerSimple()));
    }

    final PowerModel powerModel = new PowerModelLinear(MAX_POWER, STATIC_POWER_PERCENT);

    final long ram = 2048; //in Megabytes
    final long bw = 10000; //in Megabits/s
    final long storage = 1000000; //in Megabytes
    final ResourceProvisioner ramProvisioner = new ResourceProvisionerSimple();
    final ResourceProvisioner bwProvisioner = new ResourceProvisionerSimple();
    final VmScheduler vmScheduler = new VmSchedulerTimeShared();

    final PowerHostUtilizationHistory host = new PowerHostUtilizationHistory(ram, bw, storage, peList);
    host.setPowerModel(powerModel);
    host
        .setRamProvisioner(ramProvisioner)
        .setBwProvisioner(bwProvisioner)
        .setVmScheduler(vmScheduler);
    return host;
}
 
开发者ID:manoelcampos,项目名称:cloudsim-plus,代码行数:25,代码来源:PowerExample.java

示例7: createHost

import org.cloudbus.cloudsim.provisioners.PeProvisionerSimple; //导入依赖的package包/类
private Host createHost() {
    final long mips = 1000; // capacity of each CPU core (in Million Instructions per Second)
    final long ram = 2048; // in Megabytes
    final long storage = 1000000; // in Megabytes
    final long bw = 10000; //in Megabits/s

    List<Pe> peList = new ArrayList<>();
    /*Creates the Host's CPU cores and defines the provisioner
    used to allocate each core for requesting VMs.*/
    for(int i = 0; i < HOST_PES_NUM; i++){
        peList.add(new PeSimple(HOST_MIPS, new PeProvisionerSimple()));
    }

    return new HostSimple(ram, bw, storage, peList)
        .setRamProvisioner(new ResourceProvisionerSimple())
        .setBwProvisioner(new ResourceProvisionerSimple())
        .setVmScheduler(new VmSchedulerTimeShared());
}
 
开发者ID:manoelcampos,项目名称:cloudsim-plus,代码行数:19,代码来源:SharingHostPEsUsingVmSchedulerTimeSharedExample.java

示例8: createHost

import org.cloudbus.cloudsim.provisioners.PeProvisionerSimple; //导入依赖的package包/类
/**
 * Creates a host with pre-defined configuration.
 *
 * @param id The Host id
 * @return the created host
 */
private Host createHost(int id) {
    List<Pe> peList = new ArrayList<>();
    long mips = 1000;
    for(int i = 0; i < HOST_PES_NUMBER; i++){
        peList.add(new PeSimple(mips, new PeProvisionerSimple()));
    }
    long ram = 2048; // host memory (MEGABYTE)
    long storage = 1000000; // host storage (MEGABYTE)
    long bw = 10000; //Megabits/s

   return new HostSimple(ram, bw, storage, peList)
       .setRamProvisioner(new ResourceProvisionerSimple())
       .setBwProvisioner(new ResourceProvisionerSimple())
        .setVmScheduler(new VmSchedulerSpaceShared());

}
 
开发者ID:manoelcampos,项目名称:cloudsim-plus,代码行数:23,代码来源:DynamicCloudletsArrival1.java

示例9: createHost

import org.cloudbus.cloudsim.provisioners.PeProvisionerSimple; //导入依赖的package包/类
private Host createHost() {
    long  mips = 1000; // capacity of each CPU core (in Million Instructions per Second)
    long  ram = 2048; // host memory (MEGABYTE)
    long storage = 1000000; // host storage (MEGABYTE)
    long bw = 10000; //in Megabits/s

    List<Pe> peList = new ArrayList<>(); //List of CPU cores

    /*Creates the Host's CPU cores and defines the provisioner
    used to allocate each core for requesting VMs.*/
    for (int i = 0; i < 2; i++) {
        peList.add(new PeSimple(mips, new PeProvisionerSimple()));
    }

    return new HostSimple(ram, bw, storage, peList)
        .setRamProvisioner(new ResourceProvisionerSimple())
        .setBwProvisioner(new ResourceProvisionerSimple())
            .setVmScheduler(new VmSchedulerTimeShared());
}
 
开发者ID:manoelcampos,项目名称:cloudsim-plus,代码行数:20,代码来源:CustomUtilizationModelExample.java

示例10: createHost

import org.cloudbus.cloudsim.provisioners.PeProvisionerSimple; //导入依赖的package包/类
private Host createHost() {
    List<Pe> peList = new ArrayList<>(HOST_PES);
    //List of Host's CPUs (Processing Elements, PEs)
    for (int i = 0; i < HOST_PES; i++) {
        peList.add(new PeSimple(1000, new PeProvisionerSimple()));
    }

    final long ram = 2048; //in Megabytes
    final long bw = 10000; //in Megabits/s
    final long storage = 1000000; //in Megabytes
    ResourceProvisioner ramProvisioner = new ResourceProvisionerSimple();
    ResourceProvisioner bwProvisioner = new ResourceProvisionerSimple();
    VmScheduler vmScheduler = new VmSchedulerTimeShared();
    Host host = new HostSimple(ram, bw, storage, peList);
    host
        .setRamProvisioner(ramProvisioner)
        .setBwProvisioner(bwProvisioner)
        .setVmScheduler(vmScheduler);
    return host;
}
 
开发者ID:manoelcampos,项目名称:cloudsim-plus,代码行数:21,代码来源:MultipleBrokers1.java

示例11: createHost

import org.cloudbus.cloudsim.provisioners.PeProvisionerSimple; //导入依赖的package包/类
/**
 * Creates a Host.
 *
 * @return
 */
public Host createHost() {
    List<Pe> pesList = new ArrayList<>(HOST_PES);
    for (int i = 0; i < HOST_PES; i++) {
        pesList.add(new PeSimple(HOST_MIPS_BY_PE, new PeProvisionerSimple()));
    }

    ResourceProvisioner ramProvisioner = new ResourceProvisionerSimple();
    ResourceProvisioner bwProvisioner = new ResourceProvisionerSimple();
    VmScheduler vmScheduler = new VmSchedulerTimeShared();
    final int id = hostList.size();
    return new HostSimple(HOST_RAM, HOST_BW, HOST_STORAGE, pesList)
            .setRamProvisioner(ramProvisioner)
            .setBwProvisioner(bwProvisioner)
            .setVmScheduler(vmScheduler);
}
 
开发者ID:manoelcampos,项目名称:cloudsim-plus,代码行数:21,代码来源:HostFaultInjectionExample1.java

示例12: createHost

import org.cloudbus.cloudsim.provisioners.PeProvisionerSimple; //导入依赖的package包/类
/**
 * Creates a host with pre-defined configuration.
 *
 * @param id The Host id
 * @return the created host
 */
private Host createHost(int id) {
    List<Pe> peList = new ArrayList<>();
    long mips = 1000;
    for(int i = 0; i < HOST_PES_NUMBER; i++){
        peList.add(new PeSimple(mips, new PeProvisionerSimple()));
    }
    long ram = 2048; // in Megabytes
    long storage = 1000000; // in Megabytes
    long bw = 10000; //in Megabits/s

    return new HostSimple(ram, bw, storage, peList)
        .setRamProvisioner(new ResourceProvisionerSimple())
        .setBwProvisioner(new ResourceProvisionerSimple())
        .setVmScheduler(new VmSchedulerSpaceShared());
}
 
开发者ID:manoelcampos,项目名称:cloudsim-plus,代码行数:22,代码来源:DynamicCloudletsArrival2.java

示例13: createHost

import org.cloudbus.cloudsim.provisioners.PeProvisionerSimple; //导入依赖的package包/类
private Host createHost() {
    long  mips = 1000; // capacity of each CPU core (in Million Instructions per Second)
    long  ram = 2048; // host memory (MEGABYTE)
    long storage = 1000000; // host storage (MEGABYTE)
    long bw = 10000; //in Megabits/s

    final int numberOfPes = 8;
    List<Pe> peList = new ArrayList<>(numberOfPes); //List of CPU cores
    for (int i = 0; i < numberOfPes; i++) {
        peList.add(new PeSimple(mips, new PeProvisionerSimple()));
    }

    return new HostSimple(ram, bw, storage, peList)
        .setRamProvisioner(new ResourceProvisionerSimple())
        .setBwProvisioner(new ResourceProvisionerSimple())
            .setVmScheduler(new VmSchedulerTimeShared());
}
 
开发者ID:manoelcampos,项目名称:cloudsim-plus,代码行数:18,代码来源:DynamicCreationOfVmsAndCloudletsExample.java

示例14: createHosts

import org.cloudbus.cloudsim.provisioners.PeProvisionerSimple; //导入依赖的package包/类
private HostDynamicWorkloadSimple createHosts(int pesNumber, long mips, int hostId) {
    List<Pe> peList = new ArrayList<>();
    for (int i = 0; i < pesNumber; i++) {
        peList.add(new PeSimple(mips, new PeProvisionerSimple()));
    }

    long ram = 2048; //host memory (MEGABYTE)
    long storage = 1000000; //host storage (MEGABYTE)
    long bw = 10000; //Megabits/s

    HostDynamicWorkloadSimple host = new HostDynamicWorkloadSimple(ram, bw, storage, peList);
    host
        .setRamProvisioner(new ResourceProvisionerSimple())
        .setBwProvisioner(new ResourceProvisionerSimple())
        .setVmScheduler(new VmSchedulerTimeShared());
    return host;
}
 
开发者ID:manoelcampos,项目名称:cloudsim-plus,代码行数:18,代码来源:HostsCpuUsageExample.java

示例15: createHost

import org.cloudbus.cloudsim.provisioners.PeProvisionerSimple; //导入依赖的package包/类
private Host createHost() {
    long  mips = 1000; // capacity of each CPU core (in Million Instructions per Second)
    long  ram = 2048; // host memory (MEGABYTE)
    long storage = 1000000; // host storage (MEGABYTE)
    long bw = 10000; //in Megabits/s

    List<Pe> peList = new ArrayList<>(); //List of CPU cores

    /*Creates the Host's CPU cores and defines the provisioner
    used to allocate each core for requesting VMs.*/
    peList.add(new PeSimple(mips, new PeProvisionerSimple()));

    return new HostSimple(ram, bw, storage, peList)
        .setRamProvisioner(new ResourceProvisionerSimple())
        .setBwProvisioner(new ResourceProvisionerSimple())
            .setVmScheduler(new VmSchedulerTimeShared());
}
 
开发者ID:manoelcampos,项目名称:cloudsim-plus,代码行数:18,代码来源:PauseSimulationAtGivenTimeExample2.java


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