cloudsim-plus-master/cloudsim-plus-master/cloudsim-plus-examples/src/main/java/org/cloudbus/cloudsim/examples/power/util/RunnerAbstract.java
protected void start(final String experimentName, final String outputFolder, VmAllocationPolicy vmAllocationPolicy) {
        System.out.println("Starting " + experimentName);

        try {
            Helper helper = new Helper(simulation, experimentName, Constants.OUTPUT_CSV, outputFolder);
            PowerDatacenter datacenter = (PowerDatacenter) helper.createDatacenter(
                PowerDatacenter.class,
                hostList,
                vmAllocationPolicy);

            datacenter.setMigrationsEnabled(true);

            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);
    }
/**
     * Starts the simulation.
     *
     * @param experimentName     the experiment name
     * @param outputFolder       the output folder
     * @param vmAllocationPolicy the vm allocation policy
     */
Starts the simulation.
@param experimentName     the experiment name
@param outputFolder       the output folder
@param vmAllocationPolicy the vm allocation policy
Starts the simulation . @param experimentName the experiment name @param outputFolder the output folder @param vmAllocationPolicy the vm allocation policy
protected void start(final String experimentName, final String outputFolder, VmAllocationPolicy vmAllocationPolicy) {
        System.out.println("Starting " + experimentName);
        try {
            Helper helper = new Helper(simulation, experimentName, Constants.OUTPUT_CSV, outputFolder);
            PowerDatacenter datacenter = (PowerDatacenter) helper.createDatacenter(
                PowerDatacenter.class,
                hostList,
                vmAllocationPolicy);
            datacenter.setMigrationsEnabled(true);
            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);
    }
protected void start ( final String experimentName , final String outputFolder , VmAllocationPolicy vmAllocationPolicy ) { System . out . println ( "Starting " + experimentName ) ; try { Helper helper = new Helper ( simulation , experimentName , Constants . OUTPUT_CSV , outputFolder ) ; PowerDatacenter datacenter = ( PowerDatacenter ) helper . createDatacenter ( PowerDatacenter . class , hostList , vmAllocationPolicy ) ; datacenter . setMigrationsEnabled ( true ) ; 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 ) ; }
Starts the simulation.
Starts the simulation .