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
e7b78dd7
Commit
e7b78dd7
authored
Jul 04, 2016
by
Mohcine Chraibi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add destructor to class PedDistributor
parent
da927a2e
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
21 additions
and
18 deletions
+21
-18
IO/PedDistributionParser.cpp
IO/PedDistributionParser.cpp
+4
-0
IO/PedDistributionParser.h
IO/PedDistributionParser.h
+4
-4
pedestrian/AgentsSourcesManager.cpp
pedestrian/AgentsSourcesManager.cpp
+3
-3
pedestrian/PedDistributionLoader.h
pedestrian/PedDistributionLoader.h
+1
-0
pedestrian/PedDistributor.cpp
pedestrian/PedDistributor.cpp
+4
-4
pedestrian/PedDistributor.h
pedestrian/PedDistributor.h
+1
-1
routing/DirectionStrategy.cpp
routing/DirectionStrategy.cpp
+2
-2
visiLibity/source_code/visilibity.cpp
visiLibity/source_code/visilibity.cpp
+1
-2
visiLibity/source_code/visilibity.hpp
visiLibity/source_code/visilibity.hpp
+1
-2
No files found.
IO/PedDistributionParser.cpp
View file @
e7b78dd7
...
...
@@ -28,6 +28,10 @@ PedDistributionParser::PedDistributionParser(const Configuration* configuration)
}
PedDistributionParser
::~
PedDistributionParser
()
{
// delete _configuration;
}
bool
PedDistributionParser
::
LoadPedDistribution
(
vector
<
std
::
shared_ptr
<
StartDistribution
>
>&
startDis
,
vector
<
std
::
shared_ptr
<
StartDistribution
>
>&
startDisSub
,
std
::
vector
<
std
::
shared_ptr
<
AgentsSource
>
>&
startDisSources
)
...
...
IO/PedDistributionParser.h
View file @
e7b78dd7
...
...
@@ -28,10 +28,10 @@ class PedDistributionParser : public PedDistributionLoader {
public:
PedDistributionParser
(
const
Configuration
*
configuration
);
virtual
bool
LoadPedDistribution
(
std
::
vector
<
std
::
shared_ptr
<
StartDistribution
>>&
startDis
,
std
::
vector
<
std
::
shared_ptr
<
StartDistribution
>>&
startDisSub
,
std
::
vector
<
std
::
shared_ptr
<
AgentsSource
>>&
startDisSources
)
override
;
~
PedDistributionParser
();
virtual
bool
LoadPedDistribution
(
std
::
vector
<
std
::
shared_ptr
<
StartDistribution
>
>&
startDis
,
std
::
vector
<
std
::
shared_ptr
<
StartDistribution
>
>&
startDisSub
,
std
::
vector
<
std
::
shared_ptr
<
AgentsSource
>
>&
startDisSources
)
override
;
private:
const
Configuration
*
_configuration
;
...
...
pedestrian/AgentsSourcesManager.cpp
View file @
e7b78dd7
...
...
@@ -186,10 +186,10 @@ void AgentsSourcesManager::ComputeBestPositionVoronoi(AgentsSource* src,
for
(
auto
&&
ped
:
peds
)
{
double
dist
=
(
pos
-
ped
->
GetPos
()).
NormSquare
();
if
(
dist
<
min_dist
)
double
dist
ance
=
(
pos
-
ped
->
GetPos
()).
NormSquare
();
if
(
dist
ance
<
min_dist
)
{
min_dist
=
dist
;
min_dist
=
dist
ance
;
}
}
map_dist_to_position
[
min_dist
]
=
pos
;
...
...
pedestrian/PedDistributionLoader.h
View file @
e7b78dd7
...
...
@@ -14,6 +14,7 @@ public:
virtual
bool
LoadPedDistribution
(
std
::
vector
<
std
::
shared_ptr
<
StartDistribution
>>
&
startDis
,
std
::
vector
<
std
::
shared_ptr
<
StartDistribution
>>
&
startDisSub
,
std
::
vector
<
std
::
shared_ptr
<
AgentsSource
>>
&
startDisSources
)
=
0
;
virtual
~
PedDistributionLoader
()
{};
};
#endif //JPSCORE_PEDDISTRIBUTIONLOADER_H
...
...
pedestrian/PedDistributor.cpp
View file @
e7b78dd7
...
...
@@ -62,7 +62,7 @@ PedDistributor::PedDistributor(const Configuration *configuration) : _configurat
}
parser
->
LoadPedDistribution
(
_start_dis
,
_start_dis_sub
,
_start_dis_sources
);
delete
parser
;
}
...
...
@@ -166,7 +166,7 @@ bool PedDistributor::Distribute(Building *building) const {
// Distributing
Log
->
Write
(
"INFO:
\t
Distributing %d Agents in Room/Subrom [%d/%d]! Maximum allowed: %d"
,
N
,
roomID
,
subroomID
,
max_pos
);
DistributeInSubRoom
(
sr
,
N
,
allpos
,
&
pid
,
dist
.
get
(),
building
);
DistributeInSubRoom
(
N
,
allpos
,
&
pid
,
dist
.
get
(),
building
);
Log
->
Write
(
"
\t
...Done"
);
nPeds_is
+=
N
;
}
...
...
@@ -242,7 +242,7 @@ bool PedDistributor::Distribute(Building *building) const {
dist
->
SetSubroomID
(
sr
->
GetSubRoomID
());
//dist->SetSubroomUID(sr->GetSubRoomUID())
if
(
akt_anz
[
is
]
>
0
)
{
DistributeInSubRoom
(
sr
,
akt_anz
[
is
],
allFreePosInRoom
[
is
],
&
pid
,
dist
.
get
(),
building
);
DistributeInSubRoom
(
akt_anz
[
is
],
allFreePosInRoom
[
is
],
&
pid
,
dist
.
get
(),
building
);
}
}
nPeds_is
+=
N
;
...
...
@@ -483,7 +483,7 @@ vector<Point> PedDistributor::PossiblePositions(const SubRoom &r) {
* nächsten Aufruf)
* - routing: wird benötigt um die Zielline der Fußgänger zu initialisieren
* */
void
PedDistributor
::
DistributeInSubRoom
(
SubRoom
*
r
,
int
nAgents
,
vector
<
Point
>
&
positions
,
int
*
pid
,
void
PedDistributor
::
DistributeInSubRoom
(
int
nAgents
,
vector
<
Point
>
&
positions
,
int
*
pid
,
StartDistribution
*
para
,
Building
*
building
)
const
{
// set the pedestrians
for
(
int
i
=
0
;
i
<
nAgents
;
++
i
)
{
...
...
pedestrian/PedDistributor.h
View file @
e7b78dd7
...
...
@@ -77,7 +77,7 @@ public:
/**
* Distribute the pedestrians in the Subroom with the given parameters
*/
void
DistributeInSubRoom
(
SubRoom
*
r
,
int
N
,
std
::
vector
<
Point
>
&
positions
,
int
*
pid
,
void
DistributeInSubRoom
(
int
N
,
std
::
vector
<
Point
>
&
positions
,
int
*
pid
,
StartDistribution
*
parameters
,
Building
*
building
)
const
;
/**
...
...
routing/DirectionStrategy.cpp
View file @
e7b78dd7
...
...
@@ -684,8 +684,8 @@ void DirectionSubLocalFloorfield::Init(Building* buildingArg, double stepsize,
targets
.
emplace_back
(
pair
.
second
);
}
}
std
::
string
filename
=
"floorfield"
+
std
::
to_string
(
subroomUID
)
+
".vtk"
;
locffviafm
[
subroomUID
]
->
writeFF
(
filename
,
targets
);
std
::
string
filename
1
=
"floorfield"
+
std
::
to_string
(
subroomUID
)
+
".vtk"
;
locffviafm
[
subroomUID
]
->
writeFF
(
filename
1
,
targets
);
}
}
...
...
visiLibity/source_code/visilibity.cpp
View file @
e7b78dd7
...
...
@@ -2708,8 +2708,7 @@ namespace VisiLibity
}
void
Guards
::
snap_to_boundary_of
(
const
Environment
&
environment_temp
,
double
epsilon
)
void
Guards
::
snap_to_boundary_of
(
const
Environment
&
environment_temp
)
{
for
(
unsigned
i
=
0
;
i
<
positions_
.
size
();
i
++
)
positions_
[
i
].
snap_to_boundary_of
(
environment_temp
);
...
...
visiLibity/source_code/visilibity.hpp
View file @
e7b78dd7
...
...
@@ -1781,8 +1781,7 @@ namespace VisiLibity
* \remarks O(N*n) time complexity, where N is the guard count and
* n is the number of vertices in \a environment_temp
*/
void
snap_to_boundary_of
(
const
Environment
&
environment_temp
,
double
epsilon
=
0.0
);
void
snap_to_boundary_of
(
const
Environment
&
environment_temp
);
/** \brief relocate each guard to closest Point on boundary if
* within \a epsilon of the boundary (of \a polygon_temp)
*
...
...
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