Commit 5aad19aa authored by Tobias Meuser's avatar Tobias Meuser
Browse files

Added lane level information

parent a616205b
......@@ -20,6 +20,7 @@ import de.tudarmstadt.maki.simonstrator.api.component.vehicular.api.information.
import de.tudarmstadt.maki.simonstrator.api.component.vehicular.api.information.Position;
import de.tudarmstadt.maki.simonstrator.api.component.vehicular.roadnetwork.RoadNetwork;
import de.tudarmstadt.maki.simonstrator.api.component.vehicular.roadnetwork.RoadNetworkEdge;
import de.tudarmstadt.maki.simonstrator.api.component.vehicular.roadnetwork.RoadNetworkLane;
import de.tudarmstadt.maki.simonstrator.api.component.vehicular.roadnetwork.RoadNetworkRoute;
import de.tudarmstadt.maki.simonstrator.api.component.vehicular.roadnetwork.SerializableRoadNetwork;
import de.tudarmstadt.maki.simonstrator.api.component.vehicular.roadnetwork.exception.NoAdditionalRouteAvailableException;
......@@ -554,6 +555,8 @@ public class TraciSimulationController implements VehicleController, SimulationS
}
if (_roadNetwork != null) {
System.out.println("Got network from cache");
SumoCommand edgeIDCommand = Edge.getIDList();
SumoStringList edgeIDStringList = (SumoStringList) requestObject(edgeIDCommand);
......@@ -598,7 +601,7 @@ public class TraciSimulationController implements VehicleController, SimulationS
RoadNetworkEdge edge = roadNetwork.get(edgeID);
edge.setOriginalMaxSpeed(maxSpeed);
edge.increaseLaneAmount();
edge.addLane(new RoadNetworkLane(laneID));
for (SumoLink link : linkStringList) {
String notInternalLane = link.notInternalLane;
......@@ -607,7 +610,8 @@ public class TraciSimulationController implements VehicleController, SimulationS
double linkAngle = getLaneAngle(laneID);
if (!roadNetwork.containsKey(connectedEdge)) {
roadNetwork.put(connectedEdge, new RoadNetworkEdge(connectedEdge, linkAngle, this));
RoadNetworkEdge roadNetworkEdge = new RoadNetworkEdge(connectedEdge, linkAngle, this);
roadNetwork.put(connectedEdge, roadNetworkEdge);
}
edge.addConnectedEdge(roadNetwork.get(connectedEdge));
......
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