Open louisgreiner opened 3 months ago
Review comments:
using the constraints et objective described in the following points
~et~ and
The name of the .csv
output file isn't specified. How's the filed supposed to be named ?
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 ?
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.
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
Example (for the NGE given in the implementation plan) :
Slight typo as C -> D should have 1 connection.
Example (for the NGE given in the implementation plan) :
Slight typo as C -> D should have 1 connection.
Oops, corrected
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
<sbb-icon svgIcon="five-circles-interconnected-small" class="sbb-icon-fit"></sbb-icon>
)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
.csv
: "origin_destination_matrix.csv"Example (for the NGE given in the implementation plan) :
Implementation plan
Launching the computation
-[ ] The button calls the corresponding function in the service
netzgrafik-editor-frontend/src/app/services/analytics/analytics.service.ts
int
, for now 5 by default)Computation itself
Mostly the proof of concept described above.
netzgrafik-editor-frontend/src/app/services/analytics/analytics.service.ts
serviceThe idea is to model our problem thanks to a DIRECTED graph, and to run several Dijkstra algorithms on this graph.
(node, departure or arrival, time or global, trainrunSectionId)
:(node.id, "arrival" or "departure", "global", None)
(node.id, "arrival", time of arrival, section id of the trainrunSection arriving here)
(node.id, "departure", time of departure, section id of the trainrunSection departing here)
Example of the graph + result on a 4 nodes NGE :
SVG NGE :
Json NGE : netzgrafik (6).json
Graph + shortest paths : https://sncf.sharepoint.com/:p:/r/sites/OSRD644GrpO365/Documents%20partages/PO/NGE/Graphe%20petit%20example.pptx?d=wc5052d73215542f7880e3691cce7d9b5&csf=1&web=1&e=LGNAxh
[ ] Run one Dijkstra algorithm for each node visible with the filtering (in the POC, the Dijkstra algorithm stops when all the "computation nodes" are visited (the others are not interesting)
[ ] One has to choose the window on which the graph is represented. In the POC, I chose 2 hours which is the maximum frequency.
Ideas to speed up if the computation is too long on large graphs :
How to read the NGE json :
nodes
: the nodes in NGEid
betriebspunkName
: What is written in the square in NGEports
: ports where the trainrunsections reach the nodes (used in transitions)transitions
: the transitions of trainruns within the node, saying whether the train stops or not:id
port1Id
: port of the 1st trainrunSectionport2Id
: port of the 2nd trainrunSectionisNonStopTransit
: false if there is a stop (so in our case a possible connection), true otherwiseconnections
: connections between trains at this node, we can ignore itconnectionTime
: minimum time to make a connection at this nodetrainruns
: represent train linesid
name
frequencyId
: id of thefrequency
, in the attribute "frequency
" to know how many minutes there are between two trainstrainrunTimeCategoryId
: id of thetrainrunTimeCategory
, in the attribut with this name, to know when the train operatestrainrunSections
: represents sections of a trainrun between two nodes (in both directions)id
sourceNodeId
: one of the nodes is the source, and it is its idsourcePortId
: port of the source node where the section goes (useful to link with transitions)targetNodeId
targetPortId
travelTime
: information about travelTimetime
: travel timesourceDeparture
: when the train leaves the sourcetime
: minutes of the hourconsecutiveTime
: number of minutes from the beginning of the first hour (useful make the difference between H05 and (H+1)05targetArrival
: when the train arrives at the targettargetDeparture
: when the train leaves the targetsourceArrival
: when the train arrives at the sourcetrainrunId
: id of the trainrunspecificTrainrunSectionFrequencyId
: if thetrainrunSection
has a specificfrequency
(not taken into account in the POC)metadata
trainrunFrequencies
: frequencies of trainrunsid
frequency
: number of minutes between two trainstrainrunTimeCategories
: categories of trainruns to know when they operateid
dayTimeInterval
: moments of the day when the train operates (24h if empty)from
: minutes of the day of the beginning of operation intervalto
: minutes of the day of the end of operation intervalweekday
: days of the week at which the train operates (Monday is 1)Output
Definition of ready
Data
PO
Technical
General
(development task template from OSRD)