There is nothing on the level crossing but the train can't advance ... and cars often p**** before the train on level crossings (the train could reserve the level crossing before).
If you click on the crossing, simutrans will tell you the state.
Maybe it can't reserve track after the crossing? Maybe even for normal reasons?
The track after the crossing was reserved until the next signal but it was reserved for this train ... I had this problem with many others crossings (caused by citycars ...).
Signals directly on crossing cause wierd behaviour. But if you have a map where reservation reproducibly fails, I would be very interesting to obtain this to actually debug this. Reservation with busy maps from savegames from previous versions fail (but sadly not reproducably and only very rarely).
so if I remove signals on level crossings, it will be fixed ?
Perhaps if signals near level crossings fail, it should not be possible to build a signal next to an existing level crossing, or a level crossing next to an existing signal?
No, the reservation is only delayed, when a signal is on a level crossing. It should not end with unreserved tiles. Please provide a savegame, if the error is reproducable.
I'll try to reproduce it in another savegame.
The problem now is simple and you can easily reproduce it : the reservation of the level crossing by the train is far too late, I have 100 km/h trains which reserve the crossing only three or four tiles before, but there are slow cars staying on the crossing and the train is forced to brutally stop in front of the crossing whereas in the real life it's rare to see a train stop at a crossing to let cars p**** ... (it's rather the contrary ...).
plus : cars often stop behind each other on a crossing, they should wait at the entry of the crossing and not on it.
Hmm. If someone can point me to the location in the code where the level crossing is reserved, it will probably be easy to reserve it further in advance....
Oh, I've noticed this problem. Traffic jams should definitely NOT back up across crossings, that's very dangerous. :-) Anyway, that was actually the cause of some gridlock I had: trains were getting permanently stuck because of this. Now, how do we tell the cars not to enter the level crossing unless they can clear it?
Actually, I would expect the level crossing reservation to be dependent upon the max. speed of the track, if this is possible at all. I would also ****ume that if there were a mixture of different track speeds that the lowest would be used, when considering each section of track at and within a speed-determined radius from the crossing?
In real life (heh, heh) "constant warning time" crossings are a very new thing. It has been common to have crossings trigger quite early based on ****uming fast trains, and then wait for a long time for a slow train to arrive. I'd be OK with trains reserving crossings too early and too often -- that has always been the way it works in real life. The current situation is rather the opposite.
All this is academic unless I can figure out where in the code the crossing gets reserved....
If you do these patches, you are the best developers ;)
@neroden:
Trains reserve the crossing at the following place:
file vehicle/simvehikel.cc
line ~ 2582 (svn head)
in function wagon_t::ist_weg_frei
(translation: "is way free")
for cars: line ~ 1961 in automobil_t::ist_weg_frei
for boats: line ~ 2883 in shiff_t::ist_weg_frei
you can find them if you grep for "request_crossing" :)
Trains always check 3 tiles in advance for stops/crossings/signals/etc.
It looks like there is already some code to make sure cars can leave the crossing after entering. Perhaps it is not working correctly?
OK, I have two things to check. Someone may have to remind me if I don't get to it in the next few months (life has been busy....)
The cause of the cars driving across the level crossing was found and fixed by z9999, though it's not in standard svn yet I believe.
?
r3535 | prissi | 2010-07-13 23:45:45 +0200 (Tue, 13 Jul 2010) | 1 line
FIX: (z9999+) avoid private cars stooping on railroad crossing during traffic jam
all road vehicles shouldn't stop on railroad crossings, not only private ones.
I *believe* that player road vehicles were *already* not stopping on railroad crossings. Tell me if player vehicles are getting stuck on railroad crossings.
I don't know ... I have to check that ;D
I just tested, and indeed, player vehicles will not stop on tracks when the tile beyond the tracks have a vehicle stopped.
In fact, brilliantly, a player vehicle will not enter a road/rail crossing tile if there is a vehicle crossing in front (i.e. multiple crossings next to each other): As a second test, I put five crossings side-by-side, with a line set up to force a traffic jam - but even though the tile beyond the five crossings was clear, the second bus waited until the first bus had cleared the crossings before entering the crossings itself.
Awesome. :D