From 76c96dab5746b4569a30b1833948746708bc29d7 Mon Sep 17 00:00:00 2001 From: Markus Quaritsch <markus.quaritsch@tugraz.at> Date: Fri, 16 Oct 2015 13:32:58 +0200 Subject: [PATCH] if search braking power finds a value <0 => overload response. driver strategy has to find another way to proceed... (can happen if the gear is disengaged and the requested deceleration can not be reached, i.e. the deceleration is higher) --- VectoCore/Models/SimulationComponent/Impl/Driver.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/VectoCore/Models/SimulationComponent/Impl/Driver.cs b/VectoCore/Models/SimulationComponent/Impl/Driver.cs index 6e0320d3b6..1616ce9411 100644 --- a/VectoCore/Models/SimulationComponent/Impl/Driver.cs +++ b/VectoCore/Models/SimulationComponent/Impl/Driver.cs @@ -393,8 +393,13 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl }; } - Log.Debug("Found operating point for breaking. dt: {0}, acceleration: {1}", operatingPoint.SimulationInterval, - operatingPoint.Acceleration); + Log.Debug("Found operating point for breaking. dt: {0}, acceleration: {1} brakingPower: {2}", + operatingPoint.SimulationInterval, + operatingPoint.Acceleration, DataBus.BreakPower); + if (DataBus.BreakPower < 0) { + DataBus.BreakPower = 0.SI<Watt>(); + return new ResponseOverload { Source = this }; + } retVal = NextComponent.Request(absTime, operatingPoint.SimulationInterval, operatingPoint.Acceleration, gradient); -- GitLab