Elvas Tower: AI Dispatcher doesn't realize train length - Elvas Tower

Jump to content

  • 3 Pages +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • You cannot reply to this topic

AI Dispatcher doesn't realize train length Rate Topic: -----

#1 User is offline   railguy 

  • Engineer
  • Group: Posts: Contributing Member
  • Posts: 736
  • Joined: 10-October 10
  • Gender:Male
  • Location:Kansas
  • Simulator:Open Rails
  • Country:

Posted 25 December 2013 - 01:54 PM

I've been playing around with activities for Northwest Route V6--my activity on the signaled single track Canadian Pacific portion. My player train is an 85 car westbound manifest that meets a bunch of eastbound trains, some long and some short. My AI Dispatcher buddy--I call him "Hal"--isn't very bright about meets where the siding is too short for either train, though. If I set up the activity with optional passing paths at the sidings, good ol' Hal will set up a meet at one of the sidings, even though neither train will fit between switches. Hal should hold one or the other opposing trains at a siding where at least one train will fit, so that the meet will be successful. If I do this manually--by taking the player train out of automatic switches--I can pull the meet off at a longer siding without an issue.

I still like the OR dispatching system way better than MSTS, but this is one "quirk" that probably merits some attention. Thanks.

#2 User is offline   rdamurphy 

  • Open Rails Developer
  • Group: Private - Open Rails Developer
  • Posts: 1,199
  • Joined: 04-May 06
  • Gender:Male
  • Location:Thornton, CO
  • Simulator:MSTS - OR
  • Country:

Posted 25 December 2013 - 04:48 PM

In Real Life, the railroads have exactly the same problem.

The solution is not to create a train too long for the sidings...

I would, of course, defer to Rob, who does the signal programming, I believe it would be prohibitively difficult to program into the system to compensate for train lengths and siding lengths. I'm not even sure where the information would come from for siding lengths.

In addition, what if an AI train was spawned beyond a point where there was a siding that would hold it? Or if there weren't a siding long enough for either train on the route?

There are things that realistically can't be programmed to avoid, and this is probably one of them...

I can tell you, however, having been in a real life CTC center for the old Southern Pacific, it is one of the things that has to be planned for by flesh and blood dispatchers... In other words, the activity creator.

Robert

#3 User is offline   Coonskin 

  • Open Rails Developer
  • Group: Posts: Elite Member
  • Posts: 3,771
  • Joined: 15-January 04
  • Gender:Male
  • Location:Eastern Oklahoma
  • Country:

Posted 25 December 2013 - 05:20 PM

Yup, agree with Robert: AI Dispatcher logic that sophisticated is likely out of reach for a hobby-grade train sim "game".

Solution: Don't create trains too long for your shortest siding on the target route.

#4 User is offline   railguy 

  • Engineer
  • Group: Posts: Contributing Member
  • Posts: 736
  • Joined: 10-October 10
  • Gender:Male
  • Location:Kansas
  • Simulator:Open Rails
  • Country:

Posted 25 December 2013 - 08:21 PM

View PostCoonskin, on 25 December 2013 - 05:20 PM, said:

Yup, agree with Robert: AI Dispatcher logic that sophisticated is likely out of reach for a hobby-grade train sim "game".

Solution: Don't create trains too long for your shortest siding on the target route.


Sorry, folks, but having trains longer than sidings is a way of life in real world railroading. It's the dispatcher's job to choreograph meets that that accommodate that reality while minimally delaying trains. I should know, I dispatch trains in real life. As for the programming complexity for the AI dispatcher, I'm certain that it's complicated, but MSTS seems to have at least some of that logic in its dinosaur-old programming.

Let me step back and explain my thinking. Let's say you have a route that has sidings that are from 50 cars to 120 cars in length. The player train is 105 cars long. One of the opposing trains is 70 cars long. Now, one of the neat things about OR is that the AI Dispatcher is pretty dynamic. For example, if the engineer of the player train takes switches into manual operation, he effectively "gives back" his authority to the AI dispatcher and the AI Dispatcher recalculates traffic accordingly. Unlike MSTS, where lots of activities have to be played on a very precise schedule to avoid standoffs, etc., OR gives some flexibility. So, in my example, no matter what speed the player train is operating over its path, it has to make a meet with the 70 car train at a siding that is at least 70 cars long, otherwise--just as it is in real life, the trains would deadlock at a siding too short for either train. Yes, there could be a way to do a "saw-by" meet, but that would involve taking the switches to manual operation and allowing couplings and movements to be made with the player train coupling to parts of the AI train--messy. Saw-bys are a train crew's and dispatcher's nightmare in real life. In real world railroading, the dispatcher would plan a meet for the trains at a siding that would at least accommodate the shorter of the two trains. One could "hard-code" such a meet in OR, but if the timing was off the AI Dispatcher might give the first train to the siding a green signal that would lead to a deadlock at a shorter siding farther down the line. There should be a logical calculation that could be made in the sim. The train length can be calculated (ConBuilder does it) and I would think that the siding length could also be calculated. From that information, the AI dispatcher would have the digital information to "know" that a passing path on a siding too short for either train is not a feasible place to place a meet. Just like a real world dispatcher like me would.

