-
Notifications
You must be signed in to change notification settings - Fork 2
HumanitarianModel
To use this project, it is necessary to install Path_Finder, GicenterUtils and java.util.Map. The first library is in processing's library list.
The roads network JSON needed to run the sketch can be download here
This representation is based on from ABM repository from Mark Vilella
- Double click on
HumanitarianModel.pde. - Press the play button.
- Make some configurations to set up the zoom's size and the pathfinding algorithm to be used, as detailed below:
1. Keyboard functionality in principal canvas RouteModel
| Key | Functionality |
|---|---|
| UP | Increase zoom's overall size |
| DOWN | Decrease zoom's overall size |
| RIGHT | Increase zoom's size to the right |
| LEFT | Increase zoom's size to the left |
| 1 | Breadth first search algorithm |
| 2 | Dijkstra search algorithm |
| 3 | Crow search algorithm |
| 4 | Manhattan search algorithm |
2. Keyboard functionality in canvas Zoom
| Key | Functionality |
|---|---|
| a | Activate/Deactivate add lanes mode |
| d | Activate/Deactivate delete lanes mode |
| k | Toggle the Keystone calibration |
| s | Save calibrations |
| l | Load calibrations |
| g | Update guide points |
3. HumanitarianModel: This canvas shows Lima's road network (drawn as gray lines), hospitals (drawn as blue dots) and schools (drawn as green dots). On top, there is an square with red borders, which the delimits a certain area of the canvas.
4. Zoom: This canvas shows a zoomed version of the delimited area in the main canvas HumanitarianModel mentioned above.
5. Area delimitation: To delimit a new zoomed area, in the main canvas HumanitarianModel, press the mouse inside the square and then, drag it to another place on the map. The new area inside the square will be shown in Zoom.
6. Route finding: In Zoom, to see the shortest route between a certain school and its best alternative for a hospital (or viceversa), click the mouse within a dot. To not see the route anymore, click the mouse again.
7. Delete lanes from the network: In Zoom, press d to activate the delete lanes mode. To remove a lane, press the mouse on one of its sides, drag it and then, release it on its other side. This lane will change color. In order to deactivate this mode, press d again.
8. Add lanes to the network: In Zoom, press a to activate the add lanes mode. To add a new lane, press the mouse on a node of the network, drag it and then, release it on another node. The new lane will be drawn. Can be used to add back a previously removed lane. In order to deactivate this mode, press a again.
9. Final results: The shortest route will be drawn in Zoom. It might be the case that the route goes outside the delimited area.
The shortest route will change wether a lane is added or deleted, which can be seen in the following image: