Bring some cargodest into cargodist

Got an idea for OpenTTD? Post it here!

Moderator: OpenTTD Developers

Wahazar
Tycoon
Tycoon
Posts: 1451
Joined: 18 Jan 2014 18:10

Bring some cargodest into cargodist

Post by Wahazar »

Tbanks to the Cargodist we have lot of fun, especially with creating pasengers network, exchange suburban traffic with desolated airports etc, but usually large cargodist networks are counter-productive compared to single A-B pairs.

I'm aware about some cargodest issues, therefore I propose another approach:
instead of tile based generation, use station based generation of destinations, incorporated into cargodist itself.

Assume, that some cargo was triggered to be produced and delivered to the station. This cargo have not yet assigned destination (red text, not loading).
Cargodist is choosing one from all stations (it should be configurable: only all company stations or also these belong to competitors, to be compliant with infrastructure sharing patch) and checking if cargo is accepted - if yes, cargodist is searching of existing non-saturated link or trying to establish new link.
If it is not possible to deliver cargo to the chosen station, cargo remain unasigned or just removed(it should be configurable in settings, removing is less harsh, keeping cargo is more challenging).

With such approach, single A-B pair would give results similar to the standard openttd behaviour, whereas large number of stations accepting given cargo would give better result if interconnected. In my opinion, industry grf with stockpile limits would be also well served (especially if unrouted cargo is being removed).

I would be grateful for any comments and pointing possible flaws of such algorithm.
Formerly known as: McZapkie
Projects: Reproducible Map Generation patch, NewGRFs: Manpower industries, PolTrams, Polroad, 600mm narrow gauge, wired, ECS industry extension, V4 CEE train set, HotHut.
Another favorite games: freeciv longturn, OHOL/2HOL.
Wahazar
Tycoon
Tycoon
Posts: 1451
Joined: 18 Jan 2014 18:10

Re: Bring some cargodest into cargodist

Post by Wahazar »

andythenorth wrote:The way I read it, your post describes how cargodist already works :). What am I missing? :)
Cargodist distribute cargo packets only to the stations already connected (directly or via automatic transfer).

My proposal is to try to route cargo to any existing station, and skip/remove some cargo, if this station is accepting given cargo, but not connected.

For example, assume one-way transport from A to B, if there is one and only A-B link, all generated cargo would be delivered to B, because no other station exists.
But once another separate C-D pair is established (for same cargo type), A would generate 2x smaller traffic (because some cargo from station A cannot be picked to station D and will be dropped).
Formerly known as: McZapkie
Projects: Reproducible Map Generation patch, NewGRFs: Manpower industries, PolTrams, Polroad, 600mm narrow gauge, wired, ECS industry extension, V4 CEE train set, HotHut.
Another favorite games: freeciv longturn, OHOL/2HOL.
ic111
Director
Director
Posts: 608
Joined: 17 Jul 2007 17:56

Re: Bring some cargodest into cargodist

Post by ic111 »

So, essentially, if one has many non-connected networks, the amount of usable cargo either (in the remove-case) decreases towards zero, or (in the keep unassigned-case) would overflow the station. So, basically, you propose a benefit towards having a connected network, do I get this right?
User avatar
supermop
Tycoon
Tycoon
Posts: 1104
Joined: 21 Feb 2010 00:15
Location: Fitzroy North - 96

Re: Bring some cargodest into cargodist

Post by supermop »

ic111 wrote:So, essentially, if one has many non-connected networks, the amount of usable cargo either (in the remove-case) decreases towards zero, or (in the keep unassigned-case) would overflow the station. So, basically, you propose a benefit towards having a connected network, do I get this right?
That's how I understand it, which seems desirable to me. Currently, if anything, interconnected networks are slightly to very penalized, which sort of runs counter to the spirit of cargodist. I think of the proposed approach as simulating a network that is more desirable to use as it becomes more wide reaching. Maybe it still needs some more nuance but the idea sounds interesting to me - I'd certainly experiment with it.
Wahazar
Tycoon
Tycoon
Posts: 1451
Joined: 18 Jan 2014 18:10

Re: Bring some cargodest into cargodist

Post by Wahazar »

