Elvas Tower: Timetable concept - Elvas Tower

Jump to content

  • 68 Pages +
  • « First
  • 51
  • 52
  • 53
  • 54
  • 55
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

Timetable concept Alternative way to define running of trains

#521 User is offline   joe_star 

  • Fireman
  • Group: Status: Active Member
  • Posts: 209
  • Joined: 16-January 13
  • Gender:Male
  • Simulator:MSTS
  • Country:

Posted 28 January 2023 - 10:06 AM

Hello,

I was testing the timetable pool concept today and ran into issues. OR seems to be crashing as below:-

Quote

Pool File : D:\Microsoft Games\Train Simulator\ROUTES\khyber\ACTIVITIES\OPENRAILS\Pools_Peshawar.pool-or


Information: Pool : D:\Microsoft Games\Train Simulator\ROUTES\khyber\ACTIVITIES\OPENRAILS\Pools_Peshawar.pool-or : line : 10 : unknown definition : ; line ignored



Turntable File : D:\Microsoft Games\Train Simulator\ROUTES\khyber\ACTIVITIES\OPENRAILS\TurntablePools_Peshawar.turntable-or


Error: System.NullReferenceException: Object reference not set to an instance of an object.
at Orts.Simulation.Timetables.TimetableTurntablePool..ctor(TimetableReader fileContents, Int32& lineindex, Simulator simulatorref) in C:\Jenkins\jobs\Open Rails Unstable\workspace\Source\Orts.Simulation\Simulation\Timetables\TTTurntable.cs:line 325
at Orts.Simulation.Timetables.TurntableInfo.ProcessTurntables(String[] arguments, CancellationToken cancellation) in C:\Jenkins\jobs\Open Rails Unstable\workspace\Source\Orts.Simulation\Simulation\Timetables\TurntableInfo.cs:line 83
at Orts.Simulation.Timetables.Poolholder..ctor(Simulator simulatorref, String[] arguments, CancellationToken cancellation) in C:\Jenkins\jobs\Open Rails Unstable\workspace\Source\Orts.Simulation\Simulation\Timetables\TTPool.cs:line 58
at Orts.Simulation.Simulator.StartTimetable(String[] arguments, CancellationToken cancellation) in C:\Jenkins\jobs\Open Rails Unstable\workspace\Source\Orts.Simulation\Simulation\Simulator.cs:line 493
at Orts.Viewer3D.Processes.GameStateRunActivity.Start(UserSettings settings, String acttype, String[] args) in C:\Jenkins\jobs\Open Rails Unstable\workspace\Source\RunActivity\Viewer3D\Processes\GameStateRunActivity.cs:line 330
at Orts.Viewer3D.Processes.GameStateRunActivity.<>c__DisplayClass42_0.<Load>b__3() in C:\Jenkins\jobs\Open Rails Unstable\workspace\Source\RunActivity\Viewer3D\Processes\GameStateRunActivity.cs:line 196
at Orts.Viewer3D.Processes.GameStateRunActivity.Load() in C:\Jenkins\jobs\Open Rails Unstable\workspace\Source\RunActivity\Viewer3D\Processes\GameStateRunActivity.cs:line 237
at Orts.Viewer3D.Processes.LoaderProcess.Load() in C:\Jenkins\jobs\Open Rails Unstable\workspace\Source\RunActivity\Viewer3D\Processes\LoaderProcess.cs:line 161
at Orts.Viewer3D.Processes.LoaderProcess.DoLoad() in C:\Jenkins\jobs\Open Rails Unstable\workspace\Source\RunActivity\Viewer3D\Processes\LoaderProcess.cs:line 140
at Orts.Viewer3D.Processes.LoaderProcess.LoaderThread() in C:\Jenkins\jobs\Open Rails Unstable\workspace\Source\RunActivity\Viewer3D\Processes\LoaderProcess.cs:line 111
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()


This happens regardless the turntable pool is called in the timetable or not, which leads me to think its turntable pool definition related. My turntable pool file is constructed as below:-

Quote

