src/com/launcher/SimulatorParameters.java
public static void runSimulation() {

        seedCounter = -1;

        if (_runNumber == numberOfRuns - 1) {
            System.exit(0);
        } else {
            _runNumber++;
            log.info("Preparing run number " + _runNumber);
        }

        log.info("Initializing the scheduler");
        /** Initialize the scheduler*/
        new Scheduler();

        /** Create new result files*/
        log.info("Creating new result files");
        new Results();

        InputParameters.readNetworkParameters();
        InputParameters.setNodes();
        log.info("Updating network state");
        new NetworkState(InputParameters.getGraph(), gridGranularity, txCapacityOfTransponders, numOfMiniGridsPerGB, setPaths(ImportTopologyFromSNDFile.getPaths()), policy);
        log.info("Initializing generators");
        listOfGenerators = new ArrayList<>();
        for (Source s : InputParameters.getListOfSources())
            listOfGenerators.add(new Generator(s.getVertex(), s.getListOfTrafficDemands(), s.getArrivalRate(), s.getTrafficClassProb(), s.getDestinationProb()));
        listOfGenerators.forEach(Generator::initialize);

        /** Run the simulation */
        log.info("Starting simulation...");
        Scheduler.startSim();
    }
/**
     * Function to run a simulation initializing the event handler and network inputdata
     */
Function to run a simulation initializing the event handler and network inputdata
Function to run a simulation initializing the event handler and network inputdata
public static void runSimulation() {
        seedCounter = -1;
        if (_runNumber == numberOfRuns - 1) {
            System.exit(0);
        } else {
            _runNumber++;
            log.info("Preparing run number " + _runNumber);
        }
        log.info("Initializing the scheduler");
        /** Initialize the scheduler*/
        new Scheduler();
        /** Create new result files*/
        log.info("Creating new result files");
        new Results();
        InputParameters.readNetworkParameters();
        InputParameters.setNodes();
        log.info("Updating network state");
        new NetworkState(InputParameters.getGraph(), gridGranularity, txCapacityOfTransponders, numOfMiniGridsPerGB, setPaths(ImportTopologyFromSNDFile.getPaths()), policy);
        log.info("Initializing generators");
        listOfGenerators = new ArrayList<>();
        for (Source s : InputParameters.getListOfSources())
            listOfGenerators.add(new Generator(s.getVertex(), s.getListOfTrafficDemands(), s.getArrivalRate(), s.getTrafficClassProb(), s.getDestinationProb()));
        listOfGenerators.forEach(Generator::initialize);
        /** Run the simulation */
        log.info("Starting simulation...");
        Scheduler.startSim();
    }
public static void runSimulation ( ) { seedCounter = - 1 ; if ( _runNumber == numberOfRuns - 1 ) { System . exit ( 0 ) ; } else { _runNumber ++ ; log . info ( "Preparing run number " + _runNumber ) ; } log . info ( "Initializing the scheduler" ) ; /** Initialize the scheduler*/ new Scheduler ( ) ; /** Create new result files*/ log . info ( "Creating new result files" ) ; new Results ( ) ; InputParameters . readNetworkParameters ( ) ; InputParameters . setNodes ( ) ; log . info ( "Updating network state" ) ; new NetworkState ( InputParameters . getGraph ( ) , gridGranularity , txCapacityOfTransponders , numOfMiniGridsPerGB , setPaths ( ImportTopologyFromSNDFile . getPaths ( ) ) , policy ) ; log . info ( "Initializing generators" ) ; listOfGenerators = new ArrayList < > ( ) ; for ( Source s : InputParameters . getListOfSources ( ) ) listOfGenerators . add ( new Generator ( s . getVertex ( ) , s . getListOfTrafficDemands ( ) , s . getArrivalRate ( ) , s . getTrafficClassProb ( ) , s . getDestinationProb ( ) ) ) ; listOfGenerators . forEach ( Generator :: initialize ) ; /** Run the simulation */ log . info ( "Starting simulation..." ) ; Scheduler . startSim ( ) ; }
Function to run a simulation initializing the event handler and network inputdata
Function to run a simulation initializing the event handler and network inputdata