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
eeaf9995
Commit
eeaf9995
authored
Apr 01, 2022
by
Christina
Browse files
treat group members as lost if broad obstacle in between
parent
21f47b99
Pipeline
#860117
passed with stages
in 127 minutes and 4 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
VadereSimulator/src/org/vadere/simulator/models/groups/cgm/CentroidGroup.java
View file @
eeaf9995
...
...
@@ -223,6 +223,14 @@ public class CentroidGroup implements Group {
return
ret
;
}
public
boolean
isCentroidWithinObstacle
(){
// alternative: compute the centroid, loop through obstacles and check if shape.contains(centroid)
return
getPairIntersectObstacle
()
.
stream
().
map
(
pedestrianPairBooleanPair
->
pedestrianPairBooleanPair
.
getValue
())
.
anyMatch
(
val
->
val
);
}
public
ArrayList
<
Pair
<
PedestrianPair
,
Boolean
>>
getPairIntersectObstacle
(){
ArrayList
<
Pair
<
PedestrianPair
,
Boolean
>>
ret
=
new
ArrayList
<>(
getPairCount
());
...
...
VadereSimulator/src/org/vadere/simulator/models/groups/cgm/CentroidGroupSpeedAdjuster.java
View file @
eeaf9995
...
...
@@ -28,7 +28,11 @@ public class CentroidGroupSpeedAdjuster implements SpeedAdjuster {
// formular not completely the smae to seitz-2014 line 34 is 8/(delta +15) and not 8/(delta + 17)
if
(!
group
.
isLostMember
(
ped
))
{
if
(
aheadDistance
>
8
)
{
result
=
Double
.
MIN_VALUE
;
if
(!
group
.
isCentroidWithinObstacle
()){
result
=
Double
.
MIN_VALUE
;
// wait behavior
}
// else: do not wait, treat group member as "lost"
// holds if agents get seperated by obstacles broader 8[m]
}
else
if
(
aheadDistance
>=
1
)
{
result
/=
1.0
+
aheadDistance
/
8
-
1
/
8
+
1
;
}
else
if
(
aheadDistance
>=
0
)
{
...
...
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