Multiple industries near a station.

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

Moderator: OpenTTD Developers

mauried
Engineer
Engineer
Posts: 63
Joined: 07 Sep 2010 11:35

Multiple industries near a station.

Post by mauried »

What happens when there are more than 1 industry near a station which both take the same commodities?
I built a furniture factory near a town which takes wood products and glass and makes goods, and started delivering both commodities to the industry via the nearby station.
All working fine , until another industry, in this case a construction industry gets built right next to the furniture factory.
The construction industry takes wood products and cement, but doesnt make anything.
Now all the wood products I deliver to the station go to the construction industry and none go to the furniture factory.
Is there some kind of priority which determines where commodities go where there are multiple industries which accept them ?
thanks
Eddi
Tycoon
Tycoon
Posts: 7816
Joined: 17 Jan 2007 00:14

Re: Multiple industries near a station.

Post by Eddi »

afair it all goes to the industry closest to the station sign
You might not exactly be interested in Ferion, but if you are, have fun :)
_dp_
Traffic Manager
Traffic Manager
Posts: 218
Joined: 18 Dec 2013 12:32

Re: Multiple industries near a station.

Post by _dp_ »

No, it went to the closest one before but in 1.9.0 there was a change that made cargo go to an effectively random industry within the catchment area.
There is a PR to bring the old behaviour back but so far there is no progress on it, you can support it here if you want: https://github.com/OpenTTD/OpenTTD/pull/9536
Last edited by _dp_ on 22 Nov 2021 10:37, edited 1 time in total.
User avatar
Taschi
Route Supervisor
Route Supervisor
Posts: 387
Joined: 11 Oct 2014 22:58

Re: Multiple industries near a station.

Post by Taschi »

_dp_ wrote: 22 Nov 2021 10:27 No, it went to the closest one before but in 1.10.0 there was a change that made cargo go to an effectively random industry within the catchment area.
Is all cargo sent to one random industry, or does the randomization happen per unit of cargo?
"There's something germane to a Muscle Building that exterminates an appearance for a Muscle Building."
-- a spambot on tt-forums.net

My blog, which is sometimes about railways | Bulk GPX Viewer on Github
_dp_
Traffic Manager
Traffic Manager
Posts: 218
Joined: 18 Dec 2013 12:32

Re: Multiple industries near a station.

Post by _dp_ »

Taschi wrote: 22 Nov 2021 10:36 Is all cargo sent to one random industry, or does the randomization happen per unit of cargo?
Technically, there is no randomization, it picks the industry with the lowest ID, so it all goes to the same one. I'm saying effectively random because there is no way to know which one gets it in the game.
McZapkie
Tycoon
Tycoon
Posts: 1407
Joined: 18 Jan 2014 18:10

Re: Multiple industries near a station.

Post by McZapkie »

Honestly, it is even worse than previous behavior.
LaChupacabra
Transport Coordinator
Transport Coordinator
Posts: 265
Joined: 08 Nov 2019 23:54

Re: Multiple industries near a station.

Post by LaChupacabra »

