From 465e86d3b859acc7fb24ae191a723ab1bf56feb6 Mon Sep 17 00:00:00 2001 From: Valentin Chanas Date: Fri, 2 Feb 2024 21:48:38 +0100 Subject: [PATCH] todo --- .../osrd/railjson/schema/rollingstock/RJSRollingStock.java | 2 +- .../pathfinding/constraints/SignalingSystemConstraints.kt | 2 +- core/src/test/kotlin/fr/sncf/osrd/utils/DummyInfra.kt | 7 ++++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/core/osrd-railjson/src/main/java/fr/sncf/osrd/railjson/schema/rollingstock/RJSRollingStock.java b/core/osrd-railjson/src/main/java/fr/sncf/osrd/railjson/schema/rollingstock/RJSRollingStock.java index e9f422019ee..0e01100bff7 100644 --- a/core/osrd-railjson/src/main/java/fr/sncf/osrd/railjson/schema/rollingstock/RJSRollingStock.java +++ b/core/osrd-railjson/src/main/java/fr/sncf/osrd/railjson/schema/rollingstock/RJSRollingStock.java @@ -96,7 +96,7 @@ public class RJSRollingStock implements Identified { @Json(name = "supported_signaling_systems") public String[] supportedSignalingSystems = null; - + public enum GammaType { CONST, MAX diff --git a/core/src/main/kotlin/fr/sncf/osrd/api/pathfinding/constraints/SignalingSystemConstraints.kt b/core/src/main/kotlin/fr/sncf/osrd/api/pathfinding/constraints/SignalingSystemConstraints.kt index c3f29824002..b07fc37f466 100644 --- a/core/src/main/kotlin/fr/sncf/osrd/api/pathfinding/constraints/SignalingSystemConstraints.kt +++ b/core/src/main/kotlin/fr/sncf/osrd/api/pathfinding/constraints/SignalingSystemConstraints.kt @@ -62,4 +62,4 @@ class SignalingSystemConstraintsFactory { rsSupportedSigSystems ) } -} \ No newline at end of file +} diff --git a/core/src/test/kotlin/fr/sncf/osrd/utils/DummyInfra.kt b/core/src/test/kotlin/fr/sncf/osrd/utils/DummyInfra.kt index 6d8c521509f..410503a1e91 100644 --- a/core/src/test/kotlin/fr/sncf/osrd/utils/DummyInfra.kt +++ b/core/src/test/kotlin/fr/sncf/osrd/utils/DummyInfra.kt @@ -24,6 +24,7 @@ class DummyInfra : RawInfra, BlockInfra { private val entryMap = HashMultimap.create() private val exitMap = HashMultimap.create() private val signalingSimulator = makeSignalingSimulator() + // TODO: add logical signals and physical signals so we can return something /** get the FullInfra */ fun fullInfra(): FullInfra { @@ -116,7 +117,7 @@ class DummyInfra : RawInfra, BlockInfra { } override fun getPhysicalSignalName(signal: PhysicalSignalId): String? { - TODO("Not yet implemented") + return "BAL" } override fun getSignalSightDistance(signal: PhysicalSignalId): Distance { @@ -124,7 +125,7 @@ class DummyInfra : RawInfra, BlockInfra { } override fun getSignalingSystemId(signal: LogicalSignalId): String { - return this.fullInfra().rawInfra.getLogicalSignalName(signal) ?: "BAL" + return this.getLogicalSignalName(signal) ?: "BAL" } fun getSignalingSystemName(block: BlockId): String { @@ -136,7 +137,7 @@ class DummyInfra : RawInfra, BlockInfra { } override fun getNextSignalingSystemIds(signal: LogicalSignalId): List { - return this.fullInfra().rawInfra.getNextSignalingSystemIds(signal) + return this.getNextSignalingSystemIds(signal) } override val routes: StaticIdxSpace