cloudsim-plus-master/cloudsim-plus-master/cloudsim-plus/src/main/java/org/cloudbus/cloudsim/core/CloudSim.java
private double run()  {
        if(alreadyRunOnce){
            throw new UnsupportedOperationException("You can't run a simulation that already ran previously. If you've paused the simulation and want to resume it, you should call resume().");
        }

        if (!running) {
            runStart();
        }

        this.alreadyRunOnce = true;

        while (running) {
            runClockTickAndProcessFutureEventQueue();

            if (isThereRequestToTerminateSimulationAndItWasAttended()) {
                Log.printFormattedLine(
                    "\nSimulation finished at time %.2f, before completing, in reason of an explicit request to terminate() or terminateAt().\n", clockTime);
                break;
            }

            checkIfThereIsRequestToPauseSimulation();
        }

        final double lastSimulationTime = clock();

        finishSimulation();
        printMessage("Simulation completed.");

        return lastSimulationTime;
    }
/**
     * Starts the simulation execution. This should be called after all the
     * entities have been setup and added.
     * The method blocks until the simulation is ended.
     *
     * @return the last clock value
     * @throws RuntimeException when the simulation already run once. If you paused the simulation and wants to resume it,
     * you must use {@link #resume()} instead of {@link #start()}.
     */
Starts the simulation execution. This should be called after all the
entities have been setup and added.
The method blocks until the simulation is ended.

@return the last clock value
@throws RuntimeException when the simulation already run once. If you paused the simulation and wants to resume it,
you must use  #resume() instead of  #start().
Starts the simulation execution . This should be called after all the entities have been setup and added . The method blocks until the simulation is ended . @return the last clock value @throws RuntimeException when the simulation already run once . If you paused the simulation and wants to resume it you must use #resume () instead of #start () .
private double run()  {
        if(alreadyRunOnce){
            throw new UnsupportedOperationException("You can't run a simulation that already ran previously. If you've paused the simulation and want to resume it, you should call resume().");
        }
        if (!running) {
            runStart();
        }
        this.alreadyRunOnce = true;
        while (running) {
            runClockTickAndProcessFutureEventQueue();
            if (isThereRequestToTerminateSimulationAndItWasAttended()) {
                Log.printFormattedLine(
                    "\nSimulation finished at time %.2f, before completing, in reason of an explicit request to terminate() or terminateAt().\n", clockTime);
                break;
            }
            checkIfThereIsRequestToPauseSimulation();
        }
        final double lastSimulationTime = clock();
        finishSimulation();
        printMessage("Simulation completed.");
        return lastSimulationTime;
    }
private double run ( ) { if ( alreadyRunOnce ) { throw new UnsupportedOperationException ( "You can't run a simulation that already ran previously. If you've paused the simulation and want to resume it, you should call resume()." ) ; } if ( ! running ) { runStart ( ) ; } this . alreadyRunOnce = true ; while ( running ) { runClockTickAndProcessFutureEventQueue ( ) ; if ( isThereRequestToTerminateSimulationAndItWasAttended ( ) ) { Log . printFormattedLine ( "\nSimulation finished at time %.2f, before completing, in reason of an explicit request to terminate() or terminateAt().\n" , clockTime ) ; break ; } checkIfThereIsRequestToPauseSimulation ( ) ; } final double lastSimulationTime = clock ( ) ; finishSimulation ( ) ; printMessage ( "Simulation completed." ) ; return lastSimulationTime ; }
Starts the simulation execution.
Starts the simulation execution .