If the recipient selection is based on enterprise ID, then from what I have noticed, these ID most likely start from the creation date, because always (I didn't notice any exception) the entire load is taken by the enterprise that was created first - this is a kind of advantageous feature of this change and I must admit that I was convinced all the time that this was a goal. :) This eliminates the problem related to the situation when a new enterprise appears on the map randomly or intentionally thanks to a malicious player, just closer to the label and takes the entire production. Now such a situation cannot occur, as it previously could. Unfortunately, the problem of not being able to choose a company when there are two or more enterprises within the range of stations is, however, more frequent and thus more troublesome.

The best option would therefore be to restore the previous behavior and prevent the founding of enterprises within the reach of stations other than your own.
I am sorry for may English. I know is bed.
_dp_
Traffic Manager
Traffic Manager
Posts: 218
Joined: 18 Dec 2013 12:32

Re: Multiple industries near a station.

Post by _dp_ »

ID (or as it called in OpenTTD code "index") != creation date. New industries can reuse indexes of the closed industries. So a new industry can still "steal" all the cargo and now you can't do anything about it except moving your whole station away from it. Previously you could just move your station sign.
mauried
Engineer
Engineer
Posts: 63
Joined: 07 Sep 2010 11:35

Re: Multiple industries near a station.

Post by mauried »

Thanks all, didnt realise this was such a complex issue.
Moved my station away and just hope no more industries appear near it.
User avatar
Captain Rand
Traffic Manager
Traffic Manager
Posts: 137
Joined: 28 Jan 2012 07:35

Re: Multiple industries near a station.

Post by Captain Rand »

The easiest fix would have been to enable the "Magic Bulldozer" and destroy the offending industry.
To prevent this happening again, fill the stations catchment area with objects, or simply buy the land.

Pete.
There's nothing like a deadline to hone the concentration.

Good manners cost nothing, but earn respect.

" 'Impossible' is not in our vocabulary." Jack Chrichton, Farscape
User avatar
odisseus
Transport Coordinator
Transport Coordinator
Posts: 294
Joined: 01 Nov 2017 21:19

Re: Multiple industries near a station.

Post by odisseus »

The first option that you suggest is impossible in multi-player games, and the second one is forbidden on many servers (and is poor style in general).
User avatar
Captain Rand
Traffic Manager
Traffic Manager
Posts: 137
Joined: 28 Jan 2012 07:35

Re: Multiple industries near a station.

Post by Captain Rand »

odisseus wrote: 23 Nov 2021 05:28 The first option that you suggest is impossible in multi-player games, and the second one is forbidden on many servers
The OP said nothing about playing multi-player games. Also I never do, or use servers.
odisseus wrote: 23 Nov 2021 05:28 (and is poor style in general).
"Style"? Who gives a toss about style?
Having this happen is just as irritating as an industry closing just as you've finished building a route to it. I don't play the game to get irritated, I play for fun.
You go play the game in your own "style" matey, and I'll play it in mine.

Pete.
There's nothing like a deadline to hone the concentration.

Good manners cost nothing, but earn respect.

" 'Impossible' is not in our vocabulary." Jack Chrichton, Farscape
User avatar
odisseus
Transport Coordinator
Transport Coordinator
Posts: 294
Joined: 01 Nov 2017 21:19

Re: Multiple industries near a station.

Post by odisseus »

Well, you have a point. Style doesn't matter when nobody else is going to see what you build.

But then again, single-player cheats can solve any and all gameplay problems in a trivial way. Bulldoze any industries that you don't need, and fund new ones wherever you want them to be. Increase your money by a few millions if you can't afford funding them, and increase still further so that you aren't bothered by profits and losses. Switch to a competing company to move their station out of the way, or blast their tracks to cripple their business altogether...
mauried
Engineer
Engineer
Posts: 63
Joined: 07 Sep 2010 11:35

Re: Multiple industries near a station.

Post by mauried »

Would it be possible to partially solve this problem by simply equally splitting the incoming cargoes between the available accepting industries.
At least this way the industry chain of production keeps going, just a bit slower.
Eddi
Tycoon
Tycoon
Posts: 7816
Joined: 17 Jan 2007 00:14

Re: Multiple industries near a station.

Post by Eddi »

while this is certainly possible, it's by far not simple

"find an eligible industry, then deliver cargo to it" is a very different task to "find all eligible industries, find some space to remember an arbitrary number of industries. collect all cargoes, split the cargo into equal parts, deliver the cargo"
You might not exactly be interested in Ferion, but if you are, have fun :)
User avatar
jfs
Tycoon
Tycoon
Posts: 1423
Joined: 08 Jan 2003 23:09
Location: Denmark

Re: Multiple industries near a station.

Post by jfs »

It seems like it should be possible to distribute arriving cargo to all accepting industries in range, but it's true it will be more complex.

