Commit 173e49b1 authored by Tobias Meuser's avatar Tobias Meuser
Browse files

Update for diss

parent 4c2d8f4c
......@@ -540,7 +540,11 @@ public class TraciSimulationController implements VehicleController, SimulationS
try {
SumoBoundingBox netBoundary = (SumoBoundingBox) _connection.do_job_get(netBoundaryCommand);
if (_observedAreaSet) {
return Math.max(Math.min(netBoundary.x_max, _endX) - Math.max(netBoundary.x_min, _startX), 10);
} else {
return Math.max(netBoundary.x_max - netBoundary.x_min, 10);
}
} catch (Exception e) {
//Nothing to do
}
......@@ -553,7 +557,11 @@ public class TraciSimulationController implements VehicleController, SimulationS
try {
SumoBoundingBox netBoundary = (SumoBoundingBox) _connection.do_job_get(netBoundaryCommand);
if (_observedAreaSet) {
return Math.max(Math.min(netBoundary.y_max, _endY) - Math.max(netBoundary.y_min, _startY), 10);
} else {
return Math.max(netBoundary.y_max - netBoundary.y_min, 10);
}
} catch (Exception e) {
//Nothing to do
}
......@@ -814,6 +822,7 @@ public class TraciSimulationController implements VehicleController, SimulationS
for (SumoPosition2D location : geometry.coords) {
if (!isObservedAreaSet()) {
positions.add(new PositionVector(location.x, location.y));
set = true;
} else {
if (_startX <= location.x && location.x <= _endX && _startY <= location.y && location.y <= _endY) {
set = true;
......
......@@ -180,6 +180,11 @@ public class GlobalOracle implements OracleComponent {
return new ArrayList<Host>(hosts);
}
@Override
public Host getHostByID(long pValue) {
return hostIDtoHosts.get(pValue);
}
@Override
public boolean isSimulation() {
return true;
......
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