News:

Use the "Forum Search"
It may help you to find anything in the forum ;).

Simutrans 102.3-r3190 level crossing

Started by gauthier, June 03, 2010, 05:49:43 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

gauthier

There is nothing on the level crossing but the train can't advance ... and cars often pass before the train on level crossings (the train could reserve the level crossing before).

prissi

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

VS

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!

gauthier

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 ...).

prissi

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).

gauthier

so if I remove signals on level crossings, it will be fixed ?

jamespetts

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.

prissi

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.


gauthier

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 pass ... (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.

neroden

Quote from: gauthier on June 06, 2010, 09:06:02 AM
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 pass ... (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....

Quoteplus : 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?

TrainMith

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 assume 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?

neroden

Quote from: TrainMith on June 18, 2010, 07:19:46 PM
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 assume 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 assuming 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....

gauthier

If you do these patches, you are the best developers ;)

yobbobandana

@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?

neroden

Quote from: yobbobandana on June 21, 2010, 07:59:03 PM
@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....)

neroden

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.

Dwachs

?

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.

gauthier

QuoteFIX: (z9999+) avoid private cars stooping on railroad crossing during traffic jam

all road vehicles shouldn't stop on railroad crossings, not only private ones.

neroden

Quote from: gauthier on July 15, 2010, 02:23:50 PM
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.


Isaac Eiland-Hall

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