Skip to main content
Topic: Simutrans 102.3-r3190 level crossing (Read 7033 times) previous topic - next topic

Re: Simutrans 102.3-r3190 level crossing

Reply #1
If you click on the crossing, simutrans will tell you the state.

Re: Simutrans 102.3-r3190 level crossing

Reply #2
Maybe it can't reserve track after the crossing? Maybe even for normal reasons?

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!


Re: Simutrans 102.3-r3190 level crossing

Reply #4
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).


Re: Simutrans 102.3-r3190 level crossing

Reply #6
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?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Re: Simutrans 102.3-r3190 level crossing

Reply #7
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.


Re: Simutrans 102.3-r3190 level crossing

Reply #9
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.

Re: Simutrans 102.3-r3190 level crossing

Reply #10
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 ...).
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....

Quote
plus : cars often stop behind each other on a crossing, they should wait at the entry of the crossing and not on it.
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?

 

Re: Simutrans 102.3-r3190 level crossing

Reply #11
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?

Re: Simutrans 102.3-r3190 level crossing

Reply #12
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....


Re: Simutrans 102.3-r3190 level crossing

Reply #14
@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?

Re: Simutrans 102.3-r3190 level crossing

Reply #15
@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....)

Re: Simutrans 102.3-r3190 level crossing

Reply #16
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.

Re: Simutrans 102.3-r3190 level crossing

Reply #17
?
Code: [Select]
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
Parsley, sage, rosemary, and maggikraut.


Re: Simutrans 102.3-r3190 level crossing

Reply #19
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.


Re: Simutrans 102.3-r3190 level crossing

Reply #21
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