diff --git a/core/src/main/kotlin/fr/sncf/osrd/stdcm/graph/STDCMEdgeBuilder.kt b/core/src/main/kotlin/fr/sncf/osrd/stdcm/graph/STDCMEdgeBuilder.kt index 9075342b437..31f84594bcc 100644 --- a/core/src/main/kotlin/fr/sncf/osrd/stdcm/graph/STDCMEdgeBuilder.kt +++ b/core/src/main/kotlin/fr/sncf/osrd/stdcm/graph/STDCMEdgeBuilder.kt @@ -46,7 +46,7 @@ internal constructor( */ fun makeAllEdges(): Collection { return try { - if (getEnvelope() == null || hasDuplicateBlocks()) { + if (getEnvelope() == null) { listOf() } else { val delays = getDelaysPerOpening() @@ -217,17 +217,6 @@ internal constructor( return if (res == null || graph.delayManager.isRunTimeTooLong(res)) null else res } - /** Returns true if the current block is already present in the path to this edge */ - private fun hasDuplicateBlocks(): Boolean { - var node = prevNode - while (true) { - val prevEdge = node.previousEdge ?: return false - if (!prevEdge.endAtStop && prevEdge.block == infraExplorer.getCurrentBlock()) - return true - node = prevEdge.previousNode - } - } - companion object { fun fromNode( graph: STDCMGraph,