News:

Simutrans Wiki Manual
The official on-line manual for Simutrans. Read and contribute.

Transferring freight at stations

Started by Jando, June 05, 2017, 09:54:24 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Jando

In my new map I have a station that covers 2 collieries. here's a screenshot of it: http://files.simutrans.com/index.php/s/WLD07hrIaZPye35

Station is served by 4 trains on 4 different lines but these numbers will grow soon. And I run into the little problem that the speed of transferring coal from the collieries to the station limits the amount of cargo the network can transport. Quite frequently many of the trains are waiting for cargo because the coal is in the process of transferring (like the screenshot shows). This can take a long time, the train with the tooltip shown sits there since 2 game-hours waiting for cargo that is in the process of transferring (it's the Calwater Power Station train).

Often the coal gets transferred from collieries to station in packets of 10, but that happens not often enough to deal with the demand and supply. Thus the speed and amount of transferring cargo from supplier to station limits the amount of cargo convoys can transport from a station.

A funny by-product of this is that cargo in the process of transferring counts to the overcrowded limit, thus one can have an overcrowded station with no cargo to pick up. :)

jamespetts

The transfer speed is intended to limit capacity to an extent, as, of course, it does this in real life, too. Do you think that there is a miscalibration of this feature, however? If so, do you have any practical thoughts as to how the correct calibration would work?

As to overcrowding, I will have to look into that.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Vladki

I think that if the station is on the very next tile to the factory, then the cargo should be be transferred almost immediately (only loading time involved). Slow transfer should be in place only if the station is a few tiles away from the factory.

Sent from my ONEPLUS A3003 using Tapatalk


Junna

I have a station next to a coal-fired power station, but there is absolutely no way of supplying it consistently, because so much is slowed by the transfer (primarily at power station end) and counts to in-transfer, so the suppliers temporarily stop, and the power station stops generating. Because the station requires length to handle 12-tile coal trains the transfer time is high.

Ves

At some pint it might actually be more efficient to have more smaller stations and small trucks between them.
So maybe some new forklifts are needed? :-)

Jando

Quote from: Junna on June 06, 2017, 07:59:10 AM
I have a station next to a coal-fired power station, but there is absolutely no way of supplying it consistently, because so much is slowed by the transfer (primarily at power station end) ...

I see the same (coal merchant in my case), but I believe that's also because all industries demand and consume much more cargo than is stated in the industry dialogue, in fact 6-8 times the amount stated. But if I understood James right balance of industries is something to be done later when the basic operational bugs (routing, stations, schedules, loading, etc) are fixed.

Here's a screenshot of a power station stating "Max 80 units per month" happily consuming up to 673 units per month: http://files.simutrans.com/index.php/s/W3FH9PKBtUnd3sO

And yes, that graph is correct, the only industry graph not working correctly is the storage one (for all industries), that amount of coal got delivered to that power station.

Jando

Quote from: jamespetts on June 05, 2017, 11:20:00 PM
The transfer speed is intended to limit capacity to an extent, as, of course, it does this in real life, too. Do you think that there is a miscalibration of this feature, however? If so, do you have any practical thoughts as to how the correct calibration would work? ...

Hello James, thanks for your answer. I would probably tie the calibration to a feature we already have, namely the station's storage capacity.

Case 1: convoy offloading cargo at a station. If the amount of cargo off-loaded fits into the available storage capacity of that station then transfer to consumer should be fast. If the amount of cargo unloaded exceeds available capacity then transfer should be slow. 
Case 2: convoy picking up cargo at a station. If the amount of cargo to be loaded on that train fits into the available storage capacity of that station then transfer of cargo to station should be fast. If the amount exceeds available storage then transfer should be slow.

Available storage in both cases is defined as total freight capacity of station - already existing cargo at station.

I do something like the above on my freight stations anyway. A station at a consumer needs at least the storage capacity of the largest train serving that station. A station at a supplier needs at least the capacity of the largest train serving that station multiplied with number of platforms of that station. Just my rule of thumb, hehe.

jamespetts

