Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Tue Dec 12, 2017 4:21 am

All times are UTC




Post new topic  Reply to topic  [ 1017 posts ]  Go to page Previous 1 2 3 4 5 651 Next
Author Message
PostPosted: Tue Feb 05, 2008 1:29 pm 
Offline
OpenTTD Developer
OpenTTD Developer

Joined: Mon Jun 14, 2004 11:27 pm
Posts: 578
Location: Berlin, Germany
peter1138 wrote:
Code:
SDT_CONDVAR(Patches, default_signal_type, SLE_UINT8, 87, SL_MAX_VERSION,
     N,MS, 0, 0, 2, 1, STR_CONFIG_PATCHES_DEFAULT_SIGNAL_TYPE,      NULL),
SDT_CONDVAR(Patches, cycle_signal_types,  SLE_UINT8, 87, SL_MAX_VERSION,
     N,MS, 0, 0, 2, 1, STR_CONFIG_PATCHES_CYCLE_SIGNAL_TYPES,       NULL),

Why should these be saved in the savegame? They're client-side so should be like the other client-side options and only saved in the config.


Because I might not have understod the saveload code fully? :) If you think the right way is to have them client-side only I will change it.

Mchl wrote:
I disagree. This could make it impossible to modify rail network under heavy traffic.
Wouldn't better solution be to check which train has reserved bath to the current tile, and then find a new path for it?

And if no path can be reserved? What should be done then? Keep in mind that the goal of this patch is the create a more realistic signaling system and path reservation is only a means to an end. In reality, trains only stop in front of red signals and normally don't stop suddenly somewhere else. So if your train can't get another path, it might either continue and crash anyway or might suddenly stop for no reason, which is not very realistic. Just stop your trains before extensivly remodelling a junction.

Tekky wrote:
Also, I don't recommend mixing traditonal and PBS signals or to at least keep them on seperate track networks. Otherwise, you will have many issues with train collisions, because they seem to not be compatible.

Traditional and PBS signals are only compatible in certain situations. The main problem is that a signal block ends at any signal, including pbs signals. Changing that might cause severe performance problems. So if no train is in the block, a normal signal will be green, even though another train may enter the tile trough the back of a two-way pbs signal. The second problem is that a train entering a block through a normal signal will not reserve a path and is thus not seen by a train entering through a pbs signal.

Together this means that the entry signals into a block should only be of one kind, either normal or pbs, but not both at the same time. Secondly, only use one-way pbs signals as block exit signals for a block which has normal entry signals so no train can enter the block without being seen by the normal signals.

-- Michael Lutz

_________________
-- Michael Lutz


Top
   
PostPosted: Tue Feb 05, 2008 1:34 pm 
Offline
Tycoon
Tycoon

Joined: Sun Apr 08, 2007 4:07 am
Posts: 1884
That savegame explained a lot to me - thanks A LOT @Tekky :D

@Michi_cc:
as said before, great patch! Good luck with bugfixing and codestylefixing if needed and hope it gets accepted to trunk 8) *pat on shoulder*

_________________
* @Belugas wonders what is worst... a mom or a wife...
<Lakie> Well, they do the same thing but the code is different.

______________
My patches
check my wiki page (sticky button) for a complete list

ImageImage
ImageImageImageImageImageImageImage


Top
   
PostPosted: Tue Feb 05, 2008 1:46 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Wed May 16, 2007 4:59 pm
Posts: 2789
Tekky wrote:
Zephyris wrote:
Tekky wrote:
The other important rule is that you should always place a signal in front of every platform to prevent a train from leaving the platform when the track is not clear. I had several crashes because I had forgotten to do this :-)

If the track is not clear surely the train should not have gone into the station in the first place...


If the track was clear when it enters a station then that doesn't necessarily mean that it will be still clear when leaving a station. Therefore, a train may have to wait before it leaves a station platform, otherwise a collision may occur. For this reason, it is important to place a signal for all trains leaving a platform.


That seems immensely counterintuitive, a train (in the openttd world) should never go through signals to somewhere it would be able to crash... The station should be acting as a straight piece of track, by the sound of it there is an unprotected end of signalling block at each end of the platform.

_________________
GRVTS/eGRVTS --- Generic Tram Set --- UK Town Set --- zBase ---RichardWheeler.net


Top
   
PostPosted: Tue Feb 05, 2008 1:55 pm 
Offline
Engineer
Engineer

Joined: Thu Jun 16, 2005 1:17 pm
Posts: 75
Location: Lappeenranta, Finland
"by the sound of it there is an unprotected end of signalling block at each end of the platform."

There is no blocks.

The fix might be to make the train reserve to the next signal even though it's going to stop on the way.
Other solution would be not to move from station before new reservations are made. I wonder how it works when you stop trains and restart them because there is the same problem basically.


Top
   
