diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/DefaultDriverStrategy.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/DefaultDriverStrategy.cs index 1a53471b39806ba21a4b313512579d8ae61f7dbe..f37ebf114d650b895d87a4faa347e4bca25eb636 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/DefaultDriverStrategy.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/DefaultDriverStrategy.cs @@ -679,6 +679,11 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl if (!DataBus.ClutchClosed(absTime)) { Log.Info("Brake -> Overload -> Clutch is open - Trying roll action"); response = Driver.DrivingActionRoll(absTime, ds, targetVelocity, gradient); + response.Switch().Case<ResponseSpeedLimitExceeded>( + () => { + response = Driver.DrivingActionBrake(absTime, ds, targetVelocity, gradient); + } + ); } else { Log.Info("Brake -> Overload -> Clutch is closed - Trying brake action again"); DataBus.BrakePower = 0.SI<Watt>(); diff --git a/VectoCore/VectoCoreTest/Models/Declaration/DeclarationDataTest.cs b/VectoCore/VectoCoreTest/Models/Declaration/DeclarationDataTest.cs index cb79868cf8517c6ce014fe3cc372970475931df9..0d46021d6bacd47fdbfe781968f69fa1d40cea52 100644 --- a/VectoCore/VectoCoreTest/Models/Declaration/DeclarationDataTest.cs +++ b/VectoCore/VectoCoreTest/Models/Declaration/DeclarationDataTest.cs @@ -724,11 +724,11 @@ namespace TUGraz.VectoCore.Tests.Models.Declaration TestCase(VehicleCategory.RigidTruck, AxleConfiguration.AxleConfig_4x2, 18000, 0, false, VehicleClass.Class4, 4.0, TestName = "SegmentLookupHeight Class4"), TestCase(VehicleCategory.RigidTruck, AxleConfiguration.AxleConfig_4x2, 18000, 0, true, VehicleClass.Class4, 4.0, - TestName = "SegmentLookupHeight Class4"), + TestName = "SegmentLookupHeight Class4v"), TestCase(VehicleCategory.Tractor, AxleConfiguration.AxleConfig_4x2, 18000, 0, false, VehicleClass.Class5, 4.0, TestName = "SegmentLookupHeight Class5"), TestCase(VehicleCategory.Tractor, AxleConfiguration.AxleConfig_4x2, 18000, 0, true, VehicleClass.Class5, 4.0, - TestName = "SegmentLookupHeight Class5"), + TestName = "SegmentLookupHeight Class5v"), TestCase(VehicleCategory.RigidTruck, AxleConfiguration.AxleConfig_6x2, 10000, 0, false, VehicleClass.Class9, 3.6, TestName = "SegmentLookupHeight Class9 - 1"), TestCase(VehicleCategory.RigidTruck, AxleConfiguration.AxleConfig_6x2, 12000, 0, false, VehicleClass.Class9, 3.75, @@ -740,11 +740,11 @@ namespace TUGraz.VectoCore.Tests.Models.Declaration TestCase(VehicleCategory.RigidTruck, AxleConfiguration.AxleConfig_6x2, 40000, 0, false, VehicleClass.Class9, 4.0, TestName = "SegmentLookupHeight Class9 - other"), TestCase(VehicleCategory.RigidTruck, AxleConfiguration.AxleConfig_6x2, 40000, 0, true, VehicleClass.Class9, 4.0, - TestName = "SegmentLookupHeight Class9 - other"), + TestName = "SegmentLookupHeight Class9v - other"), TestCase(VehicleCategory.Tractor, AxleConfiguration.AxleConfig_6x2, 40000, 0, false, VehicleClass.Class10, 4.0, TestName = "SegmentLookupHeight Class10"), TestCase(VehicleCategory.Tractor, AxleConfiguration.AxleConfig_6x2, 40000, 0, true, VehicleClass.Class10, 4.0, - TestName = "SegmentLookupHeight Class10"), + TestName = "SegmentLookupHeight Class10v"), TestCase(VehicleCategory.RigidTruck, AxleConfiguration.AxleConfig_6x4, 12000, 0, false, VehicleClass.Class11, 4.0, TestName = "SegmentLookupHeight Class11"), TestCase(VehicleCategory.Tractor, AxleConfiguration.AxleConfig_6x4, 12000, 0, false, VehicleClass.Class12, 4.0,