Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS will be completely phased out by mid-2025. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit c3379078 authored by Michael KRISPER's avatar Michael KRISPER
Browse files

corrected bug in driver for test "Coach_DriverStrategy_Decelerate_60_20_uphill_25"

parent 2d2fadc8
No related branches found
No related tags found
No related merge requests found
......@@ -562,10 +562,15 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
},
evaluateFunction:
acc => {
var tmp = ComputeTimeInterval(acc, ds);
retVal.SimulationInterval = tmp.SimulationInterval;
retVal.SimulationDistance = tmp.SimulationDistance;
return NextComponent.Request(absTime, tmp.SimulationInterval, acc, gradient, true);
// calculate new time interval only when vehiclespeed and acceleration are != 0
// else: use same timeinterval as before.
if (!(acc.IsEqual(0) && DataBus.VehicleSpeed.IsEqual(0))) {
var tmp = ComputeTimeInterval(acc, ds);
retVal.Acceleration = tmp.Acceleration;
retVal.SimulationInterval = tmp.SimulationInterval;
retVal.SimulationDistance = tmp.SimulationDistance;
}
return NextComponent.Request(absTime, retVal.SimulationInterval, acc, gradient, true);
},
criterion: response => {
if (response is ResponseEngineSpeedTooLow) {
......
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