ic111 wrote:So, essentially, if one has many non-connected networks, the amount of usable cargo either (in the remove-case) decreases towards zero, or (in the keep unassigned-case) would overflow the station. So, basically, you propose a benefit towards having a connected network, do I get this right?
Exactly, very large number of non-connected pairs of same cargo would give small amount of cargo at each single network (either due to removing or low station ratings).
No problem with income from separate networks for separate cargo. It is still better than original tile-based cargodest (and I believe, more efficient in terms of CPU usage).
Formerly known as: McZapkie
Projects: Reproducible Map Generation patch, NewGRFs: Manpower industries, PolTrams, Polroad, 600mm narrow gauge, wired, ECS industry extension, V4 CEE train set, HotHut.
Another favorite games: freeciv longturn, OHOL/2HOL.
ic111
Director
Director
Posts: 608
Joined: 17 Jul 2007 17:56

Re: Bring some cargodest into cargodist

Post by ic111 »

I think, in terms of playing style, the question here is, wether you start with one connected network, and enlarge it until it spans the whole map, or wether you start with many small isolated networks, and connect them until you have one map-wide network.

When playing with the first variant, I often had the feeling that including new cities into my network works a bit strange - you have a big city with lots of local transport, and build a long distance train towards some other city, which doesn't have this at all. Thus, I see benefits in playing the second style (start with several isolated networks) as well, and when I choose to play this way, I probably would not like what you propose here.

When transporting passengers in a connected network, I also often had the feeling that I don't understand why income drops that much once passengers change between different vehicles. I.e., if I have one train connecting cities A and B via C, I earn relatively much, and once I open a line from C to D, with the effect that passengers travelling from A to D need to change, I earn surprisingly few money. Even if I optimize things using timetables, such that passengers don't have to wait long before the next train starts.

To come back to your point, regardless of the question wether this is a desired behaviour, or a bug, it effectively acts as a bonus for keeping networks unconnected.

So, I didn't have the time to inspect this in detail yet, but given what I have seen in some longer games, I have some gut feeling that there might be some problem left somewhere inside that code.
Wahazar
Tycoon
Tycoon
Posts: 1451
Joined: 18 Jan 2014 18:10

Re: Bring some cargodest into cargodist

Post by Wahazar »

Thank you ic111 for your valid comments. Personally I'm also playing second variant, especially if any city build game scripts are involved.
It is just a matter of balance, a customizable parameter determining how much cargo should use standard cargo distribution algorithm, and how much would try to establish new random route. For example, fraction of new cargo which will be assigned to random seek of route, defined in cfg file.

BTW, I observed that sometimes cargodist cannot establish new route to the added siding, even after year or two. In such case I must put explicite transfer orders, once route is established, I can remove these orders. My idea with randomly chosen routes seems to have side effect repairing such problems.
Formerly known as: McZapkie
Projects: Reproducible Map Generation patch, NewGRFs: Manpower industries, PolTrams, Polroad, 600mm narrow gauge, wired, ECS industry extension, V4 CEE train set, HotHut.
Another favorite games: freeciv longturn, OHOL/2HOL.
ic111
Director
Director
Posts: 608
Joined: 17 Jul 2007 17:56

Re: Bring some cargodest into cargodist

Post by ic111 »

Hm, I didn't observe the latter problem yet, at least as far as I remember.

What I notice is, that things like mixing many regional trains with one long distance train on the same route is a bit difficult. If you have, say, a train every two months that travels from A to B via C, needs, say, 40 days, and one additional train a year, that travels from A to B without calling at C in, say, 32 days, then the difference in travel time is not that severe.

I.e., in reality for a train ride from A to B, you would have a look into the timetable, and take the next train, regardless of the question wether it is the 40 or the 32 days variant.

In OpenTTD, in such a setup you get many passengers that *only* want to travel from A to B directly, and they do not take the local train calling also at C at all. I know, there is an algorithm that tries to balance that by routing less passengers via a too heavily used route, but nevertheless, my feeling is that things often become difficult, once you add a single, faster connection, maybe just because you need more capacity between A and B, but infrastructure doesn't allow more stops at C.

Sometimes, I ask myself the question, wether routing based on timetable information would be an option as well, i.e. route passengers based on connections resulting from the timetable, and make the decision how many passengers want to go to some particular destination (also) based on relative travelling time, i.e. how much time does the connection need compared with the map distance to that connection.

