static void readFile(String filename) throws IOException {

		Scanner reader = new Scanner(new FileReader(filename));

		String currentLine = reader.next();

		boolean read1 = true;
		boolean read2 = false;

		Vertice currentVertice;

		while (reader.hasNext()) {

			if (!reader.hasNext("arestas") && read1) {

				currentLine = reader.next();
			
				currentVertice = new Vertice(Integer.parseInt(currentLine));
				currentLine = reader.next();
				currentVertice.setCoordenadaX(Double.parseDouble(currentLine));
				currentLine = reader.next();
				currentVertice.setCoordenadaY(Double.parseDouble(currentLine));

				grafo.addVertice(currentVertice);

			}
			if (reader.hasNext("arestas")) {
				read1 = false;
				currentLine = reader.next();
				read2 = true;

			} else if (read2) {
				currentLine = reader.next();

				int o = Integer.parseInt(currentLine);

				currentLine = reader.next();
				int d = Integer.parseInt(currentLine);

				currentLine = reader.next();
				double custo = Double.parseDouble(currentLine);

				grafo.addAresta(o, d, custo);

			}
		}
		reader.close();
	}