I imagine you'd need to make it an iterative process:
1. Find all industries in range accepting the cargo
2. Divide the available cargo evenly among the accepting industries
2.a. Find a way to handle uneven distribution so which industries get more/less is determined by tick number or similar
3. Attempt to deliver each portion of cargo to the industries and let them produce
4. If some industries deny some or all of the cargo offered, put it back into the pool
5. If all cargo has been delivered, stop
6. Remove all industries that didn't accept the full amount offered from the list of accepting industries built in step 1
7. If there is still undelivered cargo left in the pool, and industries left in the list, repeat from step 2
8. There are no accepting industries left, but still cargo in the pool: Find all accepting houses and company headquarters in range and deliver to those
9. If there are no other accepting tiles in range and there is still cargo in the pool: Return the cargo to as unable to unload (either leaving it in the vehicle, or turning it into en-route cargo on the station in the case of forced unload)
mauried
Engineer
Engineer
Posts: 63
Joined: 07 Sep 2010 11:35

Re: Multiple industries near a station.

Post by mauried »

Ok, that does seem a difficult issue to solve.
How about something a bit simpler such as a minimum distance between industries, so that the probability of 2 or more industries falling into a single stations coverage area is reduced.
This issue only really occurs when multiple industries are in a town, as trying to relocate your stations to avoid a common coverage area of the multiple industries is a lot harder as the town authority often wont let you build more stations .
The number of industries which can only be built in towns is small relative to the total industries that can be built , so the spacing limitation would not need to apply to them all.
Under the current system where a single industry takes all the incoming commodities, what happens when it no longer wants more??
Does the original industry then start again receiving the incoming commodities.
User avatar
Taschi
Route Supervisor
Route Supervisor
Posts: 387
Joined: 11 Oct 2014 22:58

Re: Multiple industries near a station.

Post by Taschi »

mauried wrote: 26 Nov 2021 21:23 How about something a bit simpler such as a minimum distance between industries, so that the probability of 2 or more industries falling into a single stations coverage area is reduced.
Given that stations can have pretty large catchment areas even with the default settings, that would make for really boring maps with really few industries.
"There's something germane to a Muscle Building that exterminates an appearance for a Muscle Building."
-- a spambot on tt-forums.net

My blog, which is sometimes about railways | Bulk GPX Viewer on Github
User avatar
odisseus
Transport Coordinator
Transport Coordinator
Posts: 294
Joined: 01 Nov 2017 21:19

Re: Multiple industries near a station.

Post by odisseus »

Industry clutter is a real problem with ECS and Steeltown sets. Sometimes the town is completely choked on all sides and cannot grow at all.
Attachments
dfarms Transport, Jan 24th, 2039-fs8.png
dfarms Transport, Jan 24th, 2039-fs8.png (85.45 KiB) Viewed 97 times
User avatar
Taschi
Route Supervisor
Route Supervisor
Posts: 387
Joined: 11 Oct 2014 22:58

Re: Multiple industries near a station.

Post by Taschi »

odisseus wrote: 27 Nov 2021 05:51 Industry clutter is a real problem with ECS and Steeltown sets. Sometimes the town is completely choked on all sides and cannot grow at all.
But that's a very different issue from how the distribution of cargo works. Your problem could be avoided by enforcing a two- or three-tile wide gap between industries, but that would be entirely useless for avoiding multiple industries within the catchment area of a station. That would require something in the order of magnitude of a 20-tile gap, even with default settings.

To me, it feels naturalistic that sometimes industries just cluster sometimes - to enforce a huge distance between them would make maps feel far too uniform for my taste. And that's especially important with heavy industries (like the iron/steel industry), which were/are usually very heavily concentrated in relatively small regions in real life.
"There's something germane to a Muscle Building that exterminates an appearance for a Muscle Building."
-- a spambot on tt-forums.net

My blog, which is sometimes about railways | Bulk GPX Viewer on Github
Post Reply

Return to “General OpenTTD”

Who is online

Users browsing this forum: Google [Bot] and 2 guests