Truck Stations

OpenTTD is a fully open-sourced reimplementation of TTD, written in C++, boasting improved gameplay and many new features.

Moderator: OpenTTD Developers

davery83
Engineer
Engineer
Posts: 19
Joined: 13 Sep 2005 15:23
Location: Cornwall, England

Truck Stations

Post by davery83 »

Need your help guys!
If I have 4 stations next to each other (so they are all the same station), why do trucks always pick the closest one even if it has a long queue/full? It does this even if there are no other trucks in the other 3 stations!
Is the way of building the roads to the station that will stop this from happening?
User avatar
JimboTG
Engineer
Engineer
Posts: 80
Joined: 08 Sep 2005 10:45
Location: Portsmouth, England

Post by JimboTG »

Do you have NPF turned on?
I cant put a signature here, I dropped my pen
davery83
Engineer
Engineer
Posts: 19
Joined: 13 Sep 2005 15:23
Location: Cornwall, England

Post by davery83 »

Yes that is on.
Here is a screenie of what I mean.
Attachments
help.JPG
help.JPG (73.27 KiB) Viewed 5449 times
User avatar
webfreakz.nl
Director
Director
Posts: 627
Joined: 11 Aug 2005 08:22
Location: Localhost, 127.0.0.1, [The Netherlands: South Holland-> Westland]
Contact:

Post by webfreakz.nl »

I think the problem is you deleted 1 of the 3 stations. So first you had 3 station right next to each other, and then you demolished the one in the middle?
# Programming is like sex, one mistake and you have to support it for the rest of your life. (Michael Sinz)
User avatar
JimboTG
Engineer
Engineer
Posts: 80
Joined: 08 Sep 2005 10:45
Location: Portsmouth, England

Post by JimboTG »

now I feel pretty stupid, why didnt I think of that?
I cant put a signature here, I dropped my pen
davery83
Engineer
Engineer
Posts: 19
Joined: 13 Sep 2005 15:23
Location: Cornwall, England

Post by davery83 »

That doesn't change a thing!
If I have 3 stations next to each other, with the new one going in between the other 2 and removing the depot & placing a road - the vehicles tend to go straight on as thats the quickest route.
The reason I put that fork in is because I believed each distance to the station is the same but for some reason they always favour one. Sometimes a stray truck goes to the other, but others always join the queue!
User avatar
nicfer
Director
Director
Posts: 529
Joined: 03 May 2005 20:50
Location: Somewhere in a country called Argentina

Post by nicfer »

webfreakz.nl wrote:I think the problem is you deleted 1 of the 3 stations. So first you had 3 station right next to each other, and then you demolished the one in the middle?
I have the same problem and I don't deleted any station.
Sorry for my english I am argentinian
TTO don't crashes in Windows XP; XP crashes TTO

Formerly known as UnderBuilder.

MyMiniCity
User avatar
webfreakz.nl
Director
Director
Posts: 627
Joined: 11 Aug 2005 08:22
Location: Localhost, 127.0.0.1, [The Netherlands: South Holland-> Westland]
Contact:

Post by webfreakz.nl »

Maybe the pathfinding source code of trucks doesn't have the function to look (like a train does) and check if a station is full, if it is: it will take the next one?

correct me if i'm wrong...
# Programming is like sex, one mistake and you have to support it for the rest of your life. (Michael Sinz)
User avatar
JimboTG
Engineer
Engineer
Posts: 80
Joined: 08 Sep 2005 10:45
Location: Portsmouth, England

Post by JimboTG »

I thin trucks use the same pathfinding code as busses, both have always worked fine for me, try recreating the problem with busses
I cant put a signature here, I dropped my pen
davery83
Engineer
Engineer
Posts: 19
Joined: 13 Sep 2005 15:23
Location: Cornwall, England

Post by davery83 »

Ok heres a test with 20 trucks:
Only 4 of them chose a different path.
Attachments
test.PNG
test.PNG (119.36 KiB) Viewed 5398 times
csuke
Transport Coordinator
Transport Coordinator
Posts: 361
Joined: 05 Jun 2004 18:48
Location: London UK

Post by csuke »

