Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS has been phased out. To see alternatives please check here

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

driver: search operating point: abort search if time interval becomes 0

parent 562a302c
Tags
No related merge requests found
...@@ -572,6 +572,10 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl ...@@ -572,6 +572,10 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
// else: use same timeinterval as before. // else: use same timeinterval as before.
if (!(acc.IsEqual(0) && DataBus.VehicleSpeed.IsEqual(0))) { if (!(acc.IsEqual(0) && DataBus.VehicleSpeed.IsEqual(0))) {
var tmp = ComputeTimeInterval(acc, ds); var tmp = ComputeTimeInterval(acc, ds);
if (tmp.SimulationInterval.IsEqual(0.SI<Second>(), 1e-9.SI<Second>())) {
throw new VectoSearchAbortedException("next TimeInterval is 0. a: {0}, v: {1}, dt: {2}", acc,
DataBus.VehicleSpeed, tmp.SimulationInterval);
}
retVal.Acceleration = tmp.Acceleration; retVal.Acceleration = tmp.Acceleration;
retVal.SimulationInterval = tmp.SimulationInterval; retVal.SimulationInterval = tmp.SimulationInterval;
retVal.SimulationDistance = tmp.SimulationDistance; retVal.SimulationDistance = tmp.SimulationDistance;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment