Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
vadere
vadere
Commits
0d14236f
Commit
0d14236f
authored
Nov 13, 2016
by
Jakob Schöttl
Browse files
Refactoring
parent
381c709f
Changes
1
Hide whitespace changes
Inline
Side-by-side
VadereSimulator/src/org/vadere/simulator/projects/ScenarioRun.java
View file @
0d14236f
...
@@ -44,6 +44,7 @@ public class ScenarioRun implements Runnable {
...
@@ -44,6 +44,7 @@ public class ScenarioRun implements Runnable {
private
ScenarioFinishedListener
finishedListener
;
private
ScenarioFinishedListener
finishedListener
;
private
Simulation
simulation
;
private
Simulation
simulation
;
private
ProcessorManager
processorManager
;
private
final
Scenario
scenario
;
private
final
Scenario
scenario
;
private
final
ScenarioStore
scenarioStore
;
// contained in scenario, but here for convenience
private
final
ScenarioStore
scenarioStore
;
// contained in scenario, but here for convenience
...
@@ -77,13 +78,13 @@ public class ScenarioRun implements Runnable {
...
@@ -77,13 +78,13 @@ public class ScenarioRun implements Runnable {
final
Random
random
=
modelBuilder
.
getRandom
();
final
Random
random
=
modelBuilder
.
getRandom
();
// prepare processors and simulation data writer
// prepare processors and simulation data writer
final
ProcessorManager
processorManager
=
dataProcessingJsonManager
.
createProcessorManager
(
mainModel
);
processorManager
=
dataProcessingJsonManager
.
createProcessorManager
(
mainModel
);
createAndSetOutputDirectory
(
processorManager
);
createAndSetOutputDirectory
();
scenario
.
saveToOutputPath
(
outputPath
);
scenario
.
saveToOutputPath
(
outputPath
);
sealAllAttributes
(
processorManager
);
sealAllAttributes
();
// Run simulation main loop from start time = 0 seconds
// Run simulation main loop from start time = 0 seconds
simulation
=
new
Simulation
(
mainModel
,
0
,
scenarioStore
.
name
,
scenarioStore
,
passiveCallbacks
,
random
,
processorManager
);
simulation
=
new
Simulation
(
mainModel
,
0
,
scenarioStore
.
name
,
scenarioStore
,
passiveCallbacks
,
random
,
processorManager
);
...
@@ -196,7 +197,7 @@ public class ScenarioRun implements Runnable {
...
@@ -196,7 +197,7 @@ public class ScenarioRun implements Runnable {
// Output stuff...
// Output stuff...
private
void
createAndSetOutputDirectory
(
final
ProcessorManager
processorManager
)
{
private
void
createAndSetOutputDirectory
()
{
try
{
try
{
// Create output directory
// Create output directory
Files
.
createDirectories
(
outputPath
);
Files
.
createDirectories
(
outputPath
);
...
@@ -238,7 +239,7 @@ public class ScenarioRun implements Runnable {
...
@@ -238,7 +239,7 @@ public class ScenarioRun implements Runnable {
return
scenario
;
return
scenario
;
}
}
p
ublic
void
sealAllAttributes
(
final
ProcessorManager
processorManager
)
{
p
rivate
void
sealAllAttributes
()
{
scenarioStore
.
sealAllAttributes
();
scenarioStore
.
sealAllAttributes
();
processorManager
.
sealAllAttributes
();
processorManager
.
sealAllAttributes
();
}
}
...
...
Write
Preview
Supports
Markdown
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