PostPosted: Tue Feb 05, 2008 1:59 pm 
Offline
OpenTTD Developer
OpenTTD Developer

Joined: Wed Mar 30, 2005 9:43 am
Posts: 1505
Possibly each end of a platform could become an implicit 'pbs' signal so that reservation and waiting occurs, like depots.

_________________
He's like, some kind of OpenTTD developer.


Top
   
PostPosted: Tue Feb 05, 2008 2:06 pm 
Offline
Route Supervisor
Route Supervisor

Joined: Tue Dec 19, 2006 4:24 am
Posts: 420
That's also how this problem was solved in wolfc's PBS patch. Another possible solution would be to make a train not start moving until it has reserved a route to a safe waiting location, such as a signal, depot or another station. This might be the best solution, because then you could also make trains not start moving after reversing until they have reserved a route to a safe waiting location. This would prevent many crashes from occuring. This behavior also is realistic, because in reality, trains must seek permission before reversing.

It is very unrealistic for trains to be forcefully stopped in places where there is no signal. Therefore, trains should generally only wait in front of signals. However, I think that trains should be allowed to wait before starting to move, for example when leaving a station platform or after reversing.


Top
   
PostPosted: Tue Feb 05, 2008 2:51 pm 
Offline
OpenTTD Developer
OpenTTD Developer

Joined: Wed Mar 30, 2005 9:43 am
Posts: 1505
Mmm, that would probably help a lot.

One of the reasonings for removing the original PBS was the fact that trains could crash without user intervention, so it would be good to solve this. Currently it's fairly easy to cause a crash with an 'incorrect' layout.

_________________
He's like, some kind of OpenTTD developer.


Top
   
PostPosted: Tue Feb 05, 2008 4:21 pm 
Offline
Chief Executive
Chief Executive
User avatar

Joined: Mon Nov 15, 2004 7:46 pm
Posts: 643
Location: Berlin, Germany
The current simutrans implementation of signaling is more or less exactly like this one here (all blocks removed, only PBS). Also at every waypoint, depot exit, platform or any other situation which (re-)starts a train, an implicit signal existst, i.e. a train (re-)start only, if it can secure the PBS track until next implicits/explicit signal.

In order to have a fully funtional system, also "longblock signals" (signals reserving a track through all those implicit stops until the train reaches the next signal) were needed to avoid deadlocks on two-way single track with stations (thus implicit signals) like a classical block. These signals will only allow a train to enter a block, if there is no train on this and all next stretches until the next regular signal.

[The presignals in simutrans just checked up to the next implicit stop or the second signal on the path. Probably one may be able to do without with little changes to layout.]

BTW, I wonder about the two way statement: I think, there are situations were two way signals are useful, if used correctly. And surely they are needed to load old games ... (at least I had to use them in Simutrans for that purpose.)

_________________
I like to look at great maps and see how things flow. A little like a finished model railway, but it is evolving and actually never finished. http://www.simutrans.com


Top
   
PostPosted: Tue Feb 05, 2008 4:50 pm 
Offline
OpenTTD Developer
OpenTTD Developer

Joined: Mon Jun 14, 2004 11:27 pm
Posts: 578
Location: Berlin, Germany
peter1138 wrote:
Mmm, that would probably help a lot.

One of the reasonings for removing the original PBS was the fact that trains could crash without user intervention, so it would be good to solve this. Currently it's fairly easy to cause a crash with an 'incorrect' layout.

In a very wide sense, an incorrect layout is a user intervention, but yeah, only in a very very wide sense.

The best compromise probably is to inhibit trains from restarting after a stop until a reservation could be obtained.

prissi wrote:
BTW, I wonder about the two way statement: I think, there are situations were two way signals are useful, if used correctly. And surely they are needed to load old games ... (at least I had to use them in Simutrans for that purpose.)

I don't want to exclude any usefullness of two-sided signals, and that it the reason why they are indeed buildable. I just meant that a well-designed network will probably never need them. And compatibility isn't an argument as the old signals aren't removed.

-- Michael Lutz

_________________
-- Michael Lutz


Top
   
PostPosted: Tue Feb 05, 2008 4:52 pm 
Offline
Director
Director

Joined: Fri Jan 05, 2007 3:50 pm
Posts: 611
Location: Poland
This is THE patch that made me download BuildOTTD.

What can I say?

It actually works (I mean both BuiltOTTD and Advanced Signals)!!!!!

Really good work. I hope it'll get included YouKnowWhere soon. :D

[edit]

Now there's something I don't understand. See save attached. You will see a train #1 going north. It's out of its route (went to the nearest depot for servicing and now has to get back to its normal route somehow). As it approaches the crossing it fails to make a reservation (no dark path) resulting in a near miss with train #9. (Actually, if you move one of the signals one tile towards train #9 it'll result in head-on collision, even if the signal is one way).