;#comment
#comment;PoolatJamrudTT
#name;KHPoolJamrudTT
#worldfile;w-003121+013995.w
#uid;1120
#storage;ja-tt-storage1
#access;ja-tt-access1


And my turntables.dat entry in question...

Quote

Turntable(
WFile ( "w-003121+013995.w" )
UiD ( 1120 )
XOffset ( 0 )
YOffset ( -1.92177 )
ZOffset ( 13.4 )
TrackShapeIndex ( 253 )
Animation ( "TRACKPIECE" )
Diameter ( 27 )
)


The turntable itself works fine in explore mode.

Any advice here? Thanks

#522 User is offline   roeter 

  • Vice President
  • Group: Status: Elite Member
  • Posts: 2,424
  • Joined: 25-October 11
  • Gender:Male
  • Country:

Posted 28 January 2023 - 01:22 PM

It could be that the program is having trouble with reading the last line of the turntable pool file, in which case it is missing the access path. There have been similar problems with other pool files. The the crash occcurs when trying to process the access path.
Try adding a #comment line at the end, below the access path line, and see if that helps.

Regards,
Rob Roeterdink

#523 User is offline   joe_star 

  • Fireman
  • Group: Status: Active Member
  • Posts: 209
  • Joined: 16-January 13
  • Gender:Male
  • Simulator:MSTS
  • Country:

Posted 29 January 2023 - 04:40 AM

View Postroeter, on 28 January 2023 - 01:22 PM, said:

It could be that the program is having trouble with reading the last line of the turntable pool file, in which case it is missing the access path. There have been similar problems with other pool files. The the crash occcurs when trying to process the access path.
Try adding a #comment line at the end, below the access path line, and see if that helps.

Regards,
Rob Roeterdink

Hello Rob,

I tried your suggestion above but got the same results. Both options below were attempted:-

adding only a comment line

adding following lines to the pool

#settings;force creation
;#comment



Quote

WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW TURNTBL
Pool File : D:\Microsoft Games\Train Simulator\ROUTES\khyber\ACTIVITIES\OPENRAILS\Pools_Peshawar.pool-or


Information: Pool : D:\Microsoft Games\Train Simulator\ROUTES\khyber\ACTIVITIES\OPENRAILS\Pools_Peshawar.pool-or : line : 10 : unknown definition : ; line ignored



Turntable File : D:\Microsoft Games\Train Simulator\ROUTES\khyber\ACTIVITIES\OPENRAILS\TurntablePools_Peshawar.turntable-or


Information: Pool : D:\Microsoft Games\Train Simulator\ROUTES\khyber\ACTIVITIES\OPENRAILS\TurntablePools_Peshawar.turntable-or : line : 8 : unknown definition : ; line ignored


Error: System.NullReferenceException: Object reference not set to an instance of an object.
at Orts.Simulation.Timetables.TimetableTurntablePool..ctor(TimetableReader fileContents, Int32& lineindex, Simulator simulatorref) in C:\Jenkins\jobs\Open Rails Unstable\workspace\Source\Orts.Simulation\Simulation\Timetables\TTTurntable.cs:line 325
at Orts.Simulation.Timetables.TurntableInfo.ProcessTurntables(String[] arguments, CancellationToken cancellation) in C:\Jenkins\jobs\Open Rails Unstable\workspace\Source\Orts.Simulation\Simulation\Timetables\TurntableInfo.cs:line 83
at Orts.Simulation.Timetables.Poolholder..ctor(Simulator simulatorref, String[] arguments, CancellationToken cancellation) in C:\Jenkins\jobs\Open Rails Unstable\workspace\Source\Orts.Simulation\Simulation\Timetables\TTPool.cs:line 58
at Orts.Simulation.Simulator.StartTimetable(String[] arguments, CancellationToken cancellation) in C:\Jenkins\jobs\Open Rails Unstable\workspace\Source\Orts.Simulation\Simulation\Simulator.cs:line 493
at Orts.Viewer3D.Processes.GameStateRunActivity.Start(UserSettings settings, String acttype, String[] args) in C:\Jenkins\jobs\Open Rails Unstable\workspace\Source\RunActivity\Viewer3D\Processes\GameStateRunActivity.cs:line 330
at Orts.Viewer3D.Processes.GameStateRunActivity.<>c__DisplayClass42_0.<Load>b__3() in C:\Jenkins\jobs\Open Rails Unstable\workspace\Source\RunActivity\Viewer3D\Processes\GameStateRunActivity.cs:line 196
at Orts.Viewer3D.Processes.GameStateRunActivity.Load() in C:\Jenkins\jobs\Open Rails Unstable\workspace\Source\RunActivity\Viewer3D\Processes\GameStateRunActivity.cs:line 237
at Orts.Viewer3D.Processes.LoaderProcess.Load() in C:\Jenkins\jobs\Open Rails Unstable\workspace\Source\RunActivity\Viewer3D\Processes\LoaderProcess.cs:line 161
at Orts.Viewer3D.Processes.LoaderProcess.DoLoad() in C:\Jenkins\jobs\Open Rails Unstable\workspace\Source\RunActivity\Viewer3D\Processes\LoaderProcess.cs:line 140
at Orts.Viewer3D.Processes.LoaderProcess.LoaderThread() in C:\Jenkins\jobs\Open Rails Unstable\workspace\Source\RunActivity\Viewer3D\Processes\LoaderProcess.cs:line 111
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()


