diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/Driver.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/Driver.cs index 892a126ddb379865e7fdcdd013b9b94b37e83229..81d4df08be1c613064660caf47eb8824d01908c4 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/Driver.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/Driver.cs @@ -141,7 +141,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl Radian gradient, IResponse previousResponse = null) { - DrivingAction = DrivingAction.Accelerate; + DrivingAction = DrivingAction.Accelerate; IterationStatistics.Increment(this, "Accelerate"); Log.Debug("DrivingAction Accelerate"); var operatingPoint = ComputeAcceleration(ds, targetVelocity); @@ -267,6 +267,14 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl retVal.Switch(). Case<ResponseSuccess>(() => operatingPoint = nextOperatingPoint). Case<ResponseGearShift>(() => operatingPoint = nextOperatingPoint). + Case<ResponseOverload>( + r => { + nextOperatingPoint = SearchOperatingPoint(absTime, ds, gradient, operatingPoint.Acceleration, + r); + DriverAcceleration = nextOperatingPoint.Acceleration; + retVal = NextComponent.Request(absTime, nextOperatingPoint.SimulationInterval, + nextOperatingPoint.Acceleration, gradient); + }). Default( r => { throw new UnexpectedResponseException("DrivingAction Accelerate after Overload", r);