Commit d134fb97 authored by Tobias Meuser's avatar Tobias Meuser
Browse files

Updated xml simulation controller

parent 65606442
...@@ -56,7 +56,7 @@ public class RoadSideUnitInformationHandler { ...@@ -56,7 +56,7 @@ public class RoadSideUnitInformationHandler {
} }
scanner.close(); scanner.close();
} catch (FileNotFoundException e) { } catch (FileNotFoundException e) {
throw new UnsupportedOperationException("Unable to read file", e); System.err.println("Unable to read file " + e.getMessage());
} }
} }
......
...@@ -28,7 +28,7 @@ public class XMLSimulationController implements VehicleController, SimulationSet ...@@ -28,7 +28,7 @@ public class XMLSimulationController implements VehicleController, SimulationSet
private List<String> _vehicles; private List<String> _vehicles;
private Map<Double, Map<String, VehicleInformationContainer>> _positonsByTimestamp = new HashMap<>(); private Map<Double, Map<String, VehicleInformationContainer>> _positonsByTimestamp = new HashMap<>();
private int _futureInformation = 10; private int _futureInformation = 0;
private boolean _initalized = false; private boolean _initalized = false;
...@@ -178,7 +178,7 @@ public class XMLSimulationController implements VehicleController, SimulationSet ...@@ -178,7 +178,7 @@ public class XMLSimulationController implements VehicleController, SimulationSet
@Override @Override
public RoadNetwork getRoadNetwork() { public RoadNetwork getRoadNetwork() {
throw new UnsupportedOperationException("This method is not supported for " + getClass().getSimpleName()); return null;
} }
@Override @Override
...@@ -207,7 +207,7 @@ public class XMLSimulationController implements VehicleController, SimulationSet ...@@ -207,7 +207,7 @@ public class XMLSimulationController implements VehicleController, SimulationSet
@Override @Override
public double getVehicleSpeed(String pVehicleID) { public double getVehicleSpeed(String pVehicleID) {
throw new UnsupportedOperationException("This method is not supported for " + getClass().getSimpleName()); return _vehicleDataInformationHandler.getVehiclePositions().get(pVehicleID).getSpeed();
} }
} }
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