From 2ca54d503c4be774f81b1ab8f2aaf724afd55935 Mon Sep 17 00:00:00 2001 From: Markus Quaritsch <markus.quaritsch@tugraz.at> Date: Wed, 18 May 2016 17:06:57 +0200 Subject: [PATCH] use old coasting model --- .../SimulationComponent/Impl/DefaultDriverStrategy.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/DefaultDriverStrategy.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/DefaultDriverStrategy.cs index 56972493d3..13eed8c078 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) { -- GitLab