private boolean isDestinationNode(int node, Network network)
    {
        boolean returned_value = false;
        Path fFilePath = network.getPath();
        //Search for arterial links coming to this node
        File file_network = new File(fFilePath + "\\network.dat");
        try (Scanner scanner_net =  new Scanner(file_network)){
            scanner_net.nextLine();
            for (int k=0; k<network.getNoOfNodes(); k++)
                scanner_net.nextLine();
            do {
                if (node == scanner_net.nextInt()) {
                    //Check if it is "start" of a link
                    scanner_net.nextInt();
                    scanner_net.nextInt();
                    scanner_net.nextInt();
                    scanner_net.nextInt();
                    scanner_net.nextInt();
                    scanner_net.nextInt();
                    scanner_net.nextInt();
                    scanner_net.nextInt();
                    scanner_net.nextInt();
                    scanner_net.nextInt();
                    int linkType = scanner_net.nextInt();
                    if ((linkType != 5) && (linkType!=7)) {
                        /*It is not a destination node if it is connected to 
                        other types of links rather than arterial link (5)*/
                        return false;
                    }
                } else if (node == scanner_net.nextInt()) {
                    //Check if it is "end" of a link
                    scanner_net.nextInt();
                    scanner_net.nextInt();
                    scanner_net.nextInt();
                    scanner_net.nextInt();
                    scanner_net.nextInt();
                    scanner_net.nextInt();
                    scanner_net.nextInt();
                    scanner_net.nextInt();
                    scanner_net.nextInt();
                    int linkType = scanner_net.nextInt();
                    if ((linkType != 5) && (linkType!=7)) {
                        /*It is not a destination node if it is connected to 
                        other types of links rather than arterial link (5)*/
                        return false;
                    } else
                        returned_value = true;
                }
                scanner_net.nextLine();
            } while (scanner_net.hasNextLine());
        } catch (IOException x) {
            network.log("IOException: " + x);
            return false;
        }
        return returned_value;
    }