src/com/launcher/SimulatorParameters.java
public static void readConfigFile(String pathFile) throws IOException {

        log.info("Reading the config file");
        listOfSeeds = new ArrayList<>();
        new ReadFile(pathFile);
        String line = ReadFile.readLine();
        int lineCounter = 0;
        while (line != null) {
            if (!line.startsWith("#")) {
                switch (lineCounter) {
                    case 0:
                        networkFile = line;
                        break;
                    case 1:
                        totalNumOfRequests = Integer.parseInt(line);
                        break;
                    case 2:
                        numOfRequestForLU = Integer.parseInt(line);
                        break;
                    case 3:
                        numOfRequestForBlocking = Integer.parseInt(line);
                        break;
                    case 4:
                        numberOfRuns = Integer.parseInt(line);
                        break;
                    case 5:
                        gridGranularity = Integer.parseInt(line);
                        break;
                    case 6:
                        modulationFormat = Integer.parseInt(line);
                        break;
                    case 7:
                        numOfMiniGridsPerGB = Integer.parseInt(line);
                        break;
                    case 8:
                        txCapacityOfTransponders = Integer.parseInt(line);
                        break;
                    case 9:
                        policy = Integer.parseInt(line);
                        break;
                    case 10:
                        if (line.equals("true"))
                            debugMode = true;
                        else
                            debugMode = false;
                        break;
                }
                lineCounter++;
            }
            line = ReadFile.readLine();
        }
        new ReadFile("seeds.txt");
        line = ReadFile.readLine();
        while (line != null) {
            if (!line.startsWith("#")) {
                while (line != null) {
                    line = line.replaceAll("\\s+", "");
                    byte[] seed = new BigInteger(line, 2).toByteArray();
                    if (seed.length == 17) {
                        byte[] seedCopy = new byte[16];
                        for (int i = 0; i < seed.length - 1; i++)
                            seedCopy[i] = seed[i + 1];
                        listOfSeeds.add(seedCopy);
                    } else
                        listOfSeeds.add(seed);
                    line = ReadFile.readLine();
                }
            }
            line = ReadFile.readLine();
        }
    }
/**
     * Function to read the config file for the simulator
     */
Function to read the config file for the simulator
Function to read the config file for the simulator
public static void readConfigFile(String pathFile) throws IOException {
        log.info("Reading the config file");
        listOfSeeds = new ArrayList<>();
        new ReadFile(pathFile);
        String line = ReadFile.readLine();
        int lineCounter = 0;
        while (line != null) {
            if (!line.startsWith("#")) {
                switch (lineCounter) {
                    case 0:
                        networkFile = line;
                        break;
                    case 1:
                        totalNumOfRequests = Integer.parseInt(line);
                        break;
                    case 2:
                        numOfRequestForLU = Integer.parseInt(line);
                        break;
                    case 3:
                        numOfRequestForBlocking = Integer.parseInt(line);
                        break;
                    case 4:
                        numberOfRuns = Integer.parseInt(line);
                        break;
                    case 5:
                        gridGranularity = Integer.parseInt(line);
                        break;
                    case 6:
                        modulationFormat = Integer.parseInt(line);
                        break;
                    case 7:
                        numOfMiniGridsPerGB = Integer.parseInt(line);
                        break;
                    case 8:
                        txCapacityOfTransponders = Integer.parseInt(line);
                        break;
                    case 9:
                        policy = Integer.parseInt(line);
                        break;
                    case 10:
                        if (line.equals("true"))
                            debugMode = true;
                        else
                            debugMode = false;
                        break;
                }
                lineCounter++;
            }
            line = ReadFile.readLine();
        }
        new ReadFile("seeds.txt");
        line = ReadFile.readLine();
        while (line != null) {
            if (!line.startsWith("#")) {
                while (line != null) {
                    line = line.replaceAll("\\s+", "");
                    byte[] seed = new BigInteger(line, 2).toByteArray();
                    if (seed.length == 17) {
                        byte[] seedCopy = new byte[16];
                        for (int i = 0; i < seed.length - 1; i++)
                            seedCopy[i] = seed[i + 1];
                        listOfSeeds.add(seedCopy);
                    } else
                        listOfSeeds.add(seed);
                    line = ReadFile.readLine();
                }
            }
            line = ReadFile.readLine();
        }
    }
public static void readConfigFile ( String pathFile ) throws IOException { log . info ( "Reading the config file" ) ; listOfSeeds = new ArrayList < > ( ) ; new ReadFile ( pathFile ) ; String line = ReadFile . readLine ( ) ; int lineCounter = 0 ; while ( line != null ) { if ( ! line . startsWith ( "#" ) ) { switch ( lineCounter ) { case 0 : networkFile = line ; break ; case 1 : totalNumOfRequests = Integer . parseInt ( line ) ; break ; case 2 : numOfRequestForLU = Integer . parseInt ( line ) ; break ; case 3 : numOfRequestForBlocking = Integer . parseInt ( line ) ; break ; case 4 : numberOfRuns = Integer . parseInt ( line ) ; break ; case 5 : gridGranularity = Integer . parseInt ( line ) ; break ; case 6 : modulationFormat = Integer . parseInt ( line ) ; break ; case 7 : numOfMiniGridsPerGB = Integer . parseInt ( line ) ; break ; case 8 : txCapacityOfTransponders = Integer . parseInt ( line ) ; break ; case 9 : policy = Integer . parseInt ( line ) ; break ; case 10 : if ( line . equals ( "true" ) ) debugMode = true ; else debugMode = false ; break ; } lineCounter ++ ; } line = ReadFile . readLine ( ) ; } new ReadFile ( "seeds.txt" ) ; line = ReadFile . readLine ( ) ; while ( line != null ) { if ( ! line . startsWith ( "#" ) ) { while ( line != null ) { line = line . replaceAll ( "\\s+" , "" ) ; byte [ ] seed = new BigInteger ( line , 2 ) . toByteArray ( ) ; if ( seed . length == 17 ) { byte [ ] seedCopy = new byte [ 16 ] ; for ( int i = 0 ; i < seed . length - 1 ; i ++ ) seedCopy [ i ] = seed [ i + 1 ] ; listOfSeeds . add ( seedCopy ) ; } else listOfSeeds . add ( seed ) ; line = ReadFile . readLine ( ) ; } } line = ReadFile . readLine ( ) ; } }
Function to read the config file for the simulator
Function to read the config file for the simulator