Just some thoughts.

#5 User is offline   cjakeman 

  • Executive Vice President
  • PipPipPipPipPipPipPipPipPip
  • Group: ET Admin Group
  • Posts: 3,027
  • Joined: 03-May 11
  • Gender:Male
  • Location:Peterborough, UK
  • Simulator:Open Rails
  • Country:

Posted 26 December 2013 - 01:47 AM

View Postrailguy, on 25 December 2013 - 08:21 PM, said:

Sorry, folks, but having trains longer than sidings is a way of life in real world railroading.

Being British and not really used to single-track lines, this is all new to me.

On the web, I found a simple set of diagrams explaining the double saw-bye and even a 4 minute video on YouTube demonstrating it.

Very neat.

#6 User is offline   markus_GE 

  • Executive Vice President
  • PipPipPipPipPipPipPipPipPip
  • Group: ET Admin Group
  • Posts: 4,862
  • Joined: 07-February 13
  • Gender:Male
  • Location:Leoben, Styria, Austria, Europe
  • Simulator:ORTS / MSTS
  • Country:

Posted 26 December 2013 - 02:56 AM

Wow. This double sawby operation is fascinating. Quite a good wxample of what logic and geometry in combination are capable of. Intriguing! ;)

Cheers, Markus

#7 User is offline   Coonskin 

  • Open Rails Developer
  • Group: Posts: Elite Member
  • Posts: 3,771
  • Joined: 15-January 04
  • Gender:Male
  • Location:Eastern Oklahoma
  • Country:

Posted 26 December 2013 - 03:52 AM

I too, am a railroader, I'm not talking about what we can/have to do in the real world, I'm talking about what a train game can be expected to accomodate. Would seem to me we're talking some very sophisticated programing for a train game to have such logic. The OR team is already swamped with things that still need to be figured out/accomplished before Ver. 1 is ready to go out the door.

Saw-by's and double saw-by's may be to far out there, programing wise, for such a hobby-oriented game.

#8 User is offline   markus_GE 

  • Executive Vice President
  • PipPipPipPipPipPipPipPipPip
  • Group: ET Admin Group
  • Posts: 4,862
  • Joined: 07-February 13
  • Gender:Male
  • Location:Leoben, Styria, Austria, Europe
  • Simulator:ORTS / MSTS
  • Country:

Posted 26 December 2013 - 04:23 AM

I think, as of what I´ve read into the above posts, we´re not talking about letting OpE perfrom (double) saw-bys, but making OpR AVOID them. Seems to me a little simpler than making it indeed DO them...

Anyway, just my two cents (inflation not yet added) ;)

Cheers, Markus

#9 User is offline   Sandy River Tom 

  • Senior Foreman of Engines
  • Group: Status: Senior Foreman, Engines
  • Posts: 1,800
  • Joined: 22-April 06
  • Gender:Male
  • Location:Mystic, Connecticut
  • Simulator:ORTS-V1.5.1
  • Country:

Posted 26 December 2013 - 04:30 AM

Speaking as someone who has done some computer control system engineering, I would agree that this level of Dispatcher and AI control could be done, but I would also agree that it should be deferred to a future version of OR.

It would need to know the length of every train (AIs and Player) in feet, not number of cars. This could probably be calculated from the SIZE of each Loco & Car.

It would also need to know the usable length of every siding on the route. I'm unsure if this can be provided by the route files, or whether this would need to be entered by the User.

Given that information, OR should be able to determine which siding(s) will accommodate the Player's Train and the AI Train(s), and setup the meets accordingly, given the programmed paths of the trains. :)

Now let's throw OR a curveball; the Player's train picks up 10 cars en route and is now 500 feet longer and will not fit in some sidings!! Now OR must constantly update train length and the dispatcher must recalculate the meets to avoid the dreaded stalemate.

So, on a simple level it might work; but add-in the "what ifs" and it gets messy in a hurry. ;)

One of our favorite expressions at work is: "Just because you can, doesn't mean you should"

#10 User is offline   PA1930 

  • Foreman Of Engines
  • Group: Posts: Contributing Member
  • Posts: 782
  • Joined: 16-December 12
  • Gender:Male
  • Simulator:-
  • Country:

