Skip to content

Conversation

aiAdrian
Copy link
Contributor

@aiAdrian aiAdrian commented Jul 16, 2025

Description

This Pull Request introduces a function that exports raw trainrun data. The data is structured in a CSV format, capturing information about the name, frequency, direction, and travel time and stop information of the trains as PathTime. The PathTime data is a array and each element consists of the following elements:

  • Node: Name of the place or city.
  • ArrivalTime: Consecutive arrival time at the node: The time in minutes at which the train arrives at the node.
  • DepartureTime: Consecutive departure time at the node: The time in minutes at which the train leaves the node.
  • Stop: True if the train stops to allow passengers to board or alight and possibly take a connecting journey at the same node. False if the train does not stop, and passengers cannot board or alight.
  • ArrivalMinute: Arrival time at the node: The time in minutes at which the train arrives at the node - just the minute - 0..60.
  • DepartureMinute: Departure time at the node: The time in minutes at which the train leaves the node - just the minute - 0..60.

The implementation iterates through all available trainruns, filters them, and creates a corresponding CSV representation.

Issues / Dependancy

Once the one-way trainrun gets merged this export must be extend to one-way trainrun!
#477

Checklist

  • This PR contains a description of the changes I'm making
  • I've read the Contribution Guidelines
  • I've added tests for changes or features I've introduced
  • I documented any high-level concepts I'm introducing in documentation/
  • CI is currently green and this is ready for review

@aiAdrian aiAdrian self-assigned this Jul 16, 2025
@aiAdrian aiAdrian added the enhancement New feature or request label Jul 16, 2025
@aiAdrian
Copy link
Contributor Author

This PR allows experimental work with LLM - see comment (promp example)

Comment on lines +448 to +485
Build agent that can process, analyze, and compare timetable data. In order to do this, data with trainruns is required.
A timetable consists of at least one or an unlimited number of trainruns. Each trainrun is described with attributes
such as Name, Frequency, Direction, and PathTime.
Name: The name indicates the train journey, which usually consists of one forward and one backward trainrun.
If a train journey only travels in one direction, then the train journey consists only of a forward trainrun.
Frequency: Each train journey has a frequency attribute that indicates how often the train runs.
For example, a frequency of 15 means that a single train departs from the starting point every 15 minutes,
resulting in 4 trains per hour. A frequency of 30 means a new train starts every half hour,
and 60 means once per hour. The trains of the train journey consist solely of a master train.
Using the frequency, all train run of a timetable can be infinitely rolled out or unfolded from the train
journey and its journeys. This leads to a full-day timetable that is suitable for planning problems and also
for complex timetable analyses.
PathTime: This attribute describes the temporal and spatial sequence of the travel route.
PathTime is a vector that consists of the following elements:
- Node: Name of the place or city.
- ArrivalTime: Consecutive Arrival time at the node: The time in minutes at which the train arrives at the node.
- DepartureTime: Consecutive Departure time at the node: The time in minutes at which the train leaves the node.
- Stop: True if the train stops so that passengers can board or alight and possibly take a connecting journey at the same node.
False if the train does not stop and passengers cannot board or alight.
- ArrivalMinute: Arrival time at the node: The time in minutes at which the train arrives at the node - just the minute - 0..60
- DepatureMinute: Departure time at the node: The time in minutes at which the train leaves the node - just the minute - 0..60
Additional Information:
Within a train journey, all trainruns in opposite direction have a symmetric counterpart, expect there is just a one-way trainrun.
Symmetrical means that forward (F) and backward (B)
always have symmetrical times. The travel times are symmetrical to zero minutes, i.e., 60 minus the arrival
time corresponds to the departure time in the opposite direction.
Build the agent. Then ask the user if they can upload timetable data. Every time timetable data is uploaded,
create a new variant. Use only the timetable data that has been uploaded. Once a new variant is uploaded,
output in a table for the new data of the new variant how many trains were loaded and how many journes there are.
Only this should be output. Once everything is loaded, also output, "I am waiting for new instructions."
Output: Ask for the language the user would like to receive the response in. And write: "Please load the data by uploading CSV files."
Copy link
Contributor Author

@aiAdrian aiAdrian Jul 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(1) http://copilot.microsoft.com/
(2) Change deep thinker
(3) Copy this "promp"

Comment on lines +490 to +493
Please compare the variants and provide feedback on the differences you observe in the variants,
including route deviations, ArrivalMinute or DepatureMinute deviations, frequencies, ... .
The results should be visualized. For example, you could use a table with the variants and the
analysis results in the columns and the topic in the rows.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After you have uploaded at least two different trainrunExportFile.csv

Enter this prompt to first insights from copilot

@aiAdrian aiAdrian added experimental - might get merged and removed enhancement New feature or request labels Jul 25, 2025
@aiAdrian aiAdrian marked this pull request as draft August 7, 2025 15:32
@aiAdrian aiAdrian changed the title Export raw trainruns data [WIP]: Export raw trainruns data Aug 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant