diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/DefaultDriverStrategy.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/DefaultDriverStrategy.cs index 56972493d38cbad365e7737ade59f9f1d69f4d55..13eed8c0788920984fad92cd97def80d645b99bb 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/DefaultDriverStrategy.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/DefaultDriverStrategy.cs @@ -322,12 +322,13 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl return nextActions.Count == 0 ? null : nextActions.OrderBy(x => x.ActionDistance).First(); } - protected virtual Meter ComputeCoastingDistance(MeterPerSecond currentSpeed, MeterPerSecond nextTargetSpeed) + protected virtual Meter ComputeCoastingDistance(MeterPerSecond currentSpeed, DrivingCycleData.DrivingCycleEntry actionEntry) { - return Formulas.DecelerationDistance(currentSpeed, nextTargetSpeed, + return Formulas.DecelerationDistance(currentSpeed, actionEntry.VehicleTargetSpeed, Driver.DriverData.LookAheadCoasting.Deceleration); } +#if NEW_COASTING protected virtual Meter ComputeCoastingDistance(MeterPerSecond v_veh, DrivingCycleData.DrivingCycleEntry actionEntry) { var v_target = OverspeedAllowed(actionEntry.RoadGradient, actionEntry.VehicleTargetSpeed) @@ -369,7 +370,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl return delta_x; } - +#endif public bool OverspeedAllowed(Radian gradient, MeterPerSecond velocity) {