Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
JPScore
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
92
Issues
92
List
Boards
Labels
Service Desk
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
JuPedSim
JPScore
Commits
abde4675
Commit
abde4675
authored
Jul 31, 2017
by
Arne Graf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ff_quickest with adaptive waveSpeed
parent
1bc1dadb
Pipeline
#4002
failed with stages
in 4 minutes and 6 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
12 deletions
+9
-12
routing/ff_router/UnivFFviaFM.cpp
routing/ff_router/UnivFFviaFM.cpp
+9
-12
No files found.
routing/ff_router/UnivFFviaFM.cpp
View file @
abde4675
...
...
@@ -402,6 +402,7 @@ void UnivFFviaFM::createPedSpeed(Pedestrian *const *pedsArg, int nsize, int mode
long
int
j_end
=
0
;
long
int
iStride
=
_grid
->
GetiMax
();
double
indexDistance
=
0.0
;
double
newWaveSpeed
=
0.0
;
// if (nsize == 0) {
// Log->Write("WARNING: \tcreatePedSpeed: nsize is ZERO");
...
...
@@ -424,10 +425,12 @@ void UnivFFviaFM::createPedSpeed(Pedestrian *const *pedsArg, int nsize, int mode
if
(
!
_grid
->
includesPoint
(
pedsArg
[
i
]
->
GetPos
()))
{
continue
;
}
/*this value defines the jam-speed threshold*/
// if (pedsArg[i]->GetEllipse().GetV().Norm() > 0.8*pedsArg[i]->GetEllipse().GetV0()) {
// continue;
// }
newWaveSpeed
=
pedsArg
[
i
]
->
GetEllipse
().
GetV
().
Norm
()
/
pedsArg
[
i
]
->
GetEllipse
().
GetV0
();
newWaveSpeed
*=
0.8
;
if
(
newWaveSpeed
<
0.1
)
{
newWaveSpeed
=
0.1
;
}
posIndex
=
_grid
->
getKeyAtPoint
(
pedsArg
[
i
]
->
GetPos
());
pos_i
=
_grid
->
get_i_fromKey
(
posIndex
);
pos_j
=
_grid
->
get_j_fromKey
(
posIndex
);
...
...
@@ -442,16 +445,10 @@ void UnivFFviaFM::createPedSpeed(Pedestrian *const *pedsArg, int nsize, int mode
for
(
long
int
curr_j
=
j_start
;
curr_j
<
j_end
;
++
curr_j
)
{
//indexDistance holds the square
indexDistance
=
(
(
curr_i
-
pos_i
)
*
(
curr_i
-
pos_i
)
+
(
curr_j
-
pos_j
)
*
(
curr_j
-
pos_j
)
);
//now using indexDistance to store the (speed) reduction value
//indexDistance = (delta*delta) - (indexDistance);
//if (indexDistance < 0) { indexDistance = 0.;}
//scale to [0 .. 1]
//indexDistance = indexDistance/(delta*delta);
//densityspeed[curr_j*grid->GetiMax() + curr_i] = (indexDistance > (delta*delta)) ? densityspeed[curr_j*grid->GetiMax() + curr_i] : .001;
if
(
indexDistance
<
(
delta
*
delta
))
{
//
std::cout << "c h a n g i n g "
;
_speedFieldSelector
[
PED_SPEED
][
curr_j
*
iStride
+
curr_i
]
=
0.2
;
//
_speedFieldSelector[PED_SPEED][curr_j*iStride + curr_i] = 0.2
;
_speedFieldSelector
[
PED_SPEED
][
curr_j
*
iStride
+
curr_i
]
=
std
::
min
(
newWaveSpeed
,
_speedFieldSelector
[
PED_SPEED
][
curr_j
*
iStride
+
curr_i
])
;
}
}
}
...
...
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