JuPedSim / jpsreport

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

Improper output data generated with Method D #191

Open RajkumarChotia opened 3 years ago

RajkumarChotia commented 3 years ago

I am trying to generate the output with Method D for my geometry file.
With this jpsreport inifile I am just getting the data in form of frames, density, and velocity only.

The data which should be generated when Local_IFD enabled="true", is not generated.

I am providing the links for the input file of JPScore and JPSreport, geometry file and also the output file generated with these files:

Along with the above-mentioned output file I am able to generate the data of density and velocity for every frame under this path (./Output/Fundamental_Diagram/Classical_Voronoi/field/)

I am not been able to generate the results with following paths:

Could you please look into it and point me in the right direction?

Thanks and Regards

gjaeger commented 3 years ago

Which commit has your version?

Can you share your logfile?

RajkumarChotia commented 3 years ago

Which commit has your version?

Can you share your logfile?

Sir I am using version 0.8.4

While running the simulation or generating the output data with the help of JPSreport, I am not getting any errors or warnings so there is no such log file is generated in this particular case.

gjaeger commented 3 years ago

Can you share the information from the console?

RajkumarChotia commented 3 years ago

Can you share the information from the console?

Sure. I am attaching the recorded video of the console.

https://user-images.githubusercontent.com/76860053/115329942-b51fac80-a1b0-11eb-8689-54b0506c498d.mp4

chraibi commented 3 years ago

This looks like a bug. I can reproduce it. The warning that pedestrians are not in the geometry e.g.

Warning:\tAt {:d}th frame pedestrian at <x={}, y={}> is not in geometry!

suggests that this function is not working. Probably because of the nature of this geometry.

In this screenshot the arrow points to ped at position (110.5, 60.4), which is inside the geometry.

Screenshot 2021-04-20 at 09 17 02

Attached is my log.txt

schroedtert commented 3 years ago

I will take a deeper look into this in the next days.

RajkumarChotia commented 3 years ago

I will take a deeper look into this in the next days.

Sure. Please update me as soon as possible.

schroedtert commented 3 years ago

It might be an issue with the latest release version of jpsreport, could you try it with the attached newer version? I still get the warnings but at least some result. JPScore-0.8.4-win64.exe.zip

RajkumarChotia commented 3 years ago

It might be an issue with the latest release version of jpsreport, could you try it with the attached newer version? I still get the warnings but at least some result. JPScore-0.8.4-win64.exe.zip

Sure. I will try.

gjaeger commented 3 years ago

@schroedtert

Results with commit 9eda75b0:

% jpsreport plan2_jpsrt.xml
[2021-04-22 22:30:55.319] [info] Starting JuPedSim - JPSreport
[2021-04-22 22:30:55.319] [info] Version 0.8.4
[2021-04-22 22:30:55.319] [info] Commit id v0.8.4-1022-g9eda75b0
[2021-04-22 22:30:55.319] [info] Commit date Fri Nov 27 17:07:49 2020
[2021-04-22 22:30:55.319] [info] Build from branch HEAD
[2021-04-22 22:30:55.319] [info] Build with clang++(12.0.0)
[2021-04-22 22:30:55.319] [info] Parsing the ini file <plan2_jpsrt.xml>
[2021-04-22 22:30:55.323] [info] Geometry File is: <plan2.xml>
[2021-04-22 22:30:55.323] [info] Format of the trajectory file is: <.txt>
[2021-04-22 22:30:55.323] [info] Input trajectory file is <plan2_traj.txt>
[2021-04-22 22:30:55.323] [info] Input directory for loading trajectory is </results>
[2021-04-22 22:30:55.323] [info] Output directory for results is: </plan2_output>
[2021-04-22 22:30:55.323] [info] Measure area id  <1> with type <BoundingBox>
[2021-04-22 22:30:55.323] [info] Measure area points  <100.000, 46.000>
[2021-04-22 22:30:55.323] [info] Measure area points  <100.000, 42.000>
[2021-04-22 22:30:55.323] [info] Measure area points  <106.000, 42.000>
[2021-04-22 22:30:55.323] [info] Measure area points  <106.000, 46.000>
[2021-04-22 22:30:55.323] [info] Length in movement direction 4.000
[2021-04-22 22:30:55.323] [info] Measurement area id  <2> with type <Line>
[2021-04-22 22:30:55.323] [info] Measurement line starts from  <100.000, 42.000> to <106.000, 42.000>
[2021-04-22 22:30:55.323] [info] Both x and y-component of coordinates will be used to calculate instantaneous velocity over <10> frames
[2021-04-22 22:30:55.323] [info] Method D is selected with following options
[2021-04-22 22:30:55.323] [info] Measurement area id <1> will be used for analysis
[2021-04-22 22:30:55.323] [info] Local individual FD will be output
[2021-04-22 22:30:55.323] [info] Default Voronoi velocity calculation is used.
[2021-04-22 22:30:55.323] [info] Global IFD data will be calculated. Bounding box is created as measurement area.
[2021-04-22 22:30:55.327] [info] Loading building file successful!!!

