Class TieLineUtil


  • public final class TieLineUtil
    extends Object
    Author:
    Luma Zamarreño , José Antonio Marqués
    • Method Detail

      • findAndAssociateDanglingLines

        public static void findAndAssociateDanglingLines​(DanglingLine candidateDanglingLine,
                                                         DanglingLine danglingLine,
                                                         Function<String,​List<DanglingLine>> getDanglingLinesByXnodeCode,
                                                         BiConsumer<DanglingLine,​DanglingLine> associateDanglingLines)
        If it exists, find the dangling line in the merging network that should be associated to a candidate dangling line in the network to be merged. Two dangling lines in different IGM should be associated if: - they have the same ID and at least one has a non-null X-node code OR - they have the same non-null X-node code and are the only dangling lines to have this X-node code in their respective networks OR - they have the same non-null X-node code and are the only connected dangling lines to have this X-node code in their respective networks
        Parameters:
        candidateDanglingLine - candidate dangling line in the network to be merged
        danglingLine - dangling line in the merging network with same ID as the candidate dangling line. Can be null.
        getDanglingLinesByXnodeCode - function to retrieve dangling lines with a given X-node code in the merging network.
        associateDanglingLines - function associating two dangling lines