The International Simutrans Forum

Simutrans Extended => Simutrans-Extended future development discussion => Simutrans-Extended development => Implemented feature ideas => Topic started by: Vladki on February 22, 2016, 09:12:21 PM

Title: Drive by sight
Post by: Vladki on February 22, 2016, 09:12:21 PM
I noticed that there is some change in drive by sight mode. Previously the trains just reserved one tile ahead, now it seem that the driver can see much further ahead, almost up to the next corner or hill. It seems also to affect reservations on other signalling methods, and makes debugging a bit more difficult. So, please what are the current "line-of-sight" rules, and are they in final version?
Title: Re: Drive by sight
Post by: Ves on February 22, 2016, 10:27:26 PM
It appears that the sighting distance is set in simuconf (currently 875meters). This is how far a train can see signals and stuff, meaning that if the train see a signal 800 meters ahead being clear, it will pickup speed.

From quick testing, this is what I found:
Straight n-s e-w tracks: sighting distance (SD) is 875 meters.
Curve (90 or 45 degre): SD until curve entry but not the curve exit. Curve exit only visible when train is on curve entry tile.
Slope: SD until the tile BEFORE the slope, both when slope is pointing upward or downard. While on the slope: SD of the rest of the slope (if more than one tile of slope) but not the tracks at the target level. Maybe there are room for improvement here, since you logically would be able to se an upgoing slope in advance just as well as normal straight tracks? The same would apply to when it is going on the slope down, it would make sence if the train could see the leveled out tracks?
Diagonal tracks: Something seems buggy at diagonal tracks: It does sometimes reserve the full SD at ne-sw tracks, but it is not refreshing itself properly, meaning that the SD will appear shorter. at the other diagonal tracks (se-nw) there appears to be no SD.
Going under bridges: SD until tile before bridge. When train enter tile AFTER the bridge (not under), SD is 875 meters again.
Going into tunnels: No effect on SD
Title: Re: Drive by sight
Post by: dannyman on February 23, 2016, 06:15:28 AM
Might be interesting if SD reduced in forest / urban areas but that would probably be hard to program. :)
Title: Re: Drive by sight
Post by: jamespetts on February 25, 2016, 01:03:25 PM
Ves is correct: there has been a recent improvement to this sighting distance code as he describes. Ves - can you upload saved games for the bug reports?
Title: Re: Drive by sight
Post by: Ves on February 25, 2016, 01:40:10 PM
That is odd.. Now the savegame with the testtrack work with no bugs on the diagonal tracks! Maybe I was playing around with signalling too much (made some other testing in the same map) so something went wrong? Anyway, will let you know if I find it again!

However, what about the sighting distance on slope hills, being able to see further?
Title: Re: Drive by sight
Post by: jamespetts on February 26, 2016, 10:52:15 PM
Yes, that is an interesting point that I had not thought of. I will have to look into this to see how easy that this is to do (I am afraid that I have not much time this week-end for Simutrans).
Title: Re: Drive by sight
Post by: Vladki on June 20, 2016, 09:31:26 PM
Reviving this thread, as it is about the same topic: drive by sight.