[2021-04-22 22:30:55.327] [info] Init Geometry
[2021-04-22 22:30:55.327] [info] Init Geometry successful!!!

[2021-04-22 22:30:55.327] [info] Adding the room 'outside'
[2021-04-22 22:30:55.327] [info] INFO:  Adding surrounding room X: 43.20, Y: 122.00 -- -1.40,  74.00

[2021-04-22 22:30:55.327] [info] Bounding box:
        minX = 43.20
        maxX = 122.00
        minY = -1.40
        maxY = 74.00
[2021-04-22 22:30:55.327] [info] Finish parsing inifile
[2021-04-22 22:30:55.327] [info] Start Analysis for the file: plan2_traj.txt
[2021-04-22 22:30:55.327] [info] **********************************************************************
[2021-04-22 22:30:55.328] [info] Loading building file successful!!!

[2021-04-22 22:30:55.328] [info] Init Geometry
[2021-04-22 22:30:55.328] [info] Init Geometry successful!!!

[2021-04-22 22:30:55.329] [info] ReadGeometry with /plan2.xml.
[2021-04-22 22:30:55.329] [error] Exception in Analysis::InitArgs thrown, what: No polygon containing the measurement id -1.

with the last commit 5c0b5293:

[2021-04-22 22:45:30.839] [info] Starting JuPedSim - JPSreport
[2021-04-22 22:45:30.839] [info] Version 0.8.4
[2021-04-22 22:45:30.839] [info] Commit id v0.8.4-1024-g5c0b5293
[2021-04-22 22:45:30.839] [info] Commit date Mon Mar 15 12:24:32 2021
[2021-04-22 22:45:30.839] [info] Build from branch master
[2021-04-22 22:45:30.839] [info] Build with clang++(12.0.0)
[2021-04-22 22:45:30.839] [info] Parsing the ini file <"plan2_jpsrt.xml">
[2021-04-22 22:45:30.840] [info] Geometry File is: </plan2.xml>
[2021-04-22 22:45:30.840] [info] Format of the trajectory file is: <.txt>
[2021-04-22 22:45:30.840] [info] Input trajectory file is <plan2_traj.txt>
[2021-04-22 22:45:30.840] [info] Input directory for loading trajectory is </results>
[2021-04-22 22:45:30.840] [info] Output directory for results is: </plan2_output>
[2021-04-22 22:45:30.840] [info] Measure area id  <1> with type <BoundingBox>
[2021-04-22 22:45:30.840] [info] Measure area points  <100.000, 46.000>
[2021-04-22 22:45:30.840] [info] Measure area points  <100.000, 42.000>
[2021-04-22 22:45:30.841] [info] Measure area points  <106.000, 42.000>
[2021-04-22 22:45:30.841] [info] Measure area points  <106.000, 46.000>
[2021-04-22 22:45:30.841] [info] Length in movement direction 4.000
[2021-04-22 22:45:30.841] [info] Measurement area id  <2> with type <Line>
[2021-04-22 22:45:30.841] [info] Measurement line starts from  <100.000, 42.000> to <106.000, 42.000>
[2021-04-22 22:45:30.841] [info] Both x and y-component of coordinates will be used to calculate instantaneous velocity over <10> frames
[2021-04-22 22:45:30.841] [info] Method D is selected with following options
[2021-04-22 22:45:30.841] [info] Measurement area id <1> will be used for analysis
[2021-04-22 22:45:30.841] [info] Local individual FD will be output
[2021-04-22 22:45:30.841] [info] Default Voronoi velocity calculation is used.
[2021-04-22 22:45:30.841] [info] Global IFD data will be calculated. Bounding box is created as measurement area.
[2021-04-22 22:45:30.841] [info] Finish parsing inifile
[2021-04-22 22:45:30.841] [info] ReadGeometry with /plan2.xml.
[2021-04-22 22:45:30.843] [info] Start Analysis for the file: plan2_traj.txt
[2021-04-22 22:45:30.843] [info] **********************************************************************
[2021-04-22 22:45:30.853] [info] Bounding box: 
        minX = 43.20
        maxX = 114.70 
        minY = -1.40 
        maxY = 53.80
