cloudsim-plus-master/cloudsim-plus-master/cloudsim-plus-examples/src/main/java/org/cloudbus/cloudsim/examples/power/planetlab/NonPowerAware.java
public static void main(String[] args) throws IOException {
		final String experimentName = "planetlab_npa";
		final String outputFolder = "output";
        String inputFolder =  ResourceLoader.getResourcePath(NonPowerAware.class,"workload/planetlab/20110303");
        if(Objects.isNull(inputFolder)){
            inputFolder = "";
        }

		Log.setDisabled(!Constants.ENABLE_OUTPUT);
		Log.printLine("Starting " + experimentName);

		try {
            simulation = new CloudSim();
            Helper helper = new Helper(simulation, experimentName, Constants.OUTPUT_CSV, outputFolder);

			DatacenterBroker broker = helper.createBroker(simulation);

			List<Cloudlet> cloudletList = PlanetLabRunner.createCloudletListPlanetLab(broker, inputFolder);
			List<Vm> vmList = helper.createVmList(broker, cloudletList.size());
			List<PowerHost> hostList = helper.createHostList(NUMBER_OF_HOSTS);

			PowerDatacenterNonPowerAware datacenter = (PowerDatacenterNonPowerAware) helper.createDatacenter(
                PowerDatacenterNonPowerAware.class, hostList,
                new PowerVmAllocationPolicySimple());

			datacenter.setMigrationsEnabled(false);

			broker.submitVmList(vmList);
			broker.submitCloudletList(cloudletList);

			simulation.terminateAt(Constants.SIMULATION_LIMIT);
			double lastClock = simulation.start();

			List<Cloudlet> newList = broker.getCloudletFinishedList();
			Log.printLine("Received " + newList.size() + " cloudlets");

            helper.printResults(datacenter, vmList, lastClock);
		} catch (Exception e) {
			e.printStackTrace();
			Log.printLine("The simulation has been terminated due to an unexpected error");
			System.exit(0);
		}

		Log.printLine("Finished " + experimentName);
	}
/**
	 * The main method.
	 *
	 * @param args the arguments
	 * @throws IOException Signals that an I/O exception has occurred.
	 */
The main method.
@param args the arguments
@throws IOException Signals that an I/O exception has occurred.
The main method . @param args the arguments @throws IOException Signals that an I / O exception has occurred .
public static void main(String[] args) throws IOException {
		final String experimentName = "planetlab_npa";
		final String outputFolder = "output";
        String inputFolder =  ResourceLoader.getResourcePath(NonPowerAware.class,"workload/planetlab/20110303");
        if(Objects.isNull(inputFolder)){
            inputFolder = "";
        }
		Log.setDisabled(!Constants.ENABLE_OUTPUT);
		Log.printLine("Starting " + experimentName);
		try {
            simulation = new CloudSim();
            Helper helper = new Helper(simulation, experimentName, Constants.OUTPUT_CSV, outputFolder);
			DatacenterBroker broker = helper.createBroker(simulation);
			List<Cloudlet> cloudletList = PlanetLabRunner.createCloudletListPlanetLab(broker, inputFolder);
			List<Vm> vmList = helper.createVmList(broker, cloudletList.size());
			List<PowerHost> hostList = helper.createHostList(NUMBER_OF_HOSTS);
			PowerDatacenterNonPowerAware datacenter = (PowerDatacenterNonPowerAware) helper.createDatacenter(
                PowerDatacenterNonPowerAware.class, hostList,
                new PowerVmAllocationPolicySimple());
			datacenter.setMigrationsEnabled(false);
			broker.submitVmList(vmList);
			broker.submitCloudletList(cloudletList);
			simulation.terminateAt(Constants.SIMULATION_LIMIT);
			double lastClock = simulation.start();
			List<Cloudlet> newList = broker.getCloudletFinishedList();
			Log.printLine("Received " + newList.size() + " cloudlets");
            helper.printResults(datacenter, vmList, lastClock);
		} catch (Exception e) {
			e.printStackTrace();
			Log.printLine("The simulation has been terminated due to an unexpected error");
			System.exit(0);
		}
		Log.printLine("Finished " + experimentName);
	}
public static void main ( String [ ] args ) throws IOException { final String experimentName = "planetlab_npa" ; final String outputFolder = "output" ; String inputFolder = ResourceLoader . getResourcePath ( NonPowerAware . class , "workload/planetlab/20110303" ) ; if ( Objects . isNull ( inputFolder ) ) { inputFolder = "" ; } Log . setDisabled ( ! Constants . ENABLE_OUTPUT ) ; Log . printLine ( "Starting " + experimentName ) ; try { simulation = new CloudSim ( ) ; Helper helper = new Helper ( simulation , experimentName , Constants . OUTPUT_CSV , outputFolder ) ; DatacenterBroker broker = helper . createBroker ( simulation ) ; List < Cloudlet > cloudletList = PlanetLabRunner . createCloudletListPlanetLab ( broker , inputFolder ) ; List < Vm > vmList = helper . createVmList ( broker , cloudletList . size ( ) ) ; List < PowerHost > hostList = helper . createHostList ( NUMBER_OF_HOSTS ) ; PowerDatacenterNonPowerAware datacenter = ( PowerDatacenterNonPowerAware ) helper . createDatacenter ( PowerDatacenterNonPowerAware . class , hostList , new PowerVmAllocationPolicySimple ( ) ) ; datacenter . setMigrationsEnabled ( false ) ; broker . submitVmList ( vmList ) ; broker . submitCloudletList ( cloudletList ) ; simulation . terminateAt ( Constants . SIMULATION_LIMIT ) ; double lastClock = simulation . start ( ) ; List < Cloudlet > newList = broker . getCloudletFinishedList ( ) ; Log . printLine ( "Received " + newList . size ( ) + " cloudlets" ) ; helper . printResults ( datacenter , vmList , lastClock ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; Log . printLine ( "The simulation has been terminated due to an unexpected error" ) ; System . exit ( 0 ) ; } Log . printLine ( "Finished " + experimentName ) ; }
The main method.
The main method .