fixup! feat: apply ST stop constraints only at real boundaries

This commit is contained in:
梁薄云
2026-08-05 18:18:16 +08:00
parent dbc7b7ce96
commit 26bd822ec9
2 changed files with 8 additions and 5 deletions
@@ -62,8 +62,9 @@ public sealed class LongitudinalSolutionValidator
failureReason = "ST candidate violates physical bounds at knot " + index + ".";
return false;
}
double speedLimitAtProgress = speedLimit.MaximumSpeedAt(
Math.Max(0d, Math.Min(input.PathUpperBoundS, progress)));
double speedLimitAtProgress = index == 0
? input.DirectionMaximumSpeedMetersPerSecond
: speedLimit.MaximumSpeedAt(Math.Max(0d, Math.Min(input.PathUpperBoundS, progress)));
if (speed > speedLimitAtProgress + tolerance)
{
failureReason = "ST candidate violates the actual-PathS speed envelope at knot " + index +