Code development platform for open source projects from the European Union institutions

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

improvement searchBrakingPower: reset retryCount after linear search

in case the braking power is very high (e.g., steep downhill) the linear search may take many iterations leaving no iterations for the binary search
parent 82fc3320
No related branches found
No related tags found
No related merge requests found
......@@ -483,6 +483,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
// from then on the searchInterval can be bisected.
if (origDelta.Sign() != delta.Sign()) {
intervalFactor = 0.5;
retryCount = 0; // again max. 100 iterations for the binary search...
}
searchInterval *= intervalFactor;
......
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