¿ªÔÆÌåÓý

Locked Re: Jython Script output problem #timetable-tool


 

Iain,

The sorted issue also got me at first, then I remember "read up" and "read down¡±.

Setting train direction is a challenge. It is especially tough for turns. I have added direction detection to your script.

/g/jmriusers/files/ProblemsBeingWorkedOn/dsand/IMTTimeTableExportOrdered.py

This is done while building the train list and adding a direction value to the trainMap. A small change to the stops section gets the output in the proper locations.

Recommendation: In the group¡¯s ProblemsBeingWorkedOn, create a folder for yourself and put your items in there. This makes it easier to share files.


Dave Sand

On Dec 19, 2018, at 8:34 AM, Iain <iain@...> wrote:

The result of the "sorted" caught me out! I thought it must be wrong - before I remembered that stops are listed in time order hence it was quite right for a train leaving Lochinver earlier but arriving in Ullapool later than a train leaving Ullapool to precede the Ullapool train in the sorted list. It looked odd but was right.

I have moved on and I am trying to output 3 lines per station depart up, arrive and depart down. Obviously one of the depart lines should be "_". Eventually any train that does not stop will only have an arrive time (not in the code yet). HOWEVER I have a problem with comparisons - I think that the time data is stored as minutes in a day, but it is probably a string. I have tried coercing the value in the hope of getting decimal - but my comparison resolutely fails.

If you have time, please could you tell me what is wrong at line 104 or around there. My mashed up code is in the problems file.

Join [email protected] to automatically receive all group messages.