diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/Gearbox.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/Gearbox.cs index 185c02af606eae16d8263e19b56c7a7cc7e7a9ce..d3b575effe338fed76a32b1ca040e6f010b80d9d 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/Gearbox.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/Gearbox.cs @@ -274,6 +274,13 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl }; } + var remainingTime = _engageTime - (absTime + dt); + var withinTractionInterruption = absTime.IsSmaller(_engageTime) && (absTime + dt).IsSmaller(_engageTime); + if (withinTractionInterruption && remainingTime.IsSmaller(Constants.SimulationSettings.LowerBoundTimeInterval) && remainingTime.IsSmaller(ModelData.TractionInterruption * 0.1)) { + // interval has already been prolonged, but has been overruled. if remaining time is less than 10%, reduce traction interruption time + _engageTime = absTime + dt; + } + if ((inTorque * avgInAngularVelocity).IsGreater(0.SI<Watt>(), Constants.SimulationSettings.LineSearchTolerance)) { return new ResponseOverload { Source = this,