Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit af4e4b59 authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

Driver: in case of overload or Underload response and gear changed abort braking action

parent be462a6f
No related branches found
No related tags found
No related merge requests found
...@@ -235,6 +235,9 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl ...@@ -235,6 +235,9 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
// search again for operating point, transmission may have shifted inbetween // search again for operating point, transmission may have shifted inbetween
nextOperatingPoint = SearchOperatingPoint(absTime, ds, gradient, operatingPoint.Acceleration, nextOperatingPoint = SearchOperatingPoint(absTime, ds, gradient, operatingPoint.Acceleration,
response); response);
if (nextOperatingPoint == null) {
throw new VectoException("DrivingActionAccelerate: Failed to find operating point after Overload");
}
DriverAcceleration = nextOperatingPoint.Acceleration; DriverAcceleration = nextOperatingPoint.Acceleration;
retVal = NextComponent.Request(absTime, nextOperatingPoint.SimulationInterval, retVal = NextComponent.Request(absTime, nextOperatingPoint.SimulationInterval,
nextOperatingPoint.Acceleration, gradient); nextOperatingPoint.Acceleration, gradient);
...@@ -564,7 +567,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl ...@@ -564,7 +567,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
retVal = NextComponent.Request(absTime, operatingPoint.SimulationInterval, operatingPoint.Acceleration, retVal = NextComponent.Request(absTime, operatingPoint.SimulationInterval, operatingPoint.Acceleration,
gradient); gradient);
var gearChanged = !(DataBus.Gear == gear && DataBus.TCLocked == tcLocked); var gearChanged = !(DataBus.Gear == gear && DataBus.TCLocked == tcLocked);
if (DataBus.GearboxType.AutomaticTransmission() && gearChanged && retVal is ResponseOverload) { if (DataBus.GearboxType.AutomaticTransmission() && gearChanged && (retVal is ResponseOverload || retVal is ResponseUnderload)) {
Log.Debug("Gear changed after a valid operating point was found - braking is no longer applicable due to overload"); Log.Debug("Gear changed after a valid operating point was found - braking is no longer applicable due to overload");
return null; return null;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment