Cargodist to limited-capacity stations

Got an idea for OpenTTD? Post it here!

Moderator: OpenTTD Developers

User avatar
krtaylor
Tycoon
Tycoon
Posts: 11784
Joined: 07 Feb 2003 01:58
Location: Texas, USA
Contact:

Cargodist to limited-capacity stations

Post by krtaylor »

So I'm playing with cargodist, and basically I love it (for passengers) as it makes a true passenger network what it ought to be and never was before.

But there are a couple of tweaks that I think would improve it.

1. Is the code handling the distribution able to see any information about the possible destination stations beyond simply how far away they are? Because I set my distance setting at 90% not 100% because I wanted the passengers to take longer trips, changing vehicles as required to get where they're going. I set up my network with a lot of intermodal hubs to facilitate this.

Unfortunately, by the nature of TTD geography, the "furthest away" stations are almost always oil rigs. So I get thousands of people sitting around at my hub airports waiting to cram onto the one little helicopter that goes out to the oil rig, dragging down my performance stats. I can't even make money with it since the chopper usually comes back empty.

The same thing also happens with certain road/tram stations, where the vehicle sizes simply cannot cope with the number of passengers coming from all across the map wanting to go to That One tram stop.

If the distribution code could see the station type, perhaps it could apply a limit to the number of passengers choosing oil rigs and road-only stops as their destination.

2. The flip side of this problem is an old one, where overwhelming numbers of passengers come to a center-city tram stop, more than the trams or busses could possibly carry away.

My solution to this is the same one as in the real world: "walking." As I see it, it might be possible for passengers who are at the station waiting for a tram or train, to check whether they can reach the next stop on their way by hoofing it. As in, is it within 10 squares or something reasonable? And if so, that's what they do.

Thus, instead of 3,000 people stuck waiting at the tram stop getting hauled away in batches of 50 forever, after a while a good portion of them will disappear from that stop and reappear at the intermodal tram/airport station where they can catch a plane to where they really want to go, having skipped the first leg of their trip but not abandoning it entirely. The same thing would happen in reverse, as passengers who got off a plane give up waiting for the tram to their final destination.

But I don't know the internals of how cargodist works so maybe this isn't possible.
Development Projects Site:
http://www.as-st.com/ttd
Japan, American Transition, Planeset, and Project Generic Stations available there
User avatar
fonso
President
President
Posts: 945
Joined: 13 Oct 2007 08:28

Re: Cargodist to limited-capacity stations

Post by fonso »

You got that wrong. 100% would mean high effect of distance on demand. That means people will prefer closer destinations not distant ones. If you want them to choose destinations independent of their distance set it to 0%. However, if you stick with symmetric distribution, oil rigs usually get few passengers as they also produce few. The reason for large amounts of waiting people is usually suboptimal network layout (e.g. the oil rig could be the only way for them to get to some other, unrelated destination) or just plainly insufficient capacity. If you have only slightly more people wanting to go to the oil rig than the helicopter can handle and you leave it like that for a couple of years, they will pile up.

Links to oil rigs as well as to any sea ports have potentially unlimited capacity as you can have as many ships load and unload at the same time there as you like - remember that ships can run into each other. It would thus be very unwise to limit cargo distribution there. Also, you can have very efficient road stops which handle a lot of traffic. The distribution algorithm can't easily find out how much cargo a particular station is able to handle and so it doesn't try.

One idea that was tested for some time is a "waybill" mode where the cargo is not distributed by demand but by link capacity. That should make it much easier to get all the cargo transported, but the test results were somewhat unconclusive.

I don't like the idea of "walking" passengers. That removes a large part of the station rating challenge. If you don't want to properly serve a particular station, you can always tear it down.
The guy on the picture is not me, it's Alonso.
Eddi
Tycoon
Tycoon
Posts: 8272
Joined: 17 Jan 2007 00:14

Re: Cargodist to limited-capacity stations

Post by Eddi »

ad 1: there was a "waybill" mode in development that took into account the capacity to a station when determining the "demand" for it, so the movement patterns will adapt better to what the network can actually manage.

ad 2: the game is not really designed for "walking". introducing it might change gameplay in weird ways which have to be thoroughly examined. if you have trouble transporting inner-city, make fewer but larger stations (e.g. with ctrl-click)
User avatar
krtaylor
Tycoon
Tycoon
Posts: 11784
Joined: 07 Feb 2003 01:58
Location: Texas, USA
Contact:

Re: Cargodist to limited-capacity stations

Post by krtaylor »

OK, I see how to deal with the oil-rigs, I just need to tweak the settings.

Re the station capacity though - if you are going to have an inner-city tram line, it's just not possible to increase the station capacity. A tram station can only handle so many (few) trams and they get only so big. I tried to have more than one tram stop in the same station and that failed - the trams went there but didn't load, so it seems like cargodist treated them as two separate stations even though they were the same.
Development Projects Site:
http://www.as-st.com/ttd
Japan, American Transition, Planeset, and Project Generic Stations available there
User avatar
krtaylor
Tycoon
Tycoon
Posts: 11784
Joined: 07 Feb 2003 01:58
Location: Texas, USA
Contact:

