From dd613c08e9d2e1a5f09a4e7bd0f2ee5f30f4b1b2 Mon Sep 17 00:00:00 2001 From: Markus Quaritsch <markus.quaritsch@tugraz.at> Date: Mon, 13 Mar 2017 16:30:49 +0100 Subject: [PATCH] driver: do not limit deceleration when disengaged; search for acceleration if negative braking power occurs --- .../Models/SimulationComponent/Impl/Driver.cs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/Driver.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/Driver.cs index fa19858e24..79ed9f108a 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/Driver.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/Driver.cs @@ -196,12 +196,9 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl // search again for operating point, transmission may have shifted inbetween nextOperatingPoint = SearchOperatingPoint(absTime, ds, gradient, operatingPoint.Acceleration, response); - limitedOperatingPoint = LimitAccelerationByDriverModel(nextOperatingPoint, - LimitationMode.LimitDecelerationDriver); - DriverAcceleration = limitedOperatingPoint.Acceleration; - retVal = NextComponent.Request(absTime, limitedOperatingPoint.SimulationInterval, - limitedOperatingPoint.Acceleration, - gradient); + DriverAcceleration = nextOperatingPoint.Acceleration; + retVal = NextComponent.Request(absTime, nextOperatingPoint.SimulationInterval, + nextOperatingPoint.Acceleration, gradient); } else { if (absTime > 0 && DataBus.VehicleStopped) { Log.Info( @@ -526,6 +523,11 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl operatingPoint = SearchBrakingPower(absTime, operatingPoint.SimulationDistance, gradient, operatingPoint.Acceleration, response); DriverAcceleration = operatingPoint.Acceleration; + if (DataBus.BrakePower.IsSmaller(0)) { + DataBus.BrakePower = 0.SI<Watt>(); + + operatingPoint = SearchOperatingPoint(absTime, ds, gradient, 0.SI<MeterPerSquareSecond>(), r); + } retVal = NextComponent.Request(absTime, operatingPoint.SimulationInterval, operatingPoint.Acceleration, gradient); } else { -- GitLab