Skip to content

Commit

Permalink
Update SsldTransformator.xtend (#1195)
Browse files Browse the repository at this point in the history
  • Loading branch information
TruongQuangSB authored Dec 19, 2024
1 parent 14f3adc commit 3543b62
Showing 1 changed file with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,17 +71,9 @@ class SsldTransformator extends AbstractPlanPro2TableModelTransformator {
def String getFreigemeldetLaenge(Fstr_DWeg dweg, TopGraph topGraph,
BigDecimal maxLength) {
val startSignal = dweg?.fstrFahrweg?.start
var fmas = dweg?.FMAs.toList.filter [
topGraph.isInWirkrichtungOfSignal(startSignal, it)
].toList
// When not exists relevant FMA_Komponent/Gleis_Abschluss on the Fstr_Fahrweg of this DWeg,
// then take the FMA_Komponent/Gleis_Abschluss of this FMA_Anlage_Freimeldung,
// which in direction of the start Signal
if (fmas.empty) {
fmas = dweg?.fmaAnlageFreimeldung?.map[fmaGrenzen]?.flatten.toSet.
val fmas = dweg?.fmaAnlageFreimeldung?.map[fmaGrenzen]?.flatten.toSet.
filter[topGraph.isInWirkrichtungOfSignal(startSignal, it)].
toList
}

val relevantDistances = fmas?.map [
getShortestPathLength(dweg?.fstrFahrweg?.start, it)
Expand Down

0 comments on commit 3543b62

Please sign in to comment.