Re: Cargodist to limited-capacity stations

Post by krtaylor »

And another thing - given that cargodest will, in effect, create more passengers (because each one will probably be traveling on multiple vehicles), does it automatically reduce the total number created? It seems like it ought to. When I'm playing with cargodest on, I'm always totally mobbed with more passengers than I can easily handle. That's kind of fun but it also means that the smaller-capacity trains are useless - it's all heavy engines and bilevels, and 747s at the airports.
Development Projects Site:
http://www.as-st.com/ttd
Japan, American Transition, Planeset, and Project Generic Stations available there
Eddi
Tycoon
Tycoon
Posts: 8272
Joined: 17 Jan 2007 00:14

Re: Cargodist to limited-capacity stations

Post by Eddi »

no. this was heavily discussed before, but it was decided that this should not be part of cargodist.

whether and how this should be done as a separate patch is not yet decided.

with the tram stops, you probably did something wrong. it always worked for me.
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5602
Joined: 13 Sep 2004 13:21
Location: The Moon

Re: Cargodist to limited-capacity stations

Post by PikkaBird »

Reducing passengers produced by towns is "easily" achieved in NewGRF.
User avatar
krtaylor
Tycoon
Tycoon
Posts: 11784
Joined: 07 Feb 2003 01:58
Location: Texas, USA
Contact:

Re: Cargodist to limited-capacity stations

Post by krtaylor »

Well, yes, that makes sense, so one could write a "Fewer passengers produced" NewGRF. That seems rather a user-unfriendly way to do it though.

I do agree that it wouldn't be part of cargodist proper. I guess I'd see it as another advanced option - "Passenger/Mail Production", going from, say, 10% of normal through 200% (perhaps useful in the Tropics).
Development Projects Site:
http://www.as-st.com/ttd
Japan, American Transition, Planeset, and Project Generic Stations available there
User avatar
kamnet
Moderator
Moderator
Posts: 8589
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: Cargodist to limited-capacity stations

Post by kamnet »

"Early Houses" automatically reduces population for pre-1930s era buildings. "Canadian Buildings" also includes an option to increase or decrease population of the the default OpenTTD settings.
Hafting
Engineer
Engineer
Posts: 106
Joined: 13 Feb 2014 11:22

Re: Cargodist to limited-capacity stations

Post by Hafting »

krtaylor wrote: Re the station capacity though - if you are going to have an inner-city tram line, it's just not possible to increase the station capacity. A tram station can only handle so many (few) trams and they get only so big. I tried to have more than one tram stop in the same station and that failed - the trams went there but didn't load, so it seems like cargodist treated them as two separate stations even though they were the same.
Tram station capacity is easily increased by building several tramstop side-by-side. (To make room, demolish buildings or use ctrl-click to create a "station" distributed over several streets.)

The tram stops must be side-by-side, not in-line. And there must be tramline connecting them on each side so approaching trams can spread out and select a free stop. (And merge together to a line on the other side to move on.)

You will then see a dense queue of trams approaching at full speed, the first two stopping in the easiest accessible stop, the next two going to the next available stop, and so on. The trams stand still for some time and then move on - if you have enough parallell stops, you can serve a queue that goes at full speed. If that is not enough, consider parallell tracks between different stations as well. Of course, if you have that many passengers, consider upgrading to a train line through the city instead.

In-line stations won't work as all the trams will stop at the first part, and then roll through the second part having "already been to this stop". Side-by-side works; for when one stop is full, approaching trams go to the adjacent one. Busy truck/bus stops works the same way.

If a tram stop doesn't work, check if it is the right type. Passenger trams won't stop at a cargo tram stop. And a tram line going through a bus stop is not a tram stop - even though it may look exactly the same. openttd has a tool for checking what a tile really is.
User avatar
YNM
Tycoon
Tycoon
Posts: 3574
Joined: 22 Mar 2012 11:10
Location: West Java

Re: Cargodist to limited-capacity stations

Post by YNM »

I thought the invisible tram thing could sort of solve the problem (as the capacity are based off trains) ?
YNM = yoursNotMine - Don't get it ?
「ヨーッスノットマイン」もと申します。
Eddi
Tycoon
Tycoon
Posts: 8272
Joined: 17 Jan 2007 00:14

Re: Cargodist to limited-capacity stations

Post by Eddi »

Hafting wrote:
krtaylor wrote: In-line stations won't work as all the trams will stop at the first part, and then roll through the second part having "already been to this stop".
that is definitely not true. if tram stops are built as a long platform, then trams (or trucks/busses) will go to the far end of the platform and then stop, unless they get stuck behind a vehicle already loading, then they will stop directly behind that vehicle.

however, long platforms are not very optimal. you will occasionally get vehicles stopped in the middle of the platform long after the previous vehicle already left, especially with long loading times or full load. in the worst case, there will be a vehicle already leaving trying to wait for a vehicle in front of them which still loads. vehicles cannot overtake in stations, so this will cause a traffic jam.

