Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Simonstrator
PeerfactSim.KOM
Commits
5aad19aa
Commit
5aad19aa
authored
Jul 25, 2017
by
Tobias Meuser
Browse files
Added lane level information
parent
a616205b
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/de/tud/kom/p2psim/impl/topology/movement/vehicular/sumo/simulation/controller/traci/TraciSimulationController.java
View file @
5aad19aa
...
...
@@ -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
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment