/** * Creates the network topology if the file exists and can be successfully parsed. File is * written in the BRITE format and contains topological information on simulation entities. * * @param fileName name of the BRITE file * @pre fileName != null * @post $none */ public static void buildNetworkTopology(String fileName) { Log.printConcatLine("Topology file: ", fileName); // try to find the file GraphReaderBrite reader = new GraphReaderBrite(); try { graph = reader.readGraphFile(fileName); map = new HashMap<Integer, Integer>(); generateMatrices(); } catch (IOException e) { // problem with the file. Does not simulate network Log.printLine("Problem in processing BRITE file. Network simulation is disabled. Error: " + e.getMessage()); } }