Posted 26 December 2013 - 06:38 AM

Rarely but also used to happen sometimes in Portugal on the single track mainlines. :) Interesting diagrams that James shared, by the way! ;)
Though such shuntings and operations might be difficult for AI to execute... First thing first is that the AI trains should be able to uncouple or couple wagons/cars which I guess they can't yet...

#11 User is offline   railguy 

  • Engineer
  • Group: Posts: Contributing Member
  • Posts: 736
  • Joined: 10-October 10
  • Gender:Male
  • Location:Kansas
  • Simulator:Open Rails
  • Country:

Posted 26 December 2013 - 07:22 AM

I have successfully coupled a player train to a stopped AI train in OR. It's tricky but can be done. One can also do it in "MSTS Binned" MSTS, but it is a very hit and miss proposition there--fairly often the sim will just crash. I've designed activities, for example, where an AI train passes as set of player locomotives sitting on a siding, then stops with a waiting point. Then, I take the switches to manual operation, take the player locomotives out of the siding and up to the AI train, then couple up to it. The rub is that the sim has to stay in manual switch operation from then on because it thinks that the player train is now off path. But one can shove the combination of player locomotives and AI train up the hill. I don't see OR being able to have an AI train independently execute switching moves on its own, but executing something like a saw-by should be doable in a multi-player session.


As for the "saw-by" that I described, I really wasn't looking for OR to be able to accommodate it in a single-player session--a saw-by is just a way that short sidings are handled in real railroading. Even if it were possible in the sim, accomplishing one with adherence to real railroading rules for brake tests, etc. could take a couple of hours to accomplish.

I'm going to re-write my activity and see if I can "trick" the AI dispatcher into holding my player train at a siding long enough to meet its long opposing train--essentially replicating what I did by taking the switches to manual operation and holding my player train at that siding to make the meet. If I can do that, it will make things workable.

#12 User is offline   roeter 

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

Posted 27 December 2013 - 04:31 AM

One way to solve this, for now, is to create paths which are adjusted to the length of the AI train by simply not setting alternative paths for those sidings which are not long enough. This will mean different paths for different lenghts of train, and will obviously only work if trains stay the same length throughout.
It may be possible (in the long term) to make this automatic, i.e. that passing path definitions are ignored if the siding is not long enough to hold the train.

Regards,
Rob Roeterdink

#13 User is offline   markus_GE 

  • Executive Vice President
  • PipPipPipPipPipPipPipPipPip
  • Group: ET Admin Group
  • Posts: 4,862
  • Joined: 07-February 13
  • Gender:Male
  • Location:Leoben, Styria, Austria, Europe
  • Simulator:ORTS / MSTS
  • Country:

Posted 27 December 2013 - 04:34 AM

I think, that would be exactly the solution that has been asked for :lol2:

Cheers, Markus

#14 User is offline   roeter 

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

Posted 08 January 2014 - 03:54 PM

View Postrailguy, on 25 December 2013 - 01:54 PM, said:

I've been playing around with activities for Northwest Route V6--my activity on the signaled single track Canadian Pacific portion. My player train is an 85 car westbound manifest that meets a bunch of eastbound trains, some long and some short. My AI Dispatcher buddy--I call him "Hal"--isn't very bright about meets where the siding is too short for either train, though. If I set up the activity with optional passing paths at the sidings, good ol' Hal will set up a meet at one of the sidings, even though neither train will fit between switches. Hal should hold one or the other opposing trains at a siding where at least one train will fit, so that the meet will be successful. If I do this manually--by taking the player train out of automatic switches--I can pull the meet off at a longer siding without an issue.

I still like the OR dispatching system way better than MSTS, but this is one "quirk" that probably merits some attention. Thanks.


Could you please try the attached experimental version?
It's been a fairly extensive change to the deadlock processing so I have not yet committed these changes, so your help in testing would be very welcome.

File : Attached File  RunActivity_testPL.zip (601.62K)
Number of downloads: 246

Regards,
Rob Roeterdink

#15 User is offline   railguy 

  • Engineer
  • Group: Posts: Contributing Member
  • Posts: 736
  • Joined: 10-October 10
  • Gender:Male
  • Location:Kansas
  • Simulator:Open Rails
  • Country:

Posted 09 January 2014 - 08:03 AM

Rob,

I'll try testing the RunActivity.exe . My only concern is that I've been using the RunActivityLAA to get extra memory. I don't know how well the activity will run if your .exe isn't LAA. I'll give it a shot, though.

Thanks for all the hard work that all of you do. To echo what others have said, the great thing about the OR team is that they actually look at and act on suggestions or issues.

  • 3 Pages +
  • 1
  • 2
  • 3
  • 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