SchweizerischeBundesbahnen / netzgrafik-editor-frontend

The Netzgrafik-Editor is a powerful software that enables the creation, modification, and analysis of regular-interval timetable.
Other
13 stars 7 forks source link

[Feature request]: Origin/destination analysis layer/Information extractor #126

Open aiAdrian opened 1 month ago

aiAdrian commented 1 month ago

Preflight Checklist

Request type

Request for a new component

Functionality

The Origin/Destination Analysis enables the analysis of travel times and connections in the network graph (timetable). In principle, the fastest connections are sought starting from a start node. In order to limit or penalize the number of transfers, the timetable planner has the option to penalize transfer connections with additional time. This allows the costs for transfers to be controlled and determines whether a travel chain may include more or fewer transfer operations. The feature should implement the following functions/requirements:

Embedded in a dialog

The origin/destination matrix is opened in a dialog window, similar to the trainrun dialog. The dialog box is centered in the window and can be toggled to full screen if requested by the user. Toggling the full screen mode off will reset it to the initial size. The dialog window can be freely moved. The dialog window can be closed, by clicking in the upper right corner. In the menu bar there will be a button to open/close the dialog window. The origin/destination matrix should be possible to open in the editor and in the Streckengrafik (time distance graph).

Design - proposals (TBD) for the matrix:

Filtering

Connectivty

Interactivity

E.g. BN to ZF

Search

Cell: Enter from / to Node shortname - will reduce the matrix dimension. Either no node is specified (full matrix), or only from / to (filtered matrix) or both (just one path).

UI Prototype

Editor image

Streckengrafik image

(The times, ... in the example are not correct, just a Mockup.)

Real-time feedback Once a path is selected in the origin/destination matrix, editing of the Netzgrafik is locked, which means no changes can be made. If no path is selected, any changes made in the Netzgrafik will result in an update of the matrix. It might be necessary to calculate it in a separate thread to ensure high responsiveness, but this needs to be tested during implementation.

Changing the filter immediately triggers an update.

If a path was selected and changing the filter causes the path to disappear (no longer feasible), it will result in the deselection of the path. However, if the previously selected path remains visible after changing the filter, it will remain selected as it was. The same behavior applies if the user deletes a trainrun and the path is no longer found or feasible. In such cases, the path will be deselected.

Open questions The CVS export button is missing, and the position for the input field and button has not been fixed yet. The transfer penalty must also be insertable.

Which design variant is the most readable and best fit? It needs to be determined.

Dependancy

https://github.com/SchweizerischeBundesbahnen/netzgrafik-editor-frontend/issues/77

louisgreiner commented 1 month ago

Thank you Adrian for the document, we will soon have a closer look at this feature and see how we can work from it !

aiAdrian commented 5 days ago

This comment can provide inspiration.

image

Please take a look at the feature (Analytics enabled / not yet well implemented) where the current version calculates the shortest path and uses the current network graphic for visualization.


image


image

The concept behind this online real-time analytics is to calculate the travel times from a specific node of interest to all other nodes in real-time. When the mouse pointer hovers over the "clock," the corresponding sector representing a 1-minute interval gets highlighted. If the user clicks on a sector, all paths are visualized. The visualized paths represent the shortest path taken to "implement" the travel chain, with the departure time at the node of interest set to the selected minute. Only the colors in the nodes are important, so the clocks are visualized with near-transparent opacity. If no sector/minute is selected, the colors in the nodes and the paths are not relevant, meaning the user can manipulate the network graphic normally, and the clocks will always adjust accordingly.

The business information behind this concept is that there is a passenger or goods ready to be transported at a specific node at a given time. Thus, the displayed travel chain (travel time) is the effective travel time for a passenger. The clock for #changes (Umsteigen) and #travel time (Reisezeit) gives a very quick overview of how well the concept is balanced.

Required interactions:

aiAdrian commented 5 days ago

Discussion: Meeting 03.07.2024

Commitment We agree that the Origin-Destination Matrix should be developed in small steps. We agree that it is currently very difficult to estimate how quickly the matrix can be calculated. Since each entry is a shortest path and the necessary information needs to be extracted for each of these paths, the computation time can potentially be very long. To get a sense of how quickly the many Dijkstra shortest paths can be calculated, we want to first develop or test the matrix as a pure CSV (comma-separated value) export.

Here's what we will do:

Ajdustment / Next steps

louisgreiner commented 3 days ago

Thank you for the debriefing, we indeed agree on your above comment.

First, we will search for an algorithm (if there is!) that enable the computation of some nodes to some nodes only, to allow taking in account the filtering, otherwise we might stick to Dijkstra. We thought on a way to reduce computational complexity : re-use the calculations on sections already computed.

We still have a few questions:

[!NOTE]
For implementation: do not forget to take in account the minimal connection time (of a node) when trying to compute shortest path