Thank you for all of your feedback. Firstly, there is no way (without a radical redesign of some of the most fundamental components of Simutrans-Extended, viz. the path explorer, which is out of the question for the foreseeable future) to have branching logic of any sort in the calculation of the transshipment time: it has to be a single number that applies for all freight loading/unloading/transferring at that stop.

However, it is not clear to me whether this issue is caused by the calibration of the transshipment time (i.e. the time taken to transfer the cargo within a stop) or the carting time (i.e. the time take to transfer the cargo from an industry to a stop). It would help me in this connexion to see the saved game so that I can try to pick apart the two effects and understand what precisely is causing the issues here.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Jando

Quote from: jamespetts on June 06, 2017, 10:57:04 PM
... However, it is not clear to me whether this issue is caused by the calibration of the transshipment time (i.e. the time taken to transfer the cargo within a stop) or the carting time (i.e. the time take to transfer the cargo from an industry to a stop). It would help me in this connexion to see the saved game so that I can try to pick apart the two effects and understand what precisely is causing the issues here.

Sadly I don't have a saved-game from that screenshot, I'll make sure to make one when I see the effect next time, James.

jamespetts

Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Jando

Here is a new saved game: http://files.simutrans.com/index.php/s/y5At4SlIfPmrv5S
Here is a screenshot explaining the situation: http://files.simutrans.com/index.php/s/9eB5v6OeTBwKQwq

You see a station with 4 platforms serving 2 collieries, 4 trains on 4 different lines bring coal from here to 4 different stations with 5 consumers. The game is saved when 3 of these trains are sitting in the station waiting for load and the 4th train is just pulling into the station. That train will load the last remaining cargo. After that no cargo will be available at the station, a total of 860 tons of cargo is in the process of transferring however.

Game time is 1h:35m when that happens. Nothing will happen at all now, i.e. no coal from that 860 tons in transfer will get onto the waiting trains until game time 2h17m. At that time a consumer will demand more coal, i.e. the amount of coal in transfer will go up and packets of 10 coal will slowly arrive at the station (and immediately get loaded on one of the waiting trains). First train will leave the station at game time 2h:29m with 1030t of coal in transfer.

jamespetts

Thank you very much for that. Studying the code carefully, I have found a potential bug which might have caused or exacerbasted this issue: the transshipment time at stops was not taken into account in calculating the maximum in-transit percentage. I have now pushed a fix to this; would you be able to re-test and confirm whether and to what extent that this is still in issue? I should be most grateful.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Jando

Quote from: jamespetts on June 08, 2017, 07:47:26 PM
... I have now pushed a fix to this; would you be able to re-test and confirm whether and to what extent that this is still in issue? ...

Hello James and others! :)

Saved game is here: http://files.simutrans.com/index.php/s/kuZB9eemZ1o06ab
Screenshot is here: http://files.simutrans.com/index.php/s/lTLVJYGK0zNLgSU

Balance has shifted for sure. Trains spend less time waiting for cargo now, accordingly they deliver more coal - and I can see that at my finance screen (see screenshot). Month -2 is the old balance, before the fix, with 15.337 revenue, after the fix revenue went to 18.757 and now 19.496 at the end of the current month - that is all because the trains spend less time waiting for full load.

However, trains are still waiting in that screenshot, all 4 platforms are occupied with trains waiting for full load, with 1310 tons of cargo currently in transfer. Thus we have a better balance now, but the underlying problem still exists I would say, namely that suppliers can supply and consumers can demand more cargo than can be handled by the transfer process. Of course there are two possible solutions to this: increase the throughput of the transfer process - or reduce demand and supply of industries to amounts that can be handled by station transfer.

Just as an aside: I remember that in the old Experimental I once had a map where I had 3 or 4 regional cargo hubs (for long goods, piece goods and foods) where suppliers would deliver to their next regional hub and trains would deliver between hubs and to consumers in towns from there. I wonder how that would work with a transfer process that seems to be somewhat like a hard cap on the amount of cargo a station can handle?

jamespetts

May I ask - (1) is the power station connected to all the coal mines in its list of suppliers; and (2) does the power station actually run out of coal at any point?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Jando

#14
Quote from: jamespetts on June 10, 2017, 10:52:29 AM
May I ask - (1) is the power station connected to all the coal mines in its list of suppliers; and (2) does the power station actually run out of coal at any point?
That station at the two collieries currently supplies coal to:

2 gasworks
1 coal merchant
4 large (modern) power stations
1 small (old) power station

The 2 gasworks and the coal merchant regularly run out of coal (I assume by not demanding enough coal from the collieries). 1 modern power station runs out too but that is my fault, my downstream network (with narrowboats) is not yet up to good capacity.

The other power stations directly served by train hardly ever run out of supply. I just watched a train deliver coal to a modern power station, the transfer process at that power station was finished when 16 :) units of coal had been left at the power station. Overall I'd say the process of demand and transfer at the consuming power stations is just fine for my 5-tile long trains. Edit: Watched another modern power station that ran out of coal for 2 in-game minutes now before the new delivery of coal was available at the power station.

1 gasworks, 1 coal merchant and 1 modern power station have yet to be connected to that station at the two collieries, the collieries have plenty of supply left. We will see how the station deals with that traffic. :)

jamespetts

Are the gasworks and coal merchants that run out of coal regularly connected to all of the collieries in their list of suppliers? If I recall correctly how I set up the calibration for the maximum in transit percentage, it was on the assumption that all supplier industries would have to be connected to supply enough raw materials to sustain production.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Jando

Quote from: jamespetts on June 10, 2017, 02:06:18 PM
Are the gasworks and coal merchants that run out of coal regularly connected to all of the collieries in their list of suppliers? If I recall correctly how I set up the calibration for the maximum in transit percentage, it was on the assumption that all supplier industries would have to be connected to supply enough raw materials to sustain production.

All consumers (no matter what type of consumer) on that map are only connected to one supplier, it's the same for consumers that run out of coal and those that do not run out. I even try to avoid connecting consumers to multiple suppliers for two reasons:

1. Consumers that are connected to a supplier and then later to a 2nd supplier tend to continue to demand over 90% of their supplies from the supplier connected first, and less than 10% from the supplier connected after that, usually making the 2nd line a money-losing connection. I have another map with a power station where I can observe this because it's connected to two suppliers. In that case I did that with full intent because I could use that for trains running from colliery to the power station to carry cargo for another power station on their return trip.
2. Having consumers connected to multiple suppliers leads to increased network complexity where eventually supplies for one consumer can pile up at another consumer station if the player isn't very careful. :) Bulk lines are best handled point-to-point, else you sooner or later have clay or cement sitting at a colliery or iron mine because a route opened up from a supplier to a consumer via 2 or 3 other suppliers.

jamespetts

#17
This seems to me, in that case, to be a quite separate issue, as the system was specifically calibrated to work with downstream industries requiring to be connected to all upstream suppliers to function at full capacity. The network complexity is entirely realistic. As to the first issue in relation to unevenness of supply, this is possibly incorrect, albeit this may well be code entirely unchanged from Standard (I am not sure whether the same effect can be observed there).

Edit: I should have asked - are you able to reproduce this issue reliably with the latest version?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Jando

Aye, James, the underlying issue still exists. Just to remind us what my issue is: the transfer process of cargo at a station with suppliers can be too slow to deliver the cargo demanded by consumers in time. Instead of bringing cargo to consumers the trains wait at the station for the transfer process to finish.

Here's a new screenshot of it: http://files.simutrans.com/index.php/s/d8ronqgIxF7rCO7
Here's a new saved game of it: http://files.simutrans.com/index.php/s/pF3McLUsEXPom6R

In the screenshot (and saved game) you see a station where 4 trains are waiting for full load. No load for these trains is available at the station thus the trains wait. However, 1670 tons of cargo are in transfer. See train #1 (shown on screenshot as well) for an example, train waits at station since about 2 game-hours now, 57% of the train's capacity has been transferred in that time, with about 250% of the train's capacity still in transfer.

In general terms: consumers demand cargo from a supplier although that cargo has no chance to arrive at the consumer in time (even with a perfect transport network) because too much time is spent transferring the cargo before it reaches the player's network. :)

jamespetts

I am a little unclear what you mean by "in time" here - can you elaborate? Specifically, can you reproduce a situation in which consumer industries are left short of supply despite being connected by efficient networks to all suppliers?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Jando

Quote from: jamespetts on June 11, 2017, 11:40:57 PM
I am a little unclear what you mean by "in time" here - can you elaborate? Specifically, can you reproduce a situation in which consumer industries are left short of supply despite being connected by efficient networks to all suppliers?
Hello James. That's easy, because it can happen to consumers that only have 1 supplier. :)

But even with consumers that have multiple suppliers it won't make a difference because consumers just do not demand cargo from new (or far away?) suppliers when they already have a supplying industry with mountains of spare capacity just around the corner. And of course that also makes sense, why should a coal merchant demand coal from half a map away when the merchant can get the coal easily from the next town. Thus no coal from a new connected supplier gets delivered because the consumer never demands any coal from that new supplier (apart from an odd 10 units once in a blue moon).

I just connected a coal merchant that regularly runs out of coal to another supplier and watched it for a Simutrans day, not a single unit of coal was demanded from that supplier although the coal merchant ran out of coal several times during that period.

Sorry, but I think the bottleneck is still the time it takes to get coal from the colliery onto the waiting train, thus the transfer process. I'm not sure how the transshipment time plays a role here and how it is calculated, but I see wildly fluctuating transshipment times in the station's detail window. At this same station with the two collieries from the screenshot I have seen transshipment times varying from 1 minute to more than 3 hours now.

Thanks again, James!

jamespetts

Thank you for the clarification. May I ask - is the saved game posted above one where there is only one supplier? If not, it would be very helpful to have an example in this configuration to make it easier to test.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Jando

Quote from: jamespetts on June 13, 2017, 12:11:13 AM
Thank you for the clarification. May I ask - is the saved game posted above one where there is only one supplier? If not, it would be very helpful to have an example in this configuration to make it easier to test.
Good day, James!

Not on that saved game - but easily done because there's a 3rd not connected colliery in that region that has two consumers that already are connected to that 4-platform freight station. I just used the public player to delete that colliery so that now an already connected gasworks and an already connected large power station have only one supplier each.

I let the simulation run for a few Simutrans days and will report back.

jamespetts

Splendid, thank you. Sorry for such rigorous questioning, but my time on Simutrans is so stretched that it makes a huge difference if people reporting bugs can help to narrow them down as far as possible to minimise the amount of time that I have to spend recreating the problem so that I can maximise the time doing other work (such as fixing online play, which is very time consuming).

If you could upload a saved game in which the problem occurs with all suppliers connected (whether there be one or more than one), I should be very grateful.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Jando

No worries, I'm glad to help with these things.

jamespetts

I have just pushed a fix that might help with this, although I have not had the opportunity to test this. The thing that this fixes is that the transshipment and carting times at the destination were not taken into account in calculating the lead time. Would you be able to re-test this?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Jando

Quote from: jamespetts on June 14, 2017, 10:13:14 PM
I have just pushed a fix that might help with this, although I have not had the opportunity to test this. The thing that this fixes is that the transshipment and carting times at the destination were not taken into account in calculating the lead time. Would you be able to re-test this?

Thanks, James! I'll check it out over the weekend.

jamespetts

Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Jando

Not seen any difference on my freight maps with the new patch, sorry. But I run rather short trains (5 tiles long), the transshipment time at the consumer is rather low anyway (~10 minutes). Thus it's likely that it makes little difference.

The issue I see is more about bottlenecks at the supplier when that supplier (or 2 of them at one station) has multiple consumers. I see wildly fluctuating transshipment times at that station with the 2 collieries supplying 7 or 8 different consumers, have seen values ranging from 1 1/2 minutes to over 3 hours in that station's detail information, but I don't really know whether that's something that is to be expected or not. :)

Perhaps it's all a balance problem? Currently a single colliery can easily supply 5-6 consumers, but the station at the colliery cannot (because of the amount of time cargo spends in the transfer process). That station currently handles peek 4692 tons of cargo per Simutrans day. Just too much? But then a freight hub would would have much more throughput.

jamespetts

#29
Can you be more specific with the description of the problems that you are still having? It is very helpful to have precise instructions to be able to reproduce each issue separately. The fluctuation of transshipment times - do you mean that this changes over time for a single station, or varies between stations? If the former, can you upload a saved game in which this can reliably be reproduced? As to the problem with insufficient supply to industries, are you still able to reproduce this in circumstances where all of the suppliers are connected (e.g. where there is only one supplier)?

The way that the system works is that it calculates the lead time (that is, the amount of time that it takes any goods to get from the factory gate of the producer to the factory gate of the consumer), then using that, plus the rate of consumption of the consumer, and taking into account how much is already in transit, calculates how much should be dispatched to the origin stop at any given time so that the consumer never runs out. Thus, if the consumer is running out, the problem is in one of the stages of that computation.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Jando

Quote from: jamespetts on June 19, 2017, 11:07:19 PM
... The fluctuation of transshipment times - do you mean that this changes over time for a single station, or varies between stations? If the former, can you upload a saved game in which this can reliably be reproduced? ...

Hi James, thanks for your fast answer! Yes, it changes over time for a single station, Download saved game from post #18 here in this thread please.

1. Load saved game. Check Carnburn Collieries' detail information, transshipment time is 18m42s.
2. Fast forward. After 20 minutes Simutrans-time transship time will change to 3h07m at that same station.

jamespetts

I have just pushed a fix to a different in-transit related problem that might possibly fix the part of the issue relating to the supply of goods: the in-transit amounts are now recalculated afresh when the game is loaded to prevent corrupted in-transit data from persisting. Can you re-test with a freshly loaded game to check whether this solves the problems? I should be most grateful.

I will look into the other issue relating to the fluctuation of the transshipment time when I have a moment.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Jando

Quote from: jamespetts on June 20, 2017, 12:07:29 AM
I have just pushed a fix to a different in-transit related problem that might possibly fix the part of the issue relating to the supply of goods: the in-transit amounts are now recalculated afresh when the game is loaded to prevent corrupted in-transit data from persisting. Can you re-test with a freshly loaded game to check whether this solves the problems? ...

Have let the game run for a Simutrans day after loading with new version. No change, mountains of coal in transfer, with trains waiting on all 4 platforms for a bit of coal. :)

Screenshot here: http://files.simutrans.com/index.php/s/JLeoyg67qjfcY65

jamespetts

The fluctuating transfer time was caused by a system that increases transfer times for overcrowded stops. However, there was an error in the mechanism for computing whether stops were overcrowded, which I have now fixed. Would you be able to test whether this fix makes things better? Running your saved game with the fix applied, there are no longer situations where the trains are all waiting at once for coal.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Jando

Quote from: jamespetts on June 20, 2017, 09:56:27 PM
The fluctuating transfer time was caused by a system that increases transfer times for overcrowded stops. However, there was an error in the mechanism for computing whether stops were overcrowded, which I have now fixed. Would you be able to test whether this fix makes things better? Running your saved game with the fix applied, there are no longer situations where the trains are all waiting at once for coal.

Hurrah! That is a completely changed dynamics now, and a much, much better one! Findings:

1. Transshipment time does no longer fluctuate.
2. Trains spend by far less time waiting for transfer at the station. Waiting for cargo is fine of course, waiting for transfer was the issue.
3. All power stations with good network connectivity in the region have continuous supply now, power stations with bad connectivity have not, exactly as it should be. 
4. That 4-platform station with the two collieries has immediately hit a new record in throughput on it's first full day of operation with the new patch.
5. Coal merchants and gasworks still have supply problems (even with good connectivity) but that is not because of transfer issues but a pakset issue. I will gather the data after a few more days of operation and make a post about it in the pakset forum in the next days. Not a software bug here but a balance issue (ratio of demanding coal vs. consuming coal is very different for gasworks, coal merchants and power stations).
6. Only minor annoyance still left is that cargo in transfer counts towards overcrowded status at the station.

Many thanks, good job!

jamespetts

Thank you for that - that is most helpful. Transferring goods need to contribute to the overcrowded status, as otherwise, there can be sudden fluctuations that are difficult to manage: this was a feature specifically added in response to problems of it not being present, discussed in another thread on this forum.

Do let me know more detail about issues with gasworks when you have them in a separate thread. Thank you for your report.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Jando

Thanks, James! I agree, only a minor annoyance, certainly not worth spending any development time for.