Elvas Tower: Extended AI train shunting - Elvas Tower

Jump to content

Posting Rules

All new threads will be started by members of the Open Rails team, Staff, and/or Admins. Existing threads started in other forums may get moved here when it makes sense to do so.

Once a thread is started any member may post replies to it.
  • 16 Pages +
  • « First
  • 3
  • 4
  • 5
  • 6
  • 7
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

Extended AI train shunting Rate Topic: -----

#41 User is offline   Genma Saotome 

  • Owner Emeritus and Admin
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 15,363
  • Joined: 11-January 04
  • Gender:Male
  • Location:United States
  • Simulator:Open Rails
  • Country:

Posted 05 November 2014 - 01:40 PM

I see.

I suppose the reply file could be expanded to capture a location... but of course it comes down to whether it would be useful or not.


FWIW, in an idle moment I was thinking about what would be an ideal first activity for my Cal-P route. What came to mind was to put the player on a ferry boat -- as a passenger -- with the ferry approaching the slip on the Oakland side of San Francisco Bay.
Attached Image: Clipboard0565.jpg
After docking the camera moves down the gangway into the terminal (as the player, being new to the route, would not know where to go), down the stairs into the trainshed and there are a bunch of passenger trains waiting. It moves into one car and the player is now a passenger in that train.
Attached Image: Clipboard0562.jpg
The train runs it's its defined path (for about 35-45 minutes -- this would first be thru the hard-to-learn portion of the route -- a limited number of text sprites to explain key points are displayed -- and then a very scenic portion).
Attached Image: Clipboard0549.jpg
Attached Image: Clipboard0511.jpg
The players camera moves between tracking and fixed railfan positions as chosen by the activity designer to show the route to its best advantage. And the player disembarks at a chosen location (35-45 minutes is this mode are more than enough and if it seems too long then have the player disembark earlier).

So that could be done entirely be a replay. Except how does one make a replay appear as Activity #1? Dunno. But the thought of a replay becoming an inherent part of an activity is what prompted my original question.

#42 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 7,024
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 05 November 2014 - 11:53 PM

That's a fascinating scenario!

In the meantime in release 2627 I uploaded the time-of-day waiting point feature: confirming what I wrote some post above, under the extended AI shunting flag and provided that timetable mode is not active, waiting points with waiting time >=30000 and <40000 are interpreted as 3HHMM, where HH and MM are hours and minutes in decimal notation. If the time of day had already passed when the train arrives to the waiting point, the waiting point delay is set to 1 second.
This feature can be useful to better schedule meets and takeovers, as well as to schedule trains stopping outside platforms (e.g. stopping in sidings).

#43 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 7,024
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 10 November 2014 - 07:19 AM

Even if it is not strictly linked to AI shunting, with release 2635 absolute time waiting points (format 3HHMM) work also for player trains when accompanied by a signal in the same track section, that is the signal remains at red until time HH:MM. The conditions to be set are the same as for AI trains (Extended AI shunting flag set and no timetablemode active).
It can be used also at start of activity. The player train gets the red signal until time HH:MM.

#44 User is offline   mauried 

  • Hostler
  • Group: Status: Active Member
  • Posts: 74
  • Joined: 01-October 13
  • Simulator:Open Rails
  • Country:

Posted 11 November 2014 - 06:00 PM

Does this feature work the same for AI trains ?
ie if there is a waiting point with format 3HHMM and a signal in the train section, does the signal stay at red until the AI train is set to leave?
Thanks

#45 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 7,024
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 11 November 2014 - 10:55 PM

Yes, it does.
Take into account:
- that the waiting point has to be positioned before the 25 meter safety zone in front of the signal;
- the temporary situation described here http://www.elvastowe...post__p__164670 .

#46 User is offline   alexmorph3us 

  • Hostler
  • Group: Status: Active Member
  • Posts: 62
  • Joined: 01-February 14
  • Simulator:MSTS
  • Country:

Posted 22 December 2014 - 05:34 PM

Hello Csantucci.Regarding the waiting point interpreted as 3HHMM I would like to know what happens to the AI trains ahead of me when on the same track after they pass the signals I have set to stay red until time of day for my train's path in a certain station.Taking into account that each train has it's own path and their paths are clear passing through that station will they be affected by the state of the signal in my path setup? I would like to know how to plan in advance and if I will still have priority over them to stop at that station and meet my timetable.Thank you :pleasantry:

#47 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 7,024
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 22 December 2014 - 11:08 PM

Well, the combinations can be very many and the best answer is always: try :pleasantry: . In general that type of waiting point does not behave in a different way to a standard waiting point referring to priorities or to the moment where it influences the signal because the related train is approaching. AI trains in front of your player train should regularly pass the signal, that should become red for the above waiting point not before the last AI train in front of your player train has passed it.
But the experiment gives the definitive answer...