My access path is as below. Note I do not have a roundhouse at the storage end, only a single stump track used for shunting (the turntable is only for rotating locomotives at the end of the line)

https://i.ibb.co/m0K3PxC/Capture.png

#524 User is offline   roeter 

  • Vice President
  • Group: Status: Elite Member
  • Posts: 2,424
  • Joined: 25-October 11
  • Gender:Male
  • Country:

Posted 29 January 2023 - 09:18 AM

Perhaps this might work - I checked all my own turntable pool files, and found that I always define the access path before the storage paths.
Could you try if that works?
Also, is there anything in the log-file which might give a clue?

Regards,
Rob Roeterdink

#525 User is offline   roeter 

  • Vice President
  • Group: Status: Elite Member
  • Posts: 2,424
  • Joined: 25-October 11
  • Gender:Male
  • Country:

Posted 02 February 2023 - 03:03 AM

After a lengthy spell of inactivity, I have now picked up the tools again and started to work on some ideas for improving and extending the funcionality of the timetable mode.
The first step however was to ensure my own version and the official version were back in line again. My own private version was still based on a release which was several years old, but had quite a number of small corrections and improvements to sort out some problems which I encountered over the years.

I have now managed to bring these versions back in line, and the latest unstable version has a series of small changes for timetable mode.
Note that these are mostly small corrections to avoid problems which mostly only occured in very specific situations. Some problems were a bit more general, like the very poor behaviour of own engines when these were turned on a turntable.

This is the list of changes :

  • hold signal logic - corrected to avoid removing hold signal info when train is not actually stopped in related station
  • turntable processing - various errors corrected, including using correct path and positioning erros when turning player locomotive
  • correction of logic for required actions for AI trains - sometimes two actions were created for a single stop signal, this could happen due to how signal information is restored after resume
  • improved logic for SWITCHSTAND type signals, avoiding route logic errors
  • correction of crash in TrainCar.cs, which could occur when player train started without engine
  • proper warning instead of crash when train is defined in timetable without start time
  • proper warnings instead of crashes for various station commands if these commands were set without actual station stop
  • improved output for debug info for trains, pools and turntables
  • correction in calculation of position of train ahead
  • correction in calculation of distance along track
  • removing physics update for static trains, which save CP time and also prevents static trains from unintended movement when placed on a gradient
  • outstanding ClearSection actions which were forced processed (e.g. on attach, detach etc.) were not removed from the action list, which could result in incorrect track clearance at a later time
  • saving and restoring turntable actions - if a save was made while 'somewhere' an engine was on a turntable, the outstanding actions for the turntable process were not saved and on restore, the engine was therefor stuck
  • improved logic for attach/detach/pickup/transfer functions, avoiding errors for these functions in particular when the player train is involved
  • a 'watchdog ping' is included in the initial Train Processing - on large timetables, this function can take a long time causing the watchdog to time out
  • improved call-on logic - in very specific situations, the call-on was not properly validated
  • syntax check for ApproachSpeed in sigcfg.dat did not support speed defined in mps
  • reassesment of hold signal and platform stop position if train uses alternative path through station
  • correcting missing action when $activate command was set for station stop