most of the time i build my tram stops so that two trams can stop behind each other, but not more.
User avatar
krtaylor
Tycoon
Tycoon
Posts: 11784
Joined: 07 Feb 2003 01:58
Location: Texas, USA
Contact:

Re: Cargodist to limited-capacity stations

Post by krtaylor »

What I tried to do, and which did not work, was to have multiple tram stations as part of the same station complex but in which the tram stations were not adjacent to themselves. Picture a central train station, with two separate tram stops on opposite sides of the rail station. That didn't work - trams would use the first on that was laid down, but just ignored the second one on the other side. Pity, as that would be really useful.

Regarding the symmetric distribution mode, I'm playing with that now. It certainly did fix the problem of hordes wanting to visit oil rig platforms. But there's a new problem, which is a bit of a shame - nobody wants to visit small towns. If the small town only generates 1 passenger, then that's all that you get wanting to visit it in return. Previously I had relatively larger numbers of people (tourists?) going to the small town, which not only helped the town grow, it balanced the traffic.

I read about the "waybill" experiment. Sounds like the Field of Dreams approach - if you built it they will come! I like that.

There may be another solution - could you put in a percentage control for "symmetric" mode rather than just on/off? As in, 2-1, 3-1, 4-1, etc. So for imbalanced routes like between a big city and a tiny town, the big city would send (say) 4x as many passengers to the small town as the town generated?
Development Projects Site:
http://www.as-st.com/ttd
Japan, American Transition, Planeset, and Project Generic Stations available there
Eddi
Tycoon
Tycoon
Posts: 8272
Joined: 17 Jan 2007 00:14

Re: Cargodist to limited-capacity stations

Post by Eddi »

krtaylor wrote:What I tried to do, and which did not work, was to have multiple tram stations as part of the same station complex but in which the tram stations were not adjacent to themselves. Picture a central train station, with two separate tram stops on opposite sides of the rail station. That didn't work - trams would use the first on that was laid down, but just ignored the second one on the other side. Pity, as that would be really useful.
it must be one long platform. you cannot have gaps in it.
User avatar
krtaylor
Tycoon
Tycoon
Posts: 11784
Joined: 07 Feb 2003 01:58
Location: Texas, USA
Contact:

Re: Cargodist to limited-capacity stations

Post by krtaylor »

Well, right, I discovered that. I assume that removing that limitation would be programmatically impractical?
Development Projects Site:
http://www.as-st.com/ttd
Japan, American Transition, Planeset, and Project Generic Stations available there
Eddi
Tycoon
Tycoon
Posts: 8272
Joined: 17 Jan 2007 00:14

Re: Cargodist to limited-capacity stations

Post by Eddi »

It would complicate a lot of things. because when it's not a single platform, it violates the basic foundation of pathfinding: choose the platform with the lowest distance.
User avatar
krtaylor
Tycoon
Tycoon
Posts: 11784
Joined: 07 Feb 2003 01:58
Location: Texas, USA
Contact:

Re: Cargodist to limited-capacity stations

Post by krtaylor »

Would it? That's not a problem with train stations - you can have multiple platforms that aren't physically adjacent to each other, and the pathfinding still works. Maybe trams (road vehicle) pathfinding works differently?
Development Projects Site:
http://www.as-st.com/ttd
Japan, American Transition, Planeset, and Project Generic Stations available there
Eddi
Tycoon
Tycoon
Posts: 8272
Joined: 17 Jan 2007 00:14

Re: Cargodist to limited-capacity stations

Post by Eddi »

depends on what you mean with "it". the pathfinder handles this situation the same way as with train stations. it chooses the nearest available platform, with a penalty for occupied platforms. but you want it to choose the stopping position which blocks the least number of other vehicles, which is nothing you can express with pathfinder penalties. so road vehicles handle this in a separate step, that only works when the pathfinder already returned a platform to use. so at this point, only the position along the platform can be altered, it cannot pick a different platform. and a "platform" for the pathfinder is any number of continguous station tiles in the same direction.
User avatar
krtaylor
Tycoon
Tycoon
Posts: 11784
Joined: 07 Feb 2003 01:58
Location: Texas, USA
Contact:

Re: Cargodist to limited-capacity stations

Post by krtaylor »

Then I'm even more confused.

A "platform" is any number of contiguous station tiles in the same direction. Got that, just like with train station platforms.

Why, then, can't the pathfinder handle road vehicle stations with multiple station tiles where they are not contiguous in the same direction? This works fine with train stations which have multiple platforms - the train will pick the nearest platform if it can get to it, or a farther one if it can't, and it isn't confused by other platforms in the same station but a different network that their track doesn't even connect to.

But if you try that with trams, only one of the station tiles will work; the other one gets ignored as if it doesn't exist. At least for me.
Development Projects Site:
http://www.as-st.com/ttd
Japan, American Transition, Planeset, and Project Generic Stations available there
Post Reply

Return to “OpenTTD Suggestions”

Who is online

Users browsing this forum: Ahrefs [Bot] and 18 guests