Scriptable train control system
#31
Posted 12 February 2014 - 02:23 AM
FYI, I made a mistake in my calculation.
For the French automatic block, we need an array of 2 signals for the worst stop sequence : VL (green) => (VL) (green blinking) => (A) (yellow blinking) => A (yellow) => S (red) or C (double red).
The first change, (VL), provokes a speed limit of 160 km/h at the next signal. So, we only have to consider the sequence (A) => A => S or C. We need to know AFTER the (A) aspect the distance to the signal that has the S or C aspect. So we need the information of 2 signals.
For the TVM system, it is the same because the system needs : the current speed limit, the speed limit in the next block section and the speed limit in the block section after this one. When the second block section gives a more restrictive speed limit that the first, the indication on the cab-signal blinks.
The worst case we'll have is the ETCS... because in Level 2, we'll have to look at the aspects of the signals that are 4 or 5 block sections ahead on high speed lines.
PS : I have access to the SNCF technical documentation because I work as an engineer in a CCS company in France.
#32
Posted 12 February 2014 - 04:29 AM
Note that if the user requests more than one signal, this might not always be available - no information is provided beyond the first signal at state STOP.
If TCS systems need information on multiple signals and speedpost, the best option would be to pass on the original list - or at least the info out of this original list.
With regards to the variable nature of the information, a list seems more appropriate than an array.
Regards,
Rob Roeterdink
#33
Posted 12 February 2014 - 05:30 AM
#34
Posted 12 February 2014 - 12:32 PM
#35
Posted 12 February 2014 - 01:16 PM
Common\Scripting.cs(165,58): error CS0241: Default parameter specifiers are not permitted
Did you use something from C# 4 by accident?
#36
Posted 12 February 2014 - 01:38 PM
public delegate T NextSignalFunc<T>(int forsight = 0);
I wasn't even aware of it. On internet now I read, that this is supported from the beginning (C# 1), just the compiler needs to be of higher version... (wtf?) This was the reason I haven't noticed it. I remove it.
Edit: Removed. Then 0 needs to be explicitly defined in NextSignalSpeedLimitMpS(0). Sorry.
#37
Posted 13 February 2014 - 12:19 AM
When NextSignalItem is called for NextPostSpeedLimitMpS, an exception is thrown at line 222 because there is no element in the list.
#38
Posted 13 February 2014 - 01:14 AM
gpz, on 12 February 2014 - 01:38 PM, said:
I suspect there's a mixup there; it is not supported in C# before version 4, but it is supported by .NET (and the CLR) in version 1. It was supported by the runtime from the start because optional and named parameters existed in VB. They were added to C# later. (Feature support in the runtime being different from the languages that run on it can be confusing.)
#39
Posted 13 February 2014 - 02:25 AM
Serana, on 13 February 2014 - 12:19 AM, said:
When NextSignalItem is called for NextPostSpeedLimitMpS, an exception is thrown at line 222 because there is no element in the list.
#40
Posted 13 February 2014 - 09:31 AM