Commit ba977666 authored by Sophie Schönherr's avatar Sophie Schönherr Committed by Jose Ignacio Monreal Bailey
Browse files

Fixed infinity-loop on simulation end

parent d46e3802
......@@ -291,7 +291,9 @@ public class VehicleMovementModel implements MovementModel, EventHandler, Future
long currentTime = Time.getCurrentTime() / timestepConversion;
while (_controller.getStep() - _controller.getStart() < currentTime) {
_controller.nextStep();
if (!_controller.nextStep()) {
return;
}
}
List<String> allVehicles = _controller.getAllVehicles();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment