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
245cea17
Commit
245cea17
authored
Feb 06, 2019
by
Tobias Meuser
Browse files
Moved temporary road network file to user.home
parent
46b4892b
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 @
245cea17
...
...
@@ -58,7 +58,7 @@ import it.polito.appeal.traci.SumoTraciConnection;
*
*/
public
class
TraciSimulationController
implements
VehicleController
,
SimulationSetupExtractor
,
EdgeController
,
SimulatorObserver
{
private
static
final
File
TEMP_FILE
=
new
File
(
new
File
(
System
.
getProperty
(
"
java.io.tmpdi
r"
)
)
,
"road_network.tmp"
);
private
static
final
File
TEMP_FILE
=
new
File
(
new
File
(
System
.
getProperty
(
"
user.home"
)
+
"/.simonstrato
r"
),
"road_network.tmp"
);
private
static
final
boolean
TRAIN_PATH_PROBABILITIES
=
true
;
...
...
@@ -752,12 +752,14 @@ public class TraciSimulationController implements VehicleController, SimulationS
_roadNetwork
=
new
RoadNetwork
(
roadNetwork
,
this
,
true
);
try
{
ObjectOutputStream
outputStream
=
new
ObjectOutputStream
(
new
FileOutputStream
(
TEMP_FILE
));
if
(
TEMP_FILE
.
exists
()
||
TEMP_FILE
.
getParentFile
().
mkdirs
())
{
ObjectOutputStream
outputStream
=
new
ObjectOutputStream
(
new
FileOutputStream
(
TEMP_FILE
));
outputStream
.
writeObject
(
new
SerializableRoadNetwork
(
_roadNetwork
));
outputStream
.
writeObject
(
new
SerializableRoadNetwork
(
_roadNetwork
));
outputStream
.
flush
();
outputStream
.
close
();
outputStream
.
flush
();
outputStream
.
close
();
}
}
catch
(
IOException
e
)
{
//Nothing to do
e
.
printStackTrace
();
...
...
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