Furthermore, there was some code reconfiguring, moving specific 'pool' code from AI.cs to the pool code files.

Finally, there was a small change which allows passing times to be defined in timetables (as hhPmm), but this is just the first stage which allows this syntax but there is no processing linked to this as yet.

Timetables which are running correctly should not be affected by these changes.

Regards,
Rob Roeterdink

#526 User is offline   Weter 

  • Member, Board of Directors
  • PipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 6,916
  • Joined: 01-June 20
  • Gender:Not Telling
  • Simulator:ORTS
  • Country:

Posted 02 February 2023 - 10:04 AM

Great news, Robert.
For me, it's very happy event in ORTS history.

Quote

correction of crash in TrainCar.cs, which could occur when player train started without engine

Yes, that was serious worry.
May You try to do it for train without valid path and/or consist too?

Quote

improved call-on logic - in very specific situations, the call-on was not properly validated

Was it the reason, why locomotive wasn't allowed to enter the siding, where uncoupled train stands, preventing runaround action from being completed?

#527 User is offline   Aldarion 

  • Engineer
  • PipPipPipPipPip
  • Group: ET Owner
  • Posts: 629
  • Joined: 11-February 13
  • Gender:Male
  • Location:Lisbon, Portugal
  • Simulator:Open Rails
  • Country:

Posted 03 February 2023 - 01:45 AM

Hi Rob

I am so glad to hear that you're back on developing my favourite OR play mode.
Cant wait to try some of the fixes and new feaures and give some feed-back.

#528 User is offline   scottb613 

  • Vice President
  • Group: Status: First Class
  • Posts: 2,973
  • Joined: 06-July 09
  • Gender:Male
  • Location:Downeast Maine (soon)
  • Simulator:ORTS
  • Country:

Posted 03 February 2023 - 06:58 AM

Hi Rob,

Thanks for your efforts.

Just curious - the one thing that has had me going back to normal activity mode - is the horn/whistle. I'm going from memory - but - I don't think the horn/whistle wait points work in Timetable mode?

Would it be possible to build some functionality into TT to do this?

This is what I would like to see from a US steam guy.

Ideally:
  • Station Stops should include activation of Bell and Horn/Whistle prior to arriving at station.
  • Bell and Horn/Whistle should be activated prior to leaving station.
  • Trains passing through stations should blow Horn/Whistle.
  • Horn/Whistle at crossings.
  • Perhaps a config file where you can customize Horn/Whistle blasts - something like Morse Code with long and short blasts for different events? I know globally - standards vary - along with the WAV files we use.


Anyway - just my thoughts.

Please keep up the great work.
:)

Regards,
Scott

#529 User is offline   scottb613 

  • Vice President
  • Group: Status: First Class
  • Posts: 2,973
  • Joined: 06-July 09
  • Gender:Male
  • Location:Downeast Maine (soon)
  • Simulator:ORTS
  • Country:

Posted 03 February 2023 - 07:25 AM

View PostWeter, on 03 February 2023 - 07:05 AM, said:

Currently - no, Scott :(
I'd want that too.


Thanks Weter.

Regards,
Scott

#530 User is offline   Weter 

  • Member, Board of Directors
  • PipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 6,916
  • Joined: 01-June 20
  • Gender:Not Telling
  • Simulator:ORTS
  • Country:

Posted 03 February 2023 - 07:35 AM

Anyway, I was disappointed with activities creation in context of 1-track RR train passing 18 years ago and still not have been recovered with that (there were whole books written, how to workaround these issues, using invisible priority-suppression services,) but inspired a lot with realism and potential of TT mode, even without AI horn blows currently.

  • 68 Pages +
  • « First
  • 51
  • 52
  • 53
  • 54
  • 55
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users