Commit 8b07b101 authored by Tobias Meuser's avatar Tobias Meuser Committed by Jose Ignacio Monreal Bailey
Browse files

Removed unnecessary System.out

parent 650de0ea
...@@ -59,6 +59,8 @@ import de.tudarmstadt.maki.simonstrator.api.util.XMLConfigurableConstructor; ...@@ -59,6 +59,8 @@ import de.tudarmstadt.maki.simonstrator.api.util.XMLConfigurableConstructor;
public class VehicleMovementModel implements MovementModel, EventHandler, FutureLocationSensor { public class VehicleMovementModel implements MovementModel, EventHandler, FutureLocationSensor {
private static VehicleMovementModel MOVEMENT;
public static final double SCALING_FACTOR = 1.0; public static final double SCALING_FACTOR = 1.0;
private static final double PAINT_OFFSET = 25; private static final double PAINT_OFFSET = 25;
...@@ -108,6 +110,8 @@ public class VehicleMovementModel implements MovementModel, EventHandler, Future ...@@ -108,6 +110,8 @@ public class VehicleMovementModel implements MovementModel, EventHandler, Future
*/ */
@XMLConfigurableConstructor({ "timeBetweenMoveOperations", "sumoExe", "sumoConfigFile", "offsetX", "offsetY", "width", "height" }) @XMLConfigurableConstructor({ "timeBetweenMoveOperations", "sumoExe", "sumoConfigFile", "offsetX", "offsetY", "width", "height" })
public VehicleMovementModel(long timeBetweenMoveOperations, String sumoExe, String sumoConfigFile, String offsetX, String offsetY, String width, String height) { public VehicleMovementModel(long timeBetweenMoveOperations, String sumoExe, String sumoConfigFile, String offsetX, String offsetY, String width, String height) {
MOVEMENT = this;
this.timeBetweenMoveOperations = timeBetweenMoveOperations; this.timeBetweenMoveOperations = timeBetweenMoveOperations;
this.components = new LinkedList<>(); this.components = new LinkedList<>();
this.freeComponents = new LinkedList<>(); this.freeComponents = new LinkedList<>();
...@@ -133,6 +137,8 @@ public class VehicleMovementModel implements MovementModel, EventHandler, Future ...@@ -133,6 +137,8 @@ public class VehicleMovementModel implements MovementModel, EventHandler, Future
*/ */
@XMLConfigurableConstructor({ "timeBetweenMoveOperations", "sumoTrace", "sumoIntersections", "offsetX", "offsetY", "width", "height" }) @XMLConfigurableConstructor({ "timeBetweenMoveOperations", "sumoTrace", "sumoIntersections", "offsetX", "offsetY", "width", "height" })
public VehicleMovementModel(long timeBetweenMoveOperations, String sumoTrace, String sumoIntersections, int offsetX, int offsetY, int width, int height) { public VehicleMovementModel(long timeBetweenMoveOperations, String sumoTrace, String sumoIntersections, int offsetX, int offsetY, int width, int height) {
MOVEMENT = this;
this.timeBetweenMoveOperations = timeBetweenMoveOperations; this.timeBetweenMoveOperations = timeBetweenMoveOperations;
this.components = new LinkedList<>(); this.components = new LinkedList<>();
this.freeComponents = new LinkedList<>(); this.freeComponents = new LinkedList<>();
...@@ -302,13 +308,6 @@ public class VehicleMovementModel implements MovementModel, EventHandler, Future ...@@ -302,13 +308,6 @@ public class VehicleMovementModel implements MovementModel, EventHandler, Future
component.setMovementSpeed(position.getSpeed() / SCALING_FACTOR); component.setMovementSpeed(position.getSpeed() / SCALING_FACTOR);
try {
VehicleInformationComponent vehicularHostComponent = component.getHost().getComponent(VehicleInformationComponent.class);
System.out.println(vehicularHostComponent.getCurrentRoute());
} catch (ComponentNotAvailableException e) {
// Nothing to do here
}
try { try {
RoutedNetLayer routedNetLayer = component.getHost().getComponent(RoutedNetLayer.class); RoutedNetLayer routedNetLayer = component.getHost().getComponent(RoutedNetLayer.class);
for (SimNetInterface netInterface : routedNetLayer.getSimNetworkInterfaces()) { for (SimNetInterface netInterface : routedNetLayer.getSimNetworkInterfaces()) {
...@@ -400,8 +399,8 @@ public class VehicleMovementModel implements MovementModel, EventHandler, Future ...@@ -400,8 +399,8 @@ public class VehicleMovementModel implements MovementModel, EventHandler, Future
return idComponentMatcher.get(vehicle); return idComponentMatcher.get(vehicle);
} }
public RoadNetwork getRoadNetwork() { public static RoadNetwork getRoadNetwork() {
return _extractor.getRoadNetwork(); return MOVEMENT._extractor.getRoadNetwork();
} }
/** /**
......
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