But, I know, this would be a quite severe change to the code, and I am not sure wether this can be implemented in an efficient way at all. But sometimes I occasionally dream of.
Wahazar
Tycoon
Tycoon
Posts: 1451
Joined: 18 Jan 2014 18:10

Re: Bring some cargodest into cargodist

Post by Wahazar »

Another idea: introduce subsidy system back into cargodist, but instead of town to town, pay subsidiary for chosen station to station route, regardless if they are already connected or not (probability of subsidy triggering is proportional to a total number of stations).
Formerly known as: McZapkie
Projects: Reproducible Map Generation patch, NewGRFs: Manpower industries, PolTrams, Polroad, 600mm narrow gauge, wired, ECS industry extension, V4 CEE train set, HotHut.
Another favorite games: freeciv longturn, OHOL/2HOL.
mrjack2
Engineer
Engineer
Posts: 74
Joined: 21 Jan 2016 23:04

Re: Bring some cargodest into cargodist

Post by mrjack2 »

I play with non-PAX cargodist and sometimes speculate how I would like it to work. Some possible thoughts.

(1) receiving stations or industries bid for discrete cargo packets / contracts (whose size can be scaled as a setting). (Once they win packets, their next bid is lowered. Some industries (maybe black hole industries like power plants) may have a higher starting bid). Bids can be dependent on things such as catchment population, so that large cities can receive goods and food etc in proportion to population. Variance can be added to bids, which is high for cargos like goods, food, alcohol etc (as these cargos come in many different forms and there will be cross-map demand) while it is lower for cargos that vary less (coal, oil, grain).

(2) producing stations or industries determine cost of paying transport to each bid, choose the lowest bid, and the cargo is set into that route and destination.

(3) contracts regularly re-negotiated, with newly serviced industries, and industries with poor service, getting priority.

(4) Ideally, price competition between companies, where by some mechanism, a company can reduce their price on a cargo link from the default for a period of time, and hence get a greater amount of cargo over their competitors.


Edit: but these are probably the sorts of things that were discussed when cargodist was first created, and were simplified into the current system :)
User avatar
YNM
Tycoon
Tycoon
Posts: 3570
Joined: 22 Mar 2012 11:10
Location: West Java

Re: Bring some cargodest into cargodist

Post by YNM »

Personally, I only play CargoDist with passengers and mail. Even with such measure too often I can't cope with the cargo growth fast enough. So far all the goods I handle doesn't use CargoDist. If there's anything, I guess what could be interesting is limited destinations for industries as it means that we can't handle cargo at a whim. I know that this goes a bit backwards to "process as many cargo as possible", but I'd be delighted to see such variations due to limitations instead of self-decision.
YNM = yoursNotMine - Don't get it ?
「ヨーッスノットマイン」もと申します。
User avatar
Pyoro
Tycoon
Tycoon
Posts: 2558
Joined: 17 Oct 2008 12:17
Location: Virgo Supercluster

Re: Bring some cargodest into cargodist

Post by Pyoro »

I wonder how the game would change if industry cargodist could work "in reverse"? Generate some cargo links as soon as the industry is build, and the player then has to build a network that suits the industries' demands, not the other way around :?
Supercheese
Tycoon
Tycoon
Posts: 1660
Joined: 16 Dec 2007 22:24
Location: Idaho, USA

Re: Bring some cargodest into cargodist

Post by Supercheese »

Pyoro wrote:I wonder how the game would change if industry cargodist could work "in reverse"? Generate some cargo links as soon as the industry is build, and the player then has to build a network that suits the industries' demands, not the other way around :?
I think I would like that much more than the current implementation. For passengers/mail too, not just industries.
Eyecandy Road Vehicles | Fake Subways | Supercheese's NewObjects

"Fashions and cultures change, but steam trains shall always be majestic."
-Professor Hershel Layton
mrjack2
Engineer
Engineer
Posts: 74
Joined: 21 Jan 2016 23:04

Re: Bring some cargodest into cargodist

Post by mrjack2 »

Supercheese wrote:
Pyoro wrote:I wonder how the game would change if industry cargodist could work "in reverse"? Generate some cargo links as soon as the industry is build, and the player then has to build a network that suits the industries' demands, not the other way around :?
I think I would like that much more than the current implementation. For passengers/mail too, not just industries.
But that's not at all realistic. Induced demand is a thing, and it's one of the most essential things to understand when planning transit systems.
Supercheese
Tycoon
Tycoon
Posts: 1660
Joined: 16 Dec 2007 22:24
Location: Idaho, USA

Re: Bring some cargodest into cargodist

Post by Supercheese »

mrjack2 wrote:But that's not at all realistic. Induced demand is a thing, and it's one of the most essential things to understand when planning transit systems.
Well, OpenTTD is, in many areas, not particularly realistic. From a gameplay perspective, I'd love it if towns and industries decided on their own the destinations for each batch of their produced cargoes, irrespective of any existing transport links, leaving it up to the player to select which links to satisfy. The existing cargodist situation of industries and towns conforming only to existing transport links is not very satisfying for me.
Eyecandy Road Vehicles | Fake Subways | Supercheese's NewObjects

"Fashions and cultures change, but steam trains shall always be majestic."
-Professor Hershel Layton
mrjack2
Engineer
Engineer
Posts: 74
Joined: 21 Jan 2016 23:04

Re: Bring some cargodest into cargodist

Post by mrjack2 »

Supercheese wrote: Well, OpenTTD is, in many areas, not particularly realistic. From a gameplay perspective, I'd love it if towns and industries decided on their own the destinations for each batch of their produced cargoes, irrespective of any existing transport links, leaving it up to the player to select which links to satisfy. The existing cargodist situation of industries and towns conforming only to existing transport links is not very satisfying for me.

I agreed it's not meant to be realistic, and I often roll my eyes at demands for "realistic" things that don't fit the aesthetic of the game, but that doesn't mean we should introduce ideas that are intentionally unrealistic, except as simplifications.
User avatar
Pyoro
Tycoon
Tycoon
Posts: 2558
Joined: 17 Oct 2008 12:17
Location: Virgo Supercluster

Re: Bring some cargodest into cargodist

Post by Pyoro »

With passengers I can see the difficulty of trying to work out how to do it; I mean, it's it city-wide? Individual houses? Can that be done? And what happens then to intra-city transport etc? So while I'm not saying it's impossible (other games do it obviously) this seemed a bit more non-trivial to me.

As for the realism thing, I honestly don't think one is more realistic than the other ^^ The basic situation, of industries sitting around doing nothing until the player comes along is so far away from anything related to "real" economics I don't think many arguments would work.

But the point was essentially that it'd make the game at least a little more challenging. ;)
User avatar
Simons Mith
Transport Coordinator
Transport Coordinator
Posts: 326
Joined: 14 Jan 2010 23:45

Re: Bring some cargodest into cargodist

Post by Simons Mith »

I always assumed factories not served by players were transporting cargo via invisible camel train or something. The point is that whatever the alternative-invisible transport method is, it performs so poorly that any other service the player can provide will be better, which is why companies switch to it the moment it's available. That said, I would like to minimally simulate the invisible network so that a well-placed industry is more likely to survive 'unserved' for longer than a badly-placed industry.
User avatar
supermop
Tycoon
Tycoon
Posts: 1104
Joined: 21 Feb 2010 00:15
Location: Fitzroy North - 96

Re: Bring some cargodest into cargodist

Post by supermop »

Generally I'll add that while passengers behave both with induced demand, and without (people are more likely to get a job in a town they can easily travel to, people in Europe have always wanted to travel to China even when the only option was walking, etc), cargos do feel a bit odd entirely shipping by induced demand (or worse, paying full freight to ship wherever the carrier feels like it). There might be some appetite for some kind of inherent preference for cargo destinations before connections are made (this power plant only will buy from the nearby coal mine, that textile mile actually does want the wool from far away because cashmere is nicer than the local lambswool, etc). it wouldn't have to be always strictly realistic and mean, but would be interesting if there was a demand for transportation, rather than just a demand to ship in as much as possible from wherever.
Post Reply

Return to “OpenTTD Suggestions”

Who is online

Users browsing this forum: No registered users and 4 guests