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
ca8a6087
Commit
ca8a6087
authored
Sep 23, 2017
by
Sophie Schönherr
Browse files
modification due to problems with closing a connection
parent
2e28bc46
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 @
ca8a6087
...
...
@@ -14,6 +14,9 @@ import java.util.List;
import
java.util.Map
;
import
java.util.Random
;
import
de.tud.kom.p2psim.impl.simengine.Simulator
;
import
de.tudarmstadt.maki.simonstrator.api.Event
;
import
de.tudarmstadt.maki.simonstrator.api.EventHandler
;
import
de.tudarmstadt.maki.simonstrator.api.Randoms
;
import
de.tudarmstadt.maki.simonstrator.api.component.vehicular.api.EdgeController
;
import
de.tudarmstadt.maki.simonstrator.api.component.vehicular.api.SimulationSetupExtractor
;
...
...
@@ -126,6 +129,14 @@ public class TraciSimulationController implements VehicleController, SimulationS
Runtime
.
getRuntime
().
addShutdownHook
(
new
Thread
(
shutdownHook
));
_initalized
=
true
;
Event
.
scheduleWithDelay
(
Simulator
.
getEndTime
()-
Simulator
.
getCurrentTime
(),
new
EventHandler
()
{
@Override
public
void
eventOccurred
(
Object
content
,
int
type
)
{
_connection
.
close
();
}
},
null
,
0
);
}
}
...
...
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