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
bdab5846
Commit
bdab5846
authored
Apr 06, 2018
by
Arne Graf
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added debug-lines, Floyed improved (checks DBL_MAX, repeat until final)
parent
a2dcea16
Pipeline
#8382
failed with stages
in 14 seconds
Changes
3
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
57 additions
and
250 deletions
+57
-250
routing/ff_router/UnivFFviaFM.cpp
routing/ff_router/UnivFFviaFM.cpp
+17
-12
routing/ff_router/ffRouter.cpp
routing/ff_router/ffRouter.cpp
+39
-237
routing/ff_router/ffRouter.h
routing/ff_router/ffRouter.h
+1
-1
No files found.
routing/ff_router/UnivFFviaFM.cpp
View file @
bdab5846
...
...
@@ -102,18 +102,21 @@ UnivFFviaFM::UnivFFviaFM(Room* roomArg, Configuration* const confArg, double hx,
//find insidePoint and save it, together with UID
Line
anyDoor
=
Line
{
tmpDoors
.
begin
()
->
second
};
Point
normalVec
=
anyDoor
.
NormalVec
();
double
length
=
normalVec
.
Norm
();
Point
midPoint
=
anyDoor
.
GetCentre
();
Point
candidate
=
midPoint
+
normalVec
*
0.5
;
if
(
subRoomPtr
->
IsInSubRoom
(
candidate
))
{
//_subroomUIDtoInsidePoint.emplace(std::make_pair(subRoomPtr->GetUID(), candidate));
_subRoomPtrTOinsidePoint
.
emplace
(
std
::
make_pair
(
subRoomPtr
,
candidate
));
Point
candidate
01
=
midPoint
+
(
normalVec
*
0.25
)
;
Point
candidate02
=
midPoint
-
(
normalVec
*
0.25
);
if
(
subRoomPtr
->
IsInSubRoom
(
candidate01
))
{
_subRoomPtrTOinsidePoint
.
emplace
(
std
::
make_pair
(
subRoomPtr
,
candidate
01
));
}
else
{
candidate
=
candidate
-
normalVec
;
if
(
subRoomPtr
->
IsInSubRoom
(
candidate
))
{
//_subroomUIDtoInsidePoint.emplace(std::make_pair(subRoomPtr->GetUID(), candidate));
_subRoomPtrTOinsidePoint
.
emplace
(
std
::
make_pair
(
subRoomPtr
,
candidate
));
//candidate = candidate - (normalVec * 0.25);
if
(
subRoomPtr
->
IsInSubRoom
(
candidate02
))
{
_subRoomPtrTOinsidePoint
.
emplace
(
std
::
make_pair
(
subRoomPtr
,
candidate02
));
}
else
{
Log
->
Write
(
"ERROR:
\t
In UnivFF InsidePoint Analysis"
);
bool
a
=
subRoomPtr
->
IsInSubRoom
(
candidate01
);
bool
b
=
subRoomPtr
->
IsInSubRoom
(
candidate02
);
a
=
b
&&
a
;
}
}
//_subroomUIDtoSubRoomPtr.emplace(std::make_pair(subRoomPtr->GetUID(), subRoomPtr));
...
...
@@ -180,12 +183,12 @@ UnivFFviaFM::UnivFFviaFM(SubRoom* subRoomArg, Configuration* const confArg, doub
Line
anyDoor
=
Line
{
tmpDoors
.
begin
()
->
second
};
Point
normalVec
=
anyDoor
.
NormalVec
();
Point
midPoint
=
anyDoor
.
GetCentre
();
Point
candidate
=
midPoint
+
normalVec
*
0.5
;
Point
candidate
=
midPoint
+
(
normalVec
*
0.125
)
;
if
(
subRoomArg
->
IsInSubRoom
(
candidate
))
{
//_subroomUIDtoInsidePoint.emplace(std::make_pair(subRoomArg->GetUID(), candidate));
_subRoomPtrTOinsidePoint
.
emplace
(
std
::
make_pair
(
subRoomArg
,
candidate
));
}
else
{
candidate
=
candidate
-
normalVec
;
candidate
=
candidate
-
(
normalVec
*
0.25
)
;
if
(
subRoomArg
->
IsInSubRoom
(
candidate
))
{
//_subroomUIDtoInsidePoint.emplace(std::make_pair(subRoomArg->GetUID(), candidate));
_subRoomPtrTOinsidePoint
.
emplace
(
std
::
make_pair
(
subRoomArg
,
candidate
));
...
...
@@ -463,7 +466,7 @@ void UnivFFviaFM::createPedSpeed(Pedestrian *const *pedsArg, int nsize, int mode
}
if
(
_speedFieldSelector
[
REDU_WALL_SPEED
]
&&
_mode
==
LINESEGMENT
)
{
//indicates, that the direction strat is using it
for
(
long
int
i
=
0
;
i
<
_grid
->
GetnPoints
();
++
i
)
{
_speedFieldSelector
[
PED_SPEED
][
i
]
=
_speedFieldSelector
[
PED
_SPEED
][
i
];
_speedFieldSelector
[
PED_SPEED
][
i
]
=
_speedFieldSelector
[
REDU_WALL
_SPEED
][
i
];
}
}
...
...
@@ -1459,8 +1462,10 @@ double UnivFFviaFM::getDistanceBetweenDoors(const int door1_ID, const int door2_
//find a key that belongs to door (must be one left or right and second one below or above)
if
(
_gridCode
[
key
+
1
]
==
door2_ID
)
{
key
=
key
+
1
;
}
else
{
}
else
if
(
_gridCode
[
key
-
1
]
==
door2_ID
)
{
key
=
key
-
1
;
}
else
{
Log
->
Write
(
"ERROR:
\t
In DistanceBetweenDoors"
);
}
}
return
_costFieldWithKey
[
door1_ID
][
key
];
...
...
routing/ff_router/ffRouter.cpp
View file @
bdab5846
This diff is collapsed.
Click to expand it.
routing/ff_router/ffRouter.h
View file @
bdab5846
...
...
@@ -189,7 +189,7 @@ protected:
Configuration
*
_config
;
std
::
map
<
std
::
pair
<
int
,
int
>
,
double
>
_distMatrix
;
std
::
map
<
std
::
pair
<
int
,
int
>
,
int
>
_pathsMatrix
;
std
::
map
<
std
::
pair
<
int
,
int
>
,
SubRoom
*
>
_subroomMatrix
;
//
std::map< std::pair<int, int> , SubRoom* > _subroomMatrix;
std
::
vector
<
int
>
_allDoorUIDs
;
std
::
vector
<
int
>
_localShortestSafedPeds
;
const
Building
*
_building
;
...
...
benjamin moehring
@moehring1
mentioned in issue
#269 (closed)
·
Apr 10, 2018
mentioned in issue
#269 (closed)
mentioned in issue #269
Toggle commit list
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