#48 User is offline   steamer_ctn 

  • Open Rails Developer
  • Group: Status: Elite Member
  • Posts: 1,890
  • Joined: 24-June 11
  • Gender:Male
  • Country:

Posted 29 December 2014 - 05:02 PM

Hi Carlo,

I am trying to set one of your absolute time waiting points, but not having much success. It appears to be defaulting to approx 1 sec wait time.

Firstly to confirm that I am implementing it correctly:
i) I set a wait point about 40m from a signal
ii) I set the value for say, 31515, ie 15:15
iii) I have the "AI Extended shunting flag" set

Are there any other conditions that I am missing?

I have had a quick look at the code, and tried some of the debug functions, and compiling some info statements to view values in the code, and it appears that I am getting a Delay = 0 in the AIActions file around line 1600.

Any thoughts?

Also any idea how to enable the "WITH_PATH_DEBUG" debug options as this might help to identify the problem?

#49 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 7,024
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 30 December 2014 - 12:01 AM

Hi Peter,
there shouldn't be other conditions to activate the absolute waiting point. However, so as to allow me to perform a check (maybe some code change affected the WP behaviour), pls. answer following questions:
1) first of all, approximately at what hour the train arrives at the WP?
2) is it the player train or an AI train?
3) is the Autopilot option in the experimental options set or not set?
4) about at what distance from path start is the WP?
5) at what hour does the activity start?

Referring to second question, I'm not the best person to answer this, but you could open file Runactivity.csproj and modify the two lines
    <DefineConstants>TRACE;DEBUG;WINDOWS;NEW_SIGNALLING;NEW_ACTION;WITH_NEW_SAVE;ACTIVITY_EDITOR</DefineConstants>

as follows
    <DefineConstants>TRACE;DEBUG;WINDOWS;NEW_SIGNALLING;NEW_ACTION;WITH_NEW_SAVE;ACTIVITY_EDITOR;WITH_PATH_DEBUG</DefineConstants>


#50 User is offline   steamer_ctn 

  • Open Rails Developer
  • Group: Status: Elite Member
  • Posts: 1,890
  • Joined: 24-June 11
  • Gender:Male
  • Country:

Posted 30 December 2014 - 03:20 AM

Hi Carlo,

 Csantucci, on 30 December 2014 - 12:01 AM, said:

Referring to second question, I'm not the best person to answer this, but you could open file Runactivity.csproj and modify the two lines
    <DefineConstants>TRACE;DEBUG;WINDOWS;NEW_SIGNALLING;NEW_ACTION;WITH_NEW_SAVE;ACTIVITY_EDITOR;WITH_PATH_DEBUG</DefineConstants>


Thanks for that. I edited the Runactivity.csproj file and got the path debug log report going. FYI, you can also do it through the GUI, by going to RunActivity TAB, look at the "Build" option and modify the field called "Conditional compilation symbols.

NB: When you try to compile the program with the extra compilation symbol you will get an error message about some problems in the AIAction file. I commented the offending line out for the time being, as it is only a reporting line.

I have attached the log file for reference and will explain it below.

 Csantucci, on 30 December 2014 - 12:01 AM, said:

there shouldn't be other conditions to activate the absolute waiting point. However, so as to allow me to perform a check (maybe some code change affected the WP behaviour), pls. answer following questions:

Thanks for the confirmation. I have answered your questions below.

1) first of all, approximately at what hour the train arrives at the WP? -- 14:58
2) is it the player train or an AI train? - AI train
3) is the Autopilot option in the experimental options set or not set? - Autopilot set
4) about at what distance from path start is the WP? - approximately 2 miles
5) at what hour does the activity start? - 14:54


Out of interest, I inserted a "normal" waiting point (set @ 300 secs) on another AI train service and seem to be getting similar results, so I am now wondering whether code is working even for normal wait points.

In the attached file train 3 is the AI service with an absolute wait point, and train 8 has a normal wait point of 300 seconds.

Points to note:
i) Train 8 hits the wait point within seconds of starting. - see line 97 of log file - tends to suggest that the AI action ignores the 300 sec setting. (I think so anyway as I haven't looked at the code too closely to understand what is happening)

ii) Train 3 - appears to hit the wait point at line 772 of log file.

Both line 97 and 772 appear to be the line of report code at line 1663 of AIAuxAction file, which is straight after your initial code insert. It appears that something is not happening with the "delay" value as this appears to be zero.

This is as far as I have been able to investigate so far, hope this info helps.

Attached File(s)



  • 16 Pages +
  • « First
  • 3
  • 4
  • 5
  • 6
  • 7
  • 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