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

moved statement, could cause trouble

parent eaad0237
......@@ -331,7 +331,6 @@ public class VehicleMovementModel implements MovementModel, EventHandler, Future
}
freeComponents.forEach((component) -> {
component.updateCurrentLocation(new PositionVector(Double.NaN, Double.NaN));
try {
RoutedNetLayer routedNetLayer = component.getHost().getComponent(RoutedNetLayer.class);
for (SimNetInterface netInterface : routedNetLayer.getSimNetworkInterfaces()) {
......@@ -342,6 +341,7 @@ public class VehicleMovementModel implements MovementModel, EventHandler, Future
} catch (ComponentNotAvailableException e) {
e.printStackTrace();
}
component.updateCurrentLocation(new PositionVector(Double.NaN, Double.NaN));
});
// Reschedule next step
......
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