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
3bc99890
Commit
3bc99890
authored
Oct 01, 2016
by
Jakob Schöttl
Browse files
Bugfix in log event processor
parent
77900831
Changes
2
Hide whitespace changes
Inline
Side-by-side
VadereSimulator/src/org/vadere/simulator/models/seating/LogEventProcessor.java
View file @
3bc99890
...
...
@@ -131,7 +131,12 @@ public class LogEventProcessor extends DataProcessor<IdDataKey, LogEventEntry> {
@Override
public
void
reachedTarget
(
Target
target
,
Agent
agent
)
{
writeSitDownEvent
((
Pedestrian
)
agent
,
seatNumber
);
final
Seat
seat
=
trainModel
.
getSeatForTarget
(
target
);
// This check is necessary because a second person could reach the
// target (and find that the seat is already taken).
// Order of listener invocations is not predictable, therefore both options are checked.
if
(
seat
.
isAvailable
()
||
seat
.
getSittingPerson
()
==
agent
)
writeSitDownEvent
((
Pedestrian
)
agent
,
seatNumber
);
}
}
...
...
VadereState/src/org/vadere/state/scenario/Target.java
View file @
3bc99890
...
...
@@ -15,7 +15,10 @@ public class Target implements ScenarioElement, Comparable<Target> {
private
final
AttributesTarget
attributes
;
private
final
Map
<
Integer
,
Double
>
enteringTimes
;
/** Collection of listeners - order does not play a role. */
/**
* Collection of listeners - unordered because it's order is not predictable
* (at least not for clients).
*/
private
final
Collection
<
TargetListener
>
targetListeners
=
new
LinkedList
<>();
public
Target
(
AttributesTarget
attributes
)
{
...
...
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