Extended AI train shunting
#41
Posted 05 November 2014 - 01:40 PM
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.
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.
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).
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
Posted 05 November 2014 - 11:53 PM
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
Posted 10 November 2014 - 07:19 AM
It can be used also at start of activity. The player train gets the red signal until time HH:MM.
#44
Posted 11 November 2014 - 06:00 PM
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
Posted 11 November 2014 - 10:55 PM
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
Posted 22 December 2014 - 05:34 PM
#47
Posted 22 December 2014 - 11:08 PM
But the experiment gives the definitive answer...
#48
Posted 29 December 2014 - 05:02 PM
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
Posted 30 December 2014 - 12:01 AM
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
Posted 30 December 2014 - 03:20 AM
Csantucci, on 30 December 2014 - 12:01 AM, said:
<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:
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)
-
checkpath.zip (1.52K)
Number of downloads: 336