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
1ed75a5d
Commit
1ed75a5d
authored
Aug 02, 2018
by
TLauster
Browse files
simiplified iteration calculation
parent
a2b9b0cb
Changes
1
Hide whitespace changes
Inline
Side-by-side
VadereSimulator/src/org/vadere/simulator/scripts/VadereAutomation.java
View file @
1ed75a5d
...
...
@@ -27,7 +27,7 @@ public class VadereAutomation {
private
static
final
String
SCENARIO_NAME
=
"Kreuzung_softShell_one_source"
;
private
static
final
String
SCENARIO_PATH
=
"C:/Studium/BA/vadereProjects/"
;
private
static
final
int
N_SIMULATIONS
=
10
;
private
static
final
int
N_CONCURENT_SIMULATIONS
=
20
;
//if this is choosen too high, out of memory errors may occur
private
static
final
int
N_CONCURENT_SIMULATIONS
=
9
;
//if this is choosen too high, out of memory errors may occur
private
static
Scenario
final_scenario
;
private
static
ArrayList
<
Thread
>
arrThreads
=
new
ArrayList
<>();
...
...
@@ -64,7 +64,7 @@ public class VadereAutomation {
// run simulations
int
amount
=
N_SIMULATIONS
;
int
numberOfIterations
=
(
N_SIMULATIONS
/
N_CONCURENT_SIMULATIONS
)
+
((
N_SIMULATIONS
%
N_CONCURENT_SIMULATIONS
==
0
)
?
0
:
1
);
int
numberOfIterations
=
(
int
)
Math
.
ceil
(((
double
)
N_SIMULATIONS
/
N_CONCURENT_SIMULATIONS
)
);
for
(
int
iteration
=
0
;
iteration
<
numberOfIterations
;
iteration
++)
{
...
...
@@ -171,7 +171,7 @@ class GeneratedDistributionWriter {
e
.
printStackTrace
();
}
}
public
static
GeneratedDistributionWriter
getInstance
()
{
return
inst
;
}
...
...
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