Attachments:
File comment: Presignal this! :P
Teningpool Transport, 25th Aug 1932.png [209.46 KiB]
Downloaded 438 times
crash2.sav [345.57 KiB]
Downloaded 75 times
File comment: Near miss.
Teningpool Transport, 22nd Sep 1934.png [96.67 KiB]
Downloaded 351 times


Last edited by Mchl on Tue Feb 05, 2008 8:02 pm, edited 1 time in total.
Top
   
PostPosted: Tue Feb 05, 2008 8:01 pm 
Offline
Route Supervisor
Route Supervisor

Joined: Tue Dec 19, 2006 4:24 am
Posts: 420
@Mchl:

Hehe, how about presignaling this? :)

Unfortunately, there are only 3 trains on the junction, theoretically I could have up to 4 trains....


Attachments:
presignal_this.png [59.03 KiB]
Downloaded 434 times
Top
   
PostPosted: Tue Feb 05, 2008 8:03 pm 
Offline
Director
Director

Joined: Fri Jan 05, 2007 3:50 pm
Posts: 611
Location: Poland
Yeah, seen this savegame and played with it a little as well ;)
I've edited my previous post while you've written yours. Please take a look at it.


Top
   
PostPosted: Tue Feb 05, 2008 8:07 pm 
Offline
Transport Coordinator
Transport Coordinator

Joined: Sat Feb 03, 2007 6:53 pm
Posts: 368
Location: Leeds, England
This looks great. Just ive never compiled a patch. Will have to look at BuildOTTD...


Top
   
PostPosted: Tue Feb 05, 2008 8:17 pm 
Offline
Director
Director

Joined: Fri Jan 05, 2007 3:50 pm
Posts: 611
Location: Poland
T-Unit wrote:
This looks great. Just ive never compiled a patch. Will have to look at BuildOTTD...


Go for it. It is realy easy.
The biggest problem for me was finding patch file that would actually be accepted by BuildOTTD.
It's this one: download/file.php?id=85483 (from page 3 of this topic).


As for the save I attached a few posts above. If you follow train #1 you'll notice it will crash on the next station...
Seems that YAPF has some problems with runaway trains. I remember they didn't obey presignals as well.


Top
   
PostPosted: Tue Feb 05, 2008 8:34 pm 
Offline
Engineer
Engineer

Joined: Tue Jan 29, 2008 7:03 pm
Posts: 8
Great patch, I love it!

argh, too bad the when trains go to service they go to the nearest depot available even if it is on the wrong track line. the fact that I can make my junctions simpler with PBS caused a few deadlocks with trains going to the wrong depot for servicing. grr.


Top
   
PostPosted: Tue Feb 05, 2008 8:44 pm 
Offline
Route Supervisor
Route Supervisor

Joined: Tue Dec 19, 2006 4:24 am
Posts: 420
@Mchl: As far as I can tell, both the collision and the near-collision you described seem to be a bug. I could not find anything wrong with your track layout.

@spets: The behavior of depots is a bit buggy. Trains want to go to a depot but fail, I think because they continue on on their previous reservation and then cannot turn around anymore, after having passed the depot. However, I have not had any deadlocks occur because of this. May I see your track layout?


Top
   
PostPosted: Tue Feb 05, 2008 9:03 pm 
Offline
OpenTTD Developer
OpenTTD Developer

Joined: Mon Jun 14, 2004 11:27 pm
Posts: 578
Location: Berlin, Germany
Mchl wrote:
As for the save I attached a few posts above. If you follow train #1 you'll notice it will crash on the next station...
Seems that YAPF has some problems with runaway trains. I remember they didn't obey presignals as well.

Problem found. Will be fixed in the next release.

-- Michael Lutz

_________________
-- Michael Lutz


Top
   
PostPosted: Tue Feb 05, 2008 9:26 pm 
Offline
Director
Director

Joined: Fri Jan 05, 2007 3:50 pm
Posts: 611
Location: Poland
Great! :D


Top
   
PostPosted: Tue Feb 05, 2008 9:40 pm 
Offline
Transport Coordinator
Transport Coordinator

Joined: Sat Feb 03, 2007 6:53 pm
Posts: 368
Location: Leeds, England
Okay. So ive had a go at compiling it and got two outputs:
[code removed to tidy thread]
But the loading bar is still going. Sorry if i sounds pathetic but please help.


Last edited by T-Unit on Tue Feb 05, 2008 9:45 pm, edited 1 time in total.

Top
   
PostPosted: Tue Feb 05, 2008 9:43 pm 
Offline
Director
Director

Joined: Fri Jan 05, 2007 3:50 pm
Posts: 611
Location: Poland
JUst wait till it says Compile Complete.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 1017 posts ]  Go to page Previous 1 2 3 4 5 651 Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000-2017 phpBB Limited

Copyright © Owen Rudge/The Transport Tycoon Forums 2001-2017.
Hosted by Zernebok Hosting.