I have noticed that there is a simuconf.tab option max_speed_drive_by_sight_kmh = 35
Is it valid for trams as well? Is it possible to have separate higher limit for trams? (somewhere at 60 km/h).
Title: Re: Drive by sight
Post by: jamespetts on June 20, 2016, 10:23:51 PM
The current system does not distinguish in the limit between different types of vehicles and applies equally to all; what would be the reason for needing a higher limit for trams?
Title: Re: Drive by sight
Post by: Rollmaterial on June 20, 2016, 10:34:02 PM
According to this (http://content.tfl.gov.uk/Item06-RUP-12-July-2011-Tramlink-Operations-v2SC.pdf) document for example, the Tramlink operates at up to 80 km/h in drive by sight.
Title: Re: Drive by sight
Post by: Vladki on June 20, 2016, 10:38:40 PM
That's it. Czech rules specify max speed 30 km/h for trains in drive by sight, while trams can go 60 km/h (or 50 km/h if the track is on street). Tram has shorter braking distance than train.
Title: Re: Drive by sight
Post by: jamespetts on June 20, 2016, 10:40:36 PM
Quote from: Vladki on June 20, 2016, 10:38:40 PM
That's it. Czech rules specify max speed 30 km/h for trains in drive by sight, while trams can go 60 km/h (or 50 km/h if the track is on street). Tram has shorter braking distance than train.

Do you have any idea why trams have a shorter braking distance than trains? I may well need to adjust their brake force; would you happen to have any figures? I will need to give some thought as to how this interacts with drive by sight.

Incidentally, in relation to the earlier part of this thread, as you may have noticed, I did implement the effect of hills and corners on the sighting distance.
Title: Re: Drive by sight
Post by: Vladki on June 20, 2016, 10:58:37 PM
Wow. quick googling gave me this: Breaking distances of Czech tram KT8D5 http://tram.webzdarma.cz/vozidla/z-kt8d5.htm
Translations: Rychlost = speed, Provozní brzda = normal brake,  Nouzová brzda = emergency brake, Zatížení = load, žádné = empty, maximální = (max load/full)
At the bottom you can switch to other models T3 and T3M.

I would just guess that trams are lighter than trains, and have shorter cars = more axles per meter = more brakes
26 m long express train car (Ampz) has 4 axles, 47.5 tons
30 m long tram kt8d5 has 8 axles, 38 t
for emergency braking the electromagnetic brakes are long time standard for trams, but not so common on trains.

And one more thing - trams usually have an engine on each axle, and can brake using the engine (recuperate)
Title: Re: Drive by sight
Post by: jamespetts on June 20, 2016, 11:23:33 PM
Thank you for that - do you have the brake force in kN? That is the figure used in Simutrans-Experimental.
Title: Re: Drive by sight
Post by: Vladki on June 20, 2016, 11:59:40 PM
Nope, I could not find it. But it should be possible to calculate from speed, weight and distance. I'll try but it is too late to think...
Title: Re: Drive by sight
Post by: DrSuperGood on June 21, 2016, 12:19:43 AM
Slightly off topic but I think the reason trains are usually heavier than trams of similar capacity would be because they are designed to travel faster. A lot of weight on trains is structural to try and preserve integrity during collisions and other accidents which can occur at high speeds. Since trams are inherently much slower they do not need to be anywhere near as strong since they will usually only be involved in comparatively low speed accidents.

Additionally if trams are narrower than trains (might have to be to fit around cities) then they will have less weight because they are carrying less per meter length.

Maybe the drive by sight maximum speed per rail type should be configurable as a game setting? This would reflect the law like nature it is implemented as in some countries I would think.
Title: Re: Drive by sight
Post by: Vladki on June 21, 2016, 06:52:00 AM
Hi, what about this formula:
Force = mass * velocity ^ 2 / distance

The result is total braking force including rolling and air resistance.

Explanation, running vehicle has kinetic energy E=m*v^2. The work done to stop (or to give this kinetic energy to) the vehicle is E=F*d
I hope to remember the school physics correctly.
Title: Re: Drive by sight
Post by: Octavius on June 21, 2016, 01:34:10 PM
Weight and number of axles have little influence on braking deceleration. More mass means more braking force, but also more inertia. On all rail vehicles with wheel brakes, the braking force has been tuned to the mass of the vehicle to give, at maximum braking, a deceleration set by the friction coefficient between steel track and steel wheels. (Goods wagons, the European ones at least, have a switch to tune the brakes to either full or empty wagon.) But when using magnetic rail brakes (those brakes that use an electromagnet to pull a brake shoe against the rails), mass doesn't influence braking force and larger deceleration is possible. Trains seldom use these, but they are more common on trams. In NL some trains have electromagnetic rail brakes, but only use them in emergencies or as parking brake, as they interfere with the safety system (and damage the track if used on points). My local tramway (closed in 1955) used those brakes from shortly after the beginning in 1911 to deal with a 1:12 slope. You won't find many slopes like that on a railway.

Furthermore, trains rarely have brakes with ABS on all axles and the reaction time of train brakes, especially on goods trains, is much longer than on trams, often several seconds.

Slightly off topic: another reason why trams are lighter than trains is that they are designed for lower comfort level.

Quote from: Vladki on June 21, 2016, 06:52:00 AM
Explanation, running vehicle has kinetic energy E=m*v^2. The work done to stop (or to give this kinetic energy to) the vehicle is E=F*d
I hope to remember the school physics correctly.
Almost, E=0.5*m*v^2. Just put a factor of 1/2 in your formula and you're done.
Title: Re: Drive by sight
Post by: jamespetts on June 21, 2016, 10:04:38 PM
Thank  you all for your replies: I have changed the code so as to exempt trams from the max_speed_drive_by_sight limit. I am still a little unclear on how to calculate the brake force from the data given, however: is anyone able to assist? Or perhaps somebody could give a range of likely brake forces for trams of different eras that I could apply, perhaps after testing performance in the game?
Title: Re: Drive by sight
Post by: Octavius on June 22, 2016, 04:26:26 PM
I found on german wikipedia (here (https://de.wikipedia.org/wiki/Magnetschienenbremse)) that since 1960 german trams must be capable of 2.73 m/s2 deceleration, so that gives a braking force of F=m×2.73, using newtons and kilogrammes (or kN and tonnes). m is the mass of the vehicle, which must be the maximum mass (i.e., when overcrowded to the limit). That would be the braking force using the emergency brake, which is what we need for the drive by sight speed limit. Of course, when braking for a station stop, the tram would brake less hard, as a sudden 2.73 m/s2 deceleration would certainly lead to injured passengers.

If we have actual braking distances, then instead of assuming the tram follows german law we can calculate its braking force as:
F=0.5×m×v2/d
with F force, m mass, v speed, d braking distance. There is some air drag and magnetic friction in this, and those are speed dependent, so this is at best an approximation.
Title: Re: Drive by sight
Post by: Vladki on June 23, 2016, 10:08:55 PM
I have put the data into spreadsheet: https://uran.webstep.net/~vladki/simutrans/simutrans.ods (second sheet), and added also some info about those trams.
Interesting things: Tatra T3 (1960's) does not comply with german requirements for deceleration. Newer KT8D5 (1980's) complies.
The numbers vary wildly for each measurement. T3 and T3M (2 bogies, 4 axles) has normal braking force cca 25 kN (20-30), emergency brake almost 40 kN
KT8 (4 bogies, 8 axles) cca 60 kN (52-66), emergency cca 120 kN (92-160).

And BTW trams still obey the 35 km/h max speed for drive by sight
Title: Re: Drive by sight
Post by: jamespetts on June 25, 2016, 08:27:55 PM
Thank you very much for that. Can I check whether these figures are for a single car vehicle or for a multiple unit type tram as a whole?

Edit: The trams should work at full speed in drive by sight now.
Title: Re: Drive by sight
Post by: Vladki on June 26, 2016, 04:48:15 PM
Quote from: jamespetts on June 25, 2016, 08:27:55 PM
Thank you very much for that. Can I check whether these figures are for a single car vehicle or for a multiple unit type tram as a whole?
That should be for single cars, but KT8D5 is articulated tram - have a look at the czech page with graphs (a few posts ago), there is a picture of the tram as well.

Quote
Edit: The trams should work at full speed in drive by sight now.

nope, it does not.
Title: Re: Drive by sight
Post by: jamespetts on June 26, 2016, 06:12:45 PM
Quote from: Vladki on June 26, 2016, 04:48:15 PM
That should be for single cars, but KT8D5 is articulated tram - have a look at the czech page with graphs (a few posts ago), there is a picture of the tram as well.

Thank you for that.

Quotenope, it does not.

That is odd - I have tested it and it works for me. Can you upload a saved game in which you can reproduce this?
Title: Re: Drive by sight
Post by: Vladki on June 26, 2016, 07:52:39 PM
I tested more - after sending the tram to depot and releasing again it started to work correctly
Title: Re: Drive by sight
Post by: jamespetts on June 26, 2016, 10:22:59 PM
Splendid, thank you. I have now adjusted the brake force of the modern trams to be 1.3x their weight, which should suffice for these purposes.