Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
9.2.2023: Due to updates GitLab will be unavailable for some minutes between 9:00 and 11:00.
Open sidebar
vadere
vadere
Commits
507cadda
Commit
507cadda
authored
Jul 15, 2019
by
Daniel Lehmberg
Browse files
Check to catch undetected error in TestEvacuationTimeProcessor
parent
48ab29e4
Changes
1
Hide whitespace changes
Inline
Side-by-side
VadereSimulator/src/org/vadere/simulator/projects/dataprocessing/processor/tests/TestPedestrianEvacuationTimeProcessor.java
View file @
507cadda
...
...
@@ -42,15 +42,24 @@ public class TestPedestrianEvacuationTimeProcessor extends TestProcessor {
@Override
public
void
postLoop
(
SimulationState
state
)
{
Double
maximalEvacTime
=
getAttributes
().
getMaximalEvacuationTime
();
Double
minimalEvacTime
=
getAttributes
().
getMinimalEvacuationTime
();
Double
finishTime
=
state
.
getScenarioStore
().
getAttributesSimulation
().
getFinishTime
();
// See issue #249, this is only for security such that the tests work correctly
if
(
finishTime
<=
maximalEvacTime
){
handleAssertion
(
false
,
"finishTime in Simulation options has to be larger than maximalEvacTime"
);
}
pedestrianEvacuationTimeProcessor
.
postLoop
(
state
);
int
invalidEvacuationTimes
=
0
;
for
(
PedestrianIdKey
key
:
pedestrianEvacuationTimeProcessor
.
getKeys
())
{
Double
evacTime
=
pedestrianEvacuationTimeProcessor
.
getValue
(
key
);
Double
maximalEvacTime
=
getAttributes
().
getMaximalEvacuationTime
();
Double
minimalEvacTime
=
getAttributes
().
getMinimalEvacuationTime
();
if
((
evacTime
==
Double
.
POSITIVE_INFINITY
&&
maximalEvacTime
!=
Double
.
POSITIVE_INFINITY
)
||
(
evacTime
<
minimalEvacTime
||
evacTime
>
maximalEvacTime
))
{
invalidEvacuationTimes
++;
...
...
@@ -63,7 +72,7 @@ public class TestPedestrianEvacuationTimeProcessor extends TestProcessor {
@Override
public
AttributesTestPedestrianEvacuationTimeProcessor
getAttributes
()
{
if
(
super
.
getAttributes
()
==
null
)
{
setAttributes
(
new
AttributesTest
NumberOverlaps
Processor
());
setAttributes
(
new
AttributesTest
PedestrianEvacuationTime
Processor
());
}
return
(
AttributesTestPedestrianEvacuationTimeProcessor
)
super
.
getAttributes
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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