SchweizerischeBundesbahnen / netzgrafik-editor-frontend

The Netzgrafik-Editor is a powerful software that enables the creation, modification, and analysis of regular-interval timetable.
https://schweizerischebundesbahnen.github.io/netzgrafik-editor-frontend/
Other
32 stars 10 forks source link

NGE : Origin / Destination matrix as CSV #199

Open louisgreiner opened 3 months ago

louisgreiner commented 3 months ago

Description

First part of meta feature about O/D matrix

Implementation of O/D matrix and output as .csv.

https://colab.research.google.com/drive/1Z1r2uU2pgffWxCbG_wt2zoLStZKzWleE#scrollTo=F6vOevK6znee

A proof of concept has been done

(https://colab.research.google.com/drive/1Omx_qt2fnW1kJC6kQrhOgdkTZzmtibid?usp=sharing#scrollTo=EDXs4tO0kmDr) another one but with less results

Benefit hypothesis

See above meta.

Acceptance criteria

Launching the OD Matrix computation

Image Image

Details about the computation of the OD Matrix

A first POC is available, but does not take into account all these constraints, so if all the above AC are taken into account, this will check the following criteria

Output of the computation

Example (for the NGE given in the implementation plan) : image image image

Implementation plan

Launching the computation

-[ ] The button calls the corresponding function in the service netzgrafik-editor-frontend/src/app/services/analytics/analytics.service.ts

Computation itself

Mostly the proof of concept described above.

The idea is to model our problem thanks to a DIRECTED graph, and to run several Dijkstra algorithms on this graph.

Example of the graph + result on a 4 nodes NGE :

Ideas to speed up if the computation is too long on large graphs :

How to read the NGE json :

Output

Definition of ready

(development task template from OSRD)

axrolld commented 2 months ago

Review comments:

1

using the constraints et objective described in the following points

~et~ and

2

The name of the .csv output file isn't specified. How's the filed supposed to be named ?

3

First sheet : for each pair of nodes (i,j), the cell (i,j) contains the effective travel time of the optimal path from i to j (effective travel time includes connection times)

What's the unit of this travel time ? Seconds ? Minutes ? Or HH:MM:SS ?

Third sheet : for each pair of nodes (i,j), the cell (i,j) contains the cost of the optimal path (cost used in the Dijkstra algorithm)

What's the unit of the cost ?

shenriotpro commented 2 months ago

Review comments:

3

First sheet : for each pair of nodes (i,j), the cell (i,j) contains the effective travel time of the optimal path from i to j (effective travel time includes connection times)

What's the unit of this travel time ? Seconds ? Minutes ? Or HH:MM:SS ?

Third sheet : for each pair of nodes (i,j), the cell (i,j) contains the cost of the optimal path (cost used in the Dijkstra algorithm)

What's the unit of the cost ?

I'd usually recommend seconds, but I believe durations/times are in minutes for NGE.

louisgreiner commented 2 months ago

Review comments:

3

First sheet : for each pair of nodes (i,j), the cell (i,j) contains the effective travel time of the optimal path from i to j (effective travel time includes connection times)

What's the unit of this travel time ? Seconds ? Minutes ? Or HH:MM:SS ?

Time unit is indeed minute for NGE

https://github.com/SchweizerischeBundesbahnen/netzgrafik-editor-frontend/blob/e839ec247fe47fc057944fa6031dfefb7de09a04/src/app/data-structures/technical.data.structures.ts#L101

shenriotpro commented 2 weeks ago

Example (for the NGE given in the implementation plan) : image image image

Slight typo as C -> D should have 1 connection.

maelysLeratRosso commented 2 weeks ago

Example (for the NGE given in the implementation plan) : image image image

Slight typo as C -> D should have 1 connection.

Oops, corrected