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
JPSreport
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
JuPedSim
JPSreport
Commits
d1239d2d
Verified
Commit
d1239d2d
authored
Mar 01, 2019
by
Mohcine Chraibi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '98-PersID' of
http://gitlab.version.fz-juelich.de/jupedsim/jpsreport
into 98-PersID
parents
45d7003e
66265499
Pipeline
#17812
failed with stages
in 40 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
6 deletions
+17
-6
methods/Method_D.cpp
methods/Method_D.cpp
+1
-1
methods/PedData.cpp
methods/PedData.cpp
+15
-5
methods/PedData.h
methods/PedData.h
+1
-0
No files found.
methods/Method_D.cpp
View file @
d1239d2d
...
...
@@ -138,7 +138,7 @@ bool Method_D::Process (const PedData& peddata,const fs::path& scriptsLocation,
}
vector
<
int
>
ids
=
_peds_t
[
frameNr
];
vector
<
int
>
IdInFrame
=
peddata
.
GetIdInFrame
(
frameNr
,
ids
,
zPos_measureArea
);
vector
<
double
>
XInFrame
=
peddata
.
GetX
InFrame
(
frameNr
,
ids
,
zPos_measureArea
);
// vector<int> RealIdInFrame = peddata.GetRealId
InFrame(frameNr, ids, zPos_measureArea);
vector
<
double
>
YInFrame
=
peddata
.
GetYInFrame
(
frameNr
,
ids
,
zPos_measureArea
);
vector
<
double
>
VInFrame
=
peddata
.
GetVInFrame
(
frameNr
,
ids
,
zPos_measureArea
);
//vector int to_remove
...
...
methods/PedData.cpp
View file @
d1239d2d
...
...
@@ -29,6 +29,8 @@
#include "PedData.h"
#include <cmath>
#include <string>
#include <set>
using
std
::
string
;
using
std
::
map
;
using
std
::
vector
;
...
...
@@ -45,6 +47,7 @@ PedData::~PedData()
bool
PedData
::
ReadData
(
const
fs
::
path
&
projectRootDir
,
const
fs
::
path
&
outputLocation
,
const
fs
::
path
&
path
,
const
fs
::
path
&
filename
,
const
FileFormat
&
trajformat
,
int
deltaF
,
std
::
string
vComponent
,
const
bool
IgnoreBackwardMovement
)
{
_minID
=
INT_MAX
;
_maxID
=
INT_MAX
;
_minFrame
=
INT_MAX
;
_deltaF
=
deltaF
;
_vComponent
=
vComponent
;
...
...
@@ -218,10 +221,13 @@ bool PedData::InitializeVariables(const fs::path& filename)
Log
->
Write
(
"INFO:
\t
Finished reading the data"
);
}
fdata
.
close
();
Log
->
Write
(
"INFO: Got %d lines"
,
_IdsTXT
.
size
());
_minID
=
*
min_element
(
_IdsTXT
.
begin
(),
_IdsTXT
.
end
());
_maxID
=
*
max_element
(
_IdsTXT
.
begin
(),
_IdsTXT
.
end
());
Log
->
Write
(
"INFO: minID: %d"
,
_minID
);
Log
->
Write
(
"INFO: maxID: %d"
,
_maxID
);
_minFrame
=
*
min_element
(
_FramesTXT
.
begin
(),
_FramesTXT
.
end
());
Log
->
Write
(
"INFO: minFrame: %d"
,
_minFrame
);
//Total number of frames
...
...
@@ -230,12 +236,16 @@ bool PedData::InitializeVariables(const fs::path& filename)
//Total number of agents
std
::
vector
<
int
>
unique_ids
=
_IdsTXT
;
// no need to
// no need to
//sort. Assume that ids are ascendant
sort
(
unique_ids
.
begin
(),
unique_ids
.
end
());
std
::
vector
<
int
>::
iterator
it
;
it
=
unique
(
unique_ids
.
begin
(),
unique_ids
.
end
());
unique_ids
.
resize
(
distance
(
unique_ids
.
begin
(),
it
));
std
::
set
<
int
>
s
;
for
(
auto
a
:
_IdsTXT
)
{
s
.
insert
(
a
);
}
unique_ids
.
assign
(
s
.
begin
(),
s
.
end
()
);
_numPeds
=
unique_ids
.
size
();
Log
->
Write
(
"INFO: Total number of Agents: %d"
,
_numPeds
);
CreateGlobalVariables
(
_numPeds
,
_numFrames
);
...
...
methods/PedData.h
View file @
d1239d2d
...
...
@@ -95,6 +95,7 @@ private:
fs
::
path
_outputLocation
=
""
;
int
_minFrame
=
0
;
int
_minID
=
1
;
int
_maxID
=
0
;
int
_numFrames
=
0
;
// total number of frames
int
_numPeds
=
0
;
// total number of pedestrians
float
_fps
=
16
;
...
...
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