[2021-04-22 22:45:30.853] [info] the name of the trajectory is: <plan2_traj.txt>
[2021-04-22 22:45:30.853] [info] full name of the trajectory is: </plan2_traj.txt>
[2021-04-22 22:45:30.853] [info] Frame rate fps: <8.00>
[2021-04-22 22:45:30.853] [info] pos_id: 0
[2021-04-22 22:45:30.854] [info] pos_fr: 1
[2021-04-22 22:45:30.854] [info] pos_x: 2
[2021-04-22 22:45:30.854] [info] pos_y: 3
[2021-04-22 22:45:30.854] [info] pos_z: 4
[2021-04-22 22:45:30.854] [info] pos_vd: 9
[2021-04-22 22:45:31.043] [info] Finished reading the data
[2021-04-22 22:45:31.043] [info] Got 15901 lines
[2021-04-22 22:45:31.044] [info] minID: 1
[2021-04-22 22:45:31.044] [info] maxID: 90
[2021-04-22 22:45:31.044] [info] minFrame: 0
[2021-04-22 22:45:31.044] [info] numFrames: 315
[2021-04-22 22:45:31.045] [info] INFO: Total number of Agents: 90
[2021-04-22 22:45:31.045] [info] Enter CreateGlobalVariables with numPeds=90 and numFrames=315
[2021-04-22 22:45:31.045] [info] allocate memory for xCor
[2021-04-22 22:45:31.045] [info] allocate memory for yCor
[2021-04-22 22:45:31.045] [info] allocate memory for zCor
[2021-04-22 22:45:31.045] [info] allocate memory for index
[2021-04-22 22:45:31.046] [info] allocate memory for vComp
[2021-04-22 22:45:31.047] [info] Finished memory allocation
[2021-04-22 22:45:31.049] [info] Leave CreateGlobalVariables()
[2021-04-22 22:45:31.049] [info] Create Global Variables done
[2021-04-22 22:45:31.064] [info] convert x and y
[2021-04-22 22:45:31.070] [info] Save the data for each frame
[2021-04-22 22:45:31.080] [warning] Warning:    At 0th frame pedestrian at <x=110.5, y=60.4> is not in geometry!
... 
RajkumarChotia commented 3 years ago

It might be an issue with the latest release version of jpsreport, could you try it with the attached newer version? I still get the warnings but at least some result. JPScore-0.8.4-win64.exe.zip

I have tried this version, still did not get the data in proper format as the JPSreport is crashing. I am attaching the screenshot for your kind perusal. Capture

schroedtert commented 3 years ago

It seems like we have a bug with the global ifd option, I fixed it locally and will prepare the patch. Also there are some misleading warnings. The following warning just informs you that a pedestrian is not inside a specific measurement area, what obviously will happen a lot during the analysis:

[2021-04-23 15:31:44.361] [warning] Pedestrian with id <19> at <x=104.6700, y=29.8100, z=0.0000> is not in the geometry and will not beconsidered in the analysis!

Also there were some issues with the geometry. The line segments for the walls need to be ordered. The results with the temporary fix you can find here: results.zip. I still need to verify some stuff, if everything gets computed correctly.

Hopefully this will help you. Thanks for noticing us, we will try to get the fix into the program as quickly as possible.

RajkumarChotia commented 3 years ago

Sir I need to submit my thesis in about two weeks time and it could be really helpful if you provide the fixed version of software for generating the data as I have to run different simulations to compare the results.

chraibi commented 3 years ago

@RajkumarChotia First of all, please notice..

Screenshot 2021-04-29 at 10 23 27

@schroedtert wrote that

The results with the temporary fix you can find here: results.zip.

Could you tell us what is wrong with these results? Maybe it would help if you could just let us know what exactly do you want to measure.

schroedtert commented 3 years ago

Just an other question: What exactly do you want to calculate with jpsreport? In the provided ini-file you define a measurement area in the top right room for which you want to calculate the IFD, but you also want to calculate the IFD over the whole geometry (global_ifd option). Do you really want to calculate both?

RajkumarChotia commented 3 years ago

@RajkumarChotia First of all, please notice..

Screenshot 2021-04-29 at 10 23 27

@schroedtert wrote that

The results with the temporary fix you can find here: results.zip.

Could you tell us what is wrong with these results? Maybe it would help if you could just let us know what exactly do you want to measure.

Thanks a lot for helping me out. There is nothing wrong with the data which is generated, it is just that the data for path "Fundamental diagram/classical voronoi/field" is not there. I want to plot the voronoi diagram for the area defined in the infile. Secondly I want to compare the same for the different areas inside the geometry.

RajkumarChotia commented 3 years ago

Just an other question: What exactly do you want to calculate with jpsreport? In the provided ini-file you define a measurement area in the top right room for which you want to calculate the IFD, but you also want to calculate the IFD over the whole geometry (global_ifd option). Do you really want to calculate both?

Sir I put both option true because of the uncertainty in data generation as I was not getting anything. I want to generate the voronoi diagram for the defined area in input file for two location and then for entire geometry if possible.

schroedtert commented 3 years ago

Sir I put both option true because of the uncertainty in data generation as I was not getting anything. I want to generate the voronoi diagram for the defined area in input file for two location and then for entire geometry if possible.

If you need results quickly the easiest option is to stick with multiple measurement areas. It should be possible to locate one measurement area per room, covering everything. Drawback would be that there would be artifacts when pedestrians move from one room to the other, as the voronoi diagram would be cut at the door.

For the global IFD there seems to be an issue with cutting the walls properly as the walls to not have any thickness. This will take a while to be fixed as we need to restructure a couple of things that it will work properly, sorry for the inconvenience.

Please find attached a version of jpscore/jpsreport with reduced warnings and fixed warnings: JPScore-0.8.4-win64-858.exe.zip. If you need anything else let us know. And here is an updated version of the geometry, as the points of a polygon need to be in the correct order: plan2.xml.txt (please remove the .txt at the end of the file name, but github doesn't allow .xml files to be uploaded directly).