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
474971fe
Commit
474971fe
authored
Apr 06, 2018
by
Arne Graf
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed InsideAnalysis of ffRouter
parent
bdab5846
Pipeline
#8387
failed with stages
in 13 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
18 deletions
+23
-18
routing/ff_router/UnivFFviaFM.cpp
routing/ff_router/UnivFFviaFM.cpp
+23
-18
No files found.
routing/ff_router/UnivFFviaFM.cpp
View file @
474971fe
...
...
@@ -58,7 +58,7 @@ UnivFFviaFM::UnivFFviaFM(Room* roomArg, Configuration* const confArg, double hx,
_room
=
roomArg
->
GetID
();
std
::
vector
<
Line
>
lines
;
std
::
map
<
int
,
Line
>
tmpDoors
;
Line
anyDoor
=
Line
{};
for
(
auto
&
subroomMap
:
roomArg
->
GetAllSubRooms
())
{
SubRoom
*
subRoomPtr
=
subroomMap
.
second
.
get
();
std
::
vector
<
Wall
>
walls
=
std
::
vector
<
Wall
>
(
subRoomPtr
->
GetAllWalls
());
...
...
@@ -87,6 +87,7 @@ UnivFFviaFM::UnivFFviaFM(Room* roomArg, Configuration* const confArg, double hx,
lines
.
emplace_back
((
Line
)
*
cross
);
}
else
if
((
tmpDoors
.
count
(
uidNotConst
)
==
0
))
{
tmpDoors
.
emplace
(
std
::
make_pair
(
uidNotConst
,
(
Line
)
*
cross
));
anyDoor
=
Line
{
*
cross
};
}
}
for
(
auto
&
trans
:
tmpTrans
)
{
...
...
@@ -97,10 +98,10 @@ UnivFFviaFM::UnivFFviaFM(Room* roomArg, Configuration* const confArg, double hx,
lines
.
emplace_back
((
Line
)
*
trans
);
}
else
if
(
tmpDoors
.
count
(
uidNotConst
)
==
0
)
{
tmpDoors
.
emplace
(
std
::
make_pair
(
uidNotConst
,
(
Line
)
*
trans
));
anyDoor
=
Line
{
*
trans
};
}
}
//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
();
...
...
@@ -180,22 +181,26 @@ UnivFFviaFM::UnivFFviaFM(SubRoom* subRoomArg, Configuration* const confArg, doub
}
//find insidePoint and save it, together with UID
Line
anyDoor
=
Line
{
tmpDoors
.
begin
()
->
second
};
Point
normalVec
=
anyDoor
.
NormalVec
();
Point
midPoint
=
anyDoor
.
GetCentre
();
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
*
0.25
);
if
(
subRoomArg
->
IsInSubRoom
(
candidate
))
{
//_subroomUIDtoInsidePoint.emplace(std::make_pair(subRoomArg->GetUID(), candidate));
_subRoomPtrTOinsidePoint
.
emplace
(
std
::
make_pair
(
subRoomArg
,
candidate
));
}
else
{
Log
->
Write
(
"ERROR:
\t
In UnivFF InsidePoint Analysis"
);
}
}
Line
anyDoor
=
Line
{(
--
tmpDoors
.
end
())
->
second
};
Point
normalVec
=
anyDoor
.
NormalVec
();
double
length
=
normalVec
.
Norm
();
Point
midPoint
=
anyDoor
.
GetCentre
();
Point
candidate01
=
midPoint
+
(
normalVec
*
0.25
);
Point
candidate02
=
midPoint
-
(
normalVec
*
0.25
);
if
(
subRoomArg
->
IsInSubRoom
(
candidate01
))
{
_subRoomPtrTOinsidePoint
.
emplace
(
std
::
make_pair
(
subRoomArg
,
candidate01
));
}
else
{
//candidate = candidate - (normalVec * 0.25);
if
(
subRoomArg
->
IsInSubRoom
(
candidate02
))
{
_subRoomPtrTOinsidePoint
.
emplace
(
std
::
make_pair
(
subRoomArg
,
candidate02
));
}
else
{
Log
->
Write
(
"ERROR:
\t
In UnivFF InsidePoint Analysis"
);
bool
a
=
subRoomArg
->
IsInSubRoom
(
candidate01
);
bool
b
=
subRoomArg
->
IsInSubRoom
(
candidate02
);
a
=
b
&&
a
;
}
}
//_subroomUIDtoSubRoomPtr.emplace(std::make_pair(subRoomArg->GetUID(), subRoomArg));
//this will interpret "useWallDistances" as best as possible. Users should clearify with "setSpeedMode" before calling "AddTarget"
...
...
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