JuPedSim / jpsreport

Analysis tool
https://www.jupedsim.org/jpsreport_introduction.html
Other
3 stars 9 forks source link

Method I | IndividualFD - zPos #132

Closed chraibi closed 5 years ago

chraibi commented 5 years ago

In Gitlab by @gjaeger on May 16, 2019, 07:55 [origin]

The data of each pedestrian i (ID, position, voronoi density and velocity and voronoi polygon) are written to the IndividualFD file (see line 250 in Method_I.cpp). The information about the z-position is missing. We should supplement the information.

line 269 in Method_I.cpp:

fprintf(_fIndividualFD,"#framerate (fps):\t%.2f\n\n#Frame \t PersID \t
        x/m \t y/m \t z/m \t 
        Individual density(m^(-2)) \t
        Individual velocity(m/s) \t 
        Voronoi Polygon\n",_fps);
chraibi commented 5 years ago

In Gitlab by @gjaeger on May 16, 2019, 15:46

@chraibi

based on our conversation today, see branch 107_Method_I_zPos

chraibi commented 5 years ago

In Gitlab by @chraibi on May 17, 2019, 14:21

Could you describe here what exactly is the missing feature?

chraibi commented 5 years ago

In Gitlab by @gjaeger on May 20, 2019, 07:53

changed the description

chraibi commented 5 years ago

In Gitlab by @gjaeger on May 20, 2019, 07:53

I have completed the description.

chraibi commented 5 years ago

In Gitlab by @gjaeger on May 22, 2019, 09:55

An example for the z-position (z for the measurement area and z of the pedestrian):

geo_RiMEA_Stau.xml

ini_RiMEA_Stau_01A.xml

traj_AH_RiMEA_Stau_01.txt

The trajectory file also contains body height (head height (AH):

# PersID Frame x/m y/m z/m AH/m

by the way: We need a column name for issue #63. The column name AH/m was taken from FDS+Evac.

chraibi commented 5 years ago

In Gitlab by @gjaeger on May 23, 2019, 10:18

I found a bug.

The z-position of the agents is 1.2 m (see traj-file).

When I change the z-position of the measurement area (e.g. zPos="1.0"):

  <measurement_areas unit="m">
    <area_B id="1" type="BoundingBox" zPos="1.0">
    </area_B>
  </measurement_areas>

If there are no people in the measuring area, then the jpsreport crashes with a segmentation fault (see also log_RiMEA_Stau_01A.txt):

$jpsreport ini_RiMEA_Stau_01A.xml
----
JuPedSim - JPSreport

Current date   : Thu May 23 10:05:35 2019
Version        : 0.8.4
Compiler       : g++ (8.3.0)
Commit hash    : v0.8.3-77-g54568d8-dirty
Commit date    : Tue Apr 9 05:53:35 2019
Branch         : Method_I_zPos
Python         : /opt/local/bin/python3.6 (3.6.8)
----

INFO:   Parsing the ini file <ini_RiMEA_Stau_01A.xml>
INFO:   logfile </Users/gjaeger/Documents/hubs/PhD/08_simulation/FDSEvac_RiMEA/export/log_RiMEA_Stau_01A.txt>
Segmentation fault: 11
chraibi commented 5 years ago

In Gitlab by @chraibi on May 23, 2019, 11:47

The bug is in this line

if(fabs(XInFrame[1]-XInFrame[0])<dmin)

which leads to a Segfault because XInFrame.size()==0 (no pedestrians in that frame).

As a possible fix, I think after this line

we should continue;

if(XInFrame.size() == 0) 
{
    Log->Write("Warning:\t no pedestrians in frame %d", frameNr);
    continue; 
}
chraibi commented 5 years ago

In Gitlab by @chraibi on May 23, 2019, 12:44

mentioned in commit bde33508c932ebe91c0c2fdef642206730632d23

chraibi commented 5 years ago

In Gitlab by @gjaeger on May 28, 2019, 08:31

It works.

chraibi commented 5 years ago

In Gitlab by @gjaeger on Jun 5, 2019, 09:53

@chraibi We can close this issue.

chraibi commented 5 years ago

In Gitlab by @gjaeger on Jun 7, 2019, 14:24

closed