make the entrance roads shorter, they will only go the other way when the one it wants to go down is full
Image
davery83
Engineer
Engineer
Posts: 19
Joined: 13 Sep 2005 15:23
Location: Cornwall, England

Post by davery83 »

They won't though, they always pick the same one & just queue further back up the feeder road!

Another test, this one worked as expected (most trucks took the first station as it was nearest!).

Edit: Yet why do 4 out of the 12 still take different ones?
Attachments
test.PNG
test.PNG (59.02 KiB) Viewed 5388 times
User avatar
webfreakz.nl
Director
Director
Posts: 627
Joined: 11 Aug 2005 08:22
Location: Localhost, 127.0.0.1, [The Netherlands: South Holland-> Westland]
Contact:

Post by webfreakz.nl »

What version are you using?
# Programming is like sex, one mistake and you have to support it for the rest of your life. (Michael Sinz)
User avatar
JimboTG
Engineer
Engineer
Posts: 80
Joined: 08 Sep 2005 10:45
Location: Portsmouth, England

Post by JimboTG »

try it like this (excuse the crudeness of the screenie) that way when a vehicle gets to a station and finds that its full it can immediatley move on to te next
Attachments
test_443.png
test_443.png (117.73 KiB) Viewed 5379 times
I cant put a signature here, I dropped my pen
davery83
Engineer
Engineer
Posts: 19
Joined: 13 Sep 2005 15:23
Location: Cornwall, England

Post by davery83 »

The problem with jimbo is that they still queue on one road.
I was just trying to avoid having long queues, by having several shorter ones since they can be loaded at the same time.
User avatar
webfreakz.nl
Director
Director
Posts: 627
Joined: 11 Aug 2005 08:22
Location: Localhost, 127.0.0.1, [The Netherlands: South Holland-> Westland]
Contact:

Post by webfreakz.nl »

Seems like OK here? :?
Attachments
truck_problem.png
truck_problem.png (22.57 KiB) Viewed 5363 times
# Programming is like sex, one mistake and you have to support it for the rest of your life. (Michael Sinz)
User avatar
JimboTG
Engineer
Engineer
Posts: 80
Joined: 08 Sep 2005 10:45
Location: Portsmouth, England

Post by JimboTG »

but by adding more stations and making them immediateley accessable you dont even get a queue
I cant put a signature here, I dropped my pen
davery83
Engineer
Engineer
Posts: 19
Joined: 13 Sep 2005 15:23
Location: Cornwall, England

Post by davery83 »

Seems to be a problem with the spinoff I'm playing then, I'm sure I got the problem on OTTD, not sure they had changed the truck pathfinding since then :?
There aren't enough industries on the normal OTTD for me to enjoy playing it!
User avatar
belugas
OpenTTD Developer
OpenTTD Developer
Posts: 1507
Joined: 05 Apr 2005 01:48
Location: Deep down the deepest blue
Contact:

Post by belugas »

This is a pettern for stations that I really like. It is, to my knowledge, the one that offers the best performances.
It can be applied to industries as well as mail/passengers.
Can be spread a little more too...
At a certain point, it can run into a complete jam, but I think it has to do with how the system handle the trucks rather then the design itself.
Attachments
Aubusson Transport, 7th May 2001.png
Aubusson Transport, 7th May 2001.png (31.62 KiB) Viewed 5331 times
If you are not ready to work a bit for your ideas, it means they don't count much for you.
OpenTTD and Realism? Well... Here are a few thoughs on the matter.
He he he he
------------------------------------------------------------
Music from the Bloody Time Zones
csuke
Transport Coordinator
Transport Coordinator
Posts: 361
Joined: 05 Jun 2004 18:48
Location: London UK

Post by csuke »

davery83 wrote:They won't though, they always pick the same one & just queue further back up the feeder road!

Another test, this one worked as expected (most trucks took the first station as it was nearest!).

Edit: Yet why do 4 out of the 12 still take different ones?
because the closest feeder road is full, make the feeder roads much shorter and it will prevent this
Image
Post Reply

Return to “General OpenTTD”

Who is online

Users browsing this forum: No registered users and 14 guests