PedestrianDynamics / jupedsim

JuPedSim is an open source pedestrian dynamics simulator
http://jupedsim.org
Other
40 stars 28 forks source link

Global shortest Router: Use of HLines #855

Closed RajkumarChotia closed 3 years ago

RajkumarChotia commented 3 years ago

JPSeditor 0.8.4

I have been trying to draw the floor plan of a building for pedestrian simulation. I drew the plan in JPSeditor and been able to define the rooms and doors for part of the geometry. However, for the remaining part, when I select the particular portion of the drawing, I am not able to see the selected walls in the `walls’ section of the editor (see the attached screenshot). I am unable to add the walls to the room, I have tried different types (office, lobby, corridor etc.). I am unsure why the color of the (problematic) walls is not black as the other walls.

I am also attaching the XML file of geometry (https://drive.google.com/file/d/16AtrO7BeJKGru6Sth401vaJL5WQLjtLi/view?usp=sharing) . Could you please point me in the right direction to fix this issue?

Capture drawing Hoping for your positive response as soon as possible

schroedtert commented 3 years ago

Sorry for the late reply. The issue lies within in the <undefined> part of the xml file. For me it helped, deleting it and adding the lines again. There are some parts of the geometry stored which are not yet linked with a room. It is sometimes a little bit difficult working with JPSeditor, as it not as stable as we wished.

Some which help me:

For your geometry I tried to fix it, hopefully this jelps (rename from txt to xml, github does not allow to upload xml files): corridor_geo.txt

If you need any further help, let me know. I will keep an eye on this issue now.

RajkumarChotia commented 3 years ago

Thanks for correcting the geometry file and for your valuable suggestions regarding geometry creation in JPSeditor.

The input file for JPScore is working fine with floor field global shortest router but when I am using global shortest and quickest routers they are showing an error message as shown in the attached image file. global shortest I am attaching

One more thing regarding the JPSeditor is that when I am providing the elevation to any room it is not taking any value and the visualizer shows a simple 2D geometry without any elevation. So this is causing trouble in connecting two floors of a building with stairs. could you please point me in the right direction? hoping for your positive response as soon as possible.

schroedtert commented 3 years ago

Is there a specific reason you want use then global_shortest router rather then the ff_global_shortest? The functionality is the same, with the disadvantage of the global_shortest router that it needs convex subrooms. This is the issue with Room 4 and Room 5 in the geometry. To solve this, either split the subroom into several convex one or add hlines to split it into convex subrooms.

For your other issue regarding the stairs, I assume there is something broken within JPSeditor. I suggest that you edit the xml file with an text editor (atom, notepad++, etc) and add edit the corresponding values for the subroom. See documention for subrooms for more details. The values for A_x, B_y and C_z need to be set according to the desired slope. You can check /demos/stairs for an example.

...
 <subroom id="1" class="stair" A_x="−1.2" B_y="0" C_z="0">
...

Sorry for the inconvenience.

chraibi commented 3 years ago

One more thing regarding the JPSeditor is that when I am providing the elevation to any room it is not taking any value and the visualizer shows a simple 2D geometry without any elevation.

I'm not sure what you exactly mean, but jpseditor does not show 3D-geometries. Have a look at this very old tutorial.

RajkumarChotia commented 3 years ago

One more thing regarding the JPSeditor is that when I am providing the elevation to any room it is not taking any value and the visualizer shows a simple 2D geometry without any elevation.

I'm not sure what you exactly mean, but jpseditor does not show 3D-geometries. Have a look at this very old tutorial.

I am sorry for poor language. The tutorial video of stairs is very helpful. Thanks

RajkumarChotia commented 3 years ago

Is there a specific reason you want use then global_shortest router rather then the ff_global_shortest? The functionality is the same, with the disadvantage of the global_shortest router that it needs convex subrooms. This is the issue with Room 4 and Room 5 in the geometry. To solve this, either split the subroom into several convex one or add hlines to split it into convex subrooms. For your other issue regarding the stairs, I assume there is something broken within JPSeditor. I suggest that you edit the xml file with an text editor (atom, notepad++, etc) and add edit the corresponding values for the subroom. See documention for subrooms for more details. The values for A_x, B_y and C_z need to be set according to the desired slope. You can check /demos/stairs for an example.

...
 <subroom id="1" class="stair" A_x="−1.2" B_y="0" C_z="0">
...

Sorry for the inconvenience.

Yes. I am planning for comparison of the results generated by three routers. The input file above mentioned shows the same error message for quickest router. Is it also because of the convex room issue or it has any other problem? Regarding Hlines, I do not understand the concept of it. Could you please provide me anything where I can look into it? hoping for your positive response. Thanks

chraibi commented 3 years ago

Yes. I am planning for a comparison of the results generated by three routers. In general, that would make sense, but in this case, these two routers are basically doing the same: Shortest path.

The input file above mentioned shows the same error message for quickest router. Is it also because of the convex room issue or it has any other problem?

if you are using an ff-router with the right strategy it should work fine. Is your geometry correct? Can you post a screenshot of jpsvis visualising your geometry?

Regarding Hlines, I do not understand the concept of it. Could you please provide me anything where I can look into it?

Hlines are some "help lines" that you decide to position in the geometry to steer the pedestrians. it's a workaround to overcome the visibility problem that faces the global_shortest router.

    <Hlines>
        <Hline id="1" room_id="1" subroom_id="0" >
            <vertex px="-1" py="1"/>
            <vertex px="-1" py="12"/>
        </Hline>
    </Hlines>
RajkumarChotia commented 3 years ago

Yes. I am planning for a comparison of the results generated by three routers. In general, that would make sense, but in this case, these two routers are basically doing the same: Shortest path.

The input file above mentioned shows the same error message for quickest router. Is it also because of the convex room issue or it has any other problem?

if you are using an ff-router with the right strategy it should work fine. Is your geometry correct? Can you post a screenshot of jpsvis visualising your geometry?

Regarding Hlines, I do not understand the concept of it. Could you please provide me anything where I can look into it?

Hlines are some "help lines" that you decide to position in the geometry to steer the pedestrians. it's a workaround to overcome the visibility problem that faces the global_shortest router.

  <Hlines>
      <Hline id="1" room_id="1" subroom_id="0" >
          <vertex px="-1" py="1"/>
          <vertex px="-1" py="12"/>
      </Hline>
  </Hlines>

When I am using ff router it is working fine but it is not working with global quickest router. I am posting the screenshot of the geometry visualized by JPSvis. geometry

Regarding Hlines is there any guideline for putting them or like how many we should put in a room or where should be their ideal location?

chraibi commented 3 years ago

No, there are no guidelines for HLines. It's up to you to decide where to put how many HLines. Here, is an example for using 3 HLines to steer pedestrians around a corner. One HLine could be also enough, but for a smoother movement, 3 may be better.

Screenshot 2021-02-11 at 09 59 07
chraibi commented 3 years ago

@RajkumarChotia any updates on the Hlines?

RajkumarChotia commented 3 years ago

@RajkumarChotia any updates on the Hlines?

Sorry for being late. I have been trying to define the Hlines at different possible locations in geometry. Whatever the information I got regarding the Hlines by tracking different issues asked over here and by drawing them, I get to the conclusion that we need to define the Hlines at locations which are causing hindrance to the exits provided to the agents as due to these locations agents are not finding the path to crossings or main exits. In my geometry I have tried to define the Hlines in room 4 and room 5 but the global shortest and quickest router are still not working. I have uploaded the screenshot of PowerShell window above which shows an error message as "there is no visibility path from crossing_0_room_0_subroom_1" so I tried to define some Hlines in front of that particular crossing and inside that room also but the result was same. If you allow, I would like to upload related files for your kind perusal and valuable suggestions regarding solution of this problem.

chraibi commented 3 years ago

Did the Hlines solve the problem "there is no visibility path from crossing_0_room_0_subroom_1" ?

RajkumarChotia commented 3 years ago

Did the Hlines solve the problem "there is no visibility path from crossing_0_room_0_subroom_1" ?

No sir.

chraibi commented 3 years ago

Okay, so would you share the relevant files?

RajkumarChotia commented 3 years ago

Okay, so would you share the relevant files?

Yes sir. geometry file:-https://drive.google.com/file/d/1HIhhtGOCxO5YTo4K_mWRfxsX4vTXiKvX/view?usp=sharing input file:- https://drive.google.com/file/d/1vpAN3tFks3quu8juRXMITejBbtjuGbY5/view?usp=sharing routing file:- https://drive.google.com/file/d/1nqrS33L-3nE3CLFXrAhAvvUcOcRdvA3M/view?usp=sharing

chraibi commented 3 years ago

@RajkumarChotia Something is wrong with the geometry file you just posted. I wanted to look at the HLines and see if their placement can be enhanced, but the geometry seems to be completely messed up. (there are some nan-value in there!)

I thought the geometry is fine. What happened?

Can you post a screenshot of your geometry? @schroedtert poster in his comment a geometry that works for me. Is it the same?

For the stairs, maybe you can use this script to calculate the A, B and C parameters.

RajkumarChotia commented 3 years ago

@RajkumarChotia Something is wrong with the geometry file you just posted. I wanted to look at the HLines and see if their placement can be enhanced, but the geometry seems to be completely messed up. (there are some nan-value in there!)

I thought the geometry is fine. What happened?

Can you post a screenshot of your geometry? @schroedtert poster in his comment a geometry that works for me. Is it the same?

For the stairs, maybe you can use this script to calculate the A, B and C parameters.

The link which I have shared with you previously is working fine for me. I am attaching the screenshot of geometry in JPSeditor as well as in JPSvis. geometry JPSeditor geometry JPSvis

Also with same geometry file the ff_global_shortest router is working fine.

chraibi commented 3 years ago

I just fixed the geometry. The link works fine, but the geometry was somehow broken. Anyway, now it runs okay with the global_shortest. I think the HLines are not placed well. I'll look at it.. Meanwhile, there is a hidden option (not documented), which is

      <parameters>
            <navigation_mesh method="triangulation" minimum_distance_between_edges="0.5" minimum_angle_in_triangles="20"
                       use_for_local_planning="true" />
      </parameters>

Now, the behavior changes completely. See this https://www.dropbox.com/s/ydoc9tzc0yw94u6/Screen%20Recording%202021-03-05%20at%2015.28.34.mov?dl=0

The agents disappear right after they leave the geometry. This is not quite realistic. Maybe it would be better to add a buffer room right after room 7 in order to keep them in the simulation for a while.

Screenshot 2021-03-05 at 15 22 47
RajkumarChotia commented 3 years ago

Yes its working fine with this hidden option. Whenever you will be looking into this Hline issue, could you please update me here that what went wrong? It will be really helpful for future use of software. Thanks a lot for helping me out here. Now I will try to use quickest router and get back to you in case some issue arises. Again thanks a lot.

chraibi commented 3 years ago

I can not tell you what went wrong with your files, but I can give you the updated files :-)

I don't know exactly what is the purpose of your simulations, but keep in mind the following:

For example, in room 5 you had two hlines that were not useful because they were not visible while finding a route outside. This way, agents will evacuate from rooms 1 to 4 to 7.

However, when I add a new line in room 5 (in file id=103) the situation changes, and agents start evacuating from 1 to 2 to 5 then to 7.

Please keep in mind, the global-router has a problem when the density is high or when agents are pushed in rooms they don't want to go to. This is why sometimes you may end up with a couple of agents stuck in corners. For this reason, I reduced the values of a of the model.

Here are my files. Hope this helps.

@RajkumarChotia: Should we close this issue?

results.zip

RajkumarChotia commented 3 years ago

I can not tell you what went wrong with your files, but I can give you the updated files :-)

I don't know exactly what is the purpose of your simulations, but keep in mind the following:

  • with navigation_mesh method activated you have no control over the router. You may also just use the ff-router and be happy.
  • with the navigation_mesh method deactivated (default), you may be able to manipulate the behavior of the global_router.

For example, in room 5 you had two hlines that were not useful because they were not visible while finding a route outside. This way, agents will evacuate from rooms 1 to 4 to 7.

However, when I add a new line in room 5 (in file id=103) the situation changes, and agents start evacuating from 1 to 2 to 5 then to 7.

Please keep in mind, the global-router has a problem when the density is high or when agents are pushed in rooms they don't want to go to. This is why sometimes you may end up with a couple of agents stuck in corners. For this reason, I reduced the values of a of the model.

Here are my files. Hope this helps.

@RajkumarChotia: Should we close this issue?

results.zip

Thanks for valuable suggestions, I will keep these things in mind. Since my dissertation submission will be in around two to three months, can we leave it open till then?

chraibi commented 3 years ago

I think it's better to close it. If you encounter the same error again, you can reopen it. Otherwise, you can always another issue for another problem.