News:

Simutrans.com Portal
Our Simutrans site. You can find everything about Simutrans from here.

Industrial connections and station distances

Started by Sarlock, April 14, 2014, 02:40:40 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Sarlock

I'm not sure if this qualifies as a bug or not (if it is, I will repost and report more info for either as required), since I am unfamiliar with the details of this system, but I have noticed on many occasions that two connected industries do not always have a freight icon beside them to show this connection:



These two industries are clearly connected, given that the bakery has only one connection to a grain mill and yet the two do not show any icon for connections.  Most of the others do, but not those two, strangely enough...

I also notice that periodically the list is wiped clean, the industry stops producing, and then one by one it adds back the connections (or 30 game minutes or so) and continues to produce.  Sometimes it won't connect all of the industries the next time... and I haven't seen these two connected by icons yet.

EDIT 2 I discovered that the icon only appears when the source industry is actively producing for the secondary industry.  If they are connected but idle (due to oversupply, which is a whole different issue, with in transit and storage not working correctly, causing long idles in production-the industry needs to call for more in transit production to ensure it receives material when its stockpile is depleted) then the icon isn't displayed.






EDIT Station distance sometimes recalculates using a much higher number.



These two highlighted destinations are part of a cross-map freight line, Winterton is approximately halfway between Cogsand and Dashdon and should take roughly half the time (~30 hours) to travel between the two points.  I think this is impacting routing decisions as I am seeing some strange behavior; my freight is sometimes taking odd routes to get to its destination.  With an average line speed of 14 km/h, I should see time around 21 hours to Winterton and 40 hours to Dashdon.  There is only one stop in the middle at Winterton, so there would be a 2 hour loading at that stop.  These numbers are consistent over many months of calculations, usually 54-55 hours for Dashdon, 85-87 for Winterton.






EDIT 3 What factors go in to an industry computing how much In Transit goods should be in the queue?  I have the same bakery listed above that used up that queued production and ordered more from the grain mill.  It has now frozen at 510 In Transit and is waiting for that flour to travel across the entire map (a 60+ hour journey).  I would expect it to order at least 10 months x 120 production = 1200 flour but it has stopped at 510 and is sitting idle for months waiting for the flour to arrive (which it will then chew through in 4-5 months).
When freight transits through several hubs to get there, does it properly combine the transit times between all hubs to derive at a correct in transit amount?
EDIT 5
After several months of sitting at 510, waiting for the goods to arrive cross map, it suddenly jumped again, then sits idle.

The source grain mill has been producing off and on that entire time, for other bakeries, so it isn't a supply problem but an in transit calculation problem.  Might be related to the mismatched transit time calculations.






EDIT 4 An even more strange example:



It's wreaking havoc with all of my routings... now everything that should be going to Dashdon, which is my central hub for the western area, is routing way out of the way up to Queensington because it believes it's a much faster trip (4 hours to Queensington, 7 hours to Bigstable, then another 13 hours to Dashdon = 24 hours travel time... clearly the longer way!).  The line that is doing the Farrmouth-Dashdon route is averaging 13 km/h for the past several months.

Even stranger, the return journey from Dashdon to Farrmouth:








I have two days of travel ahead of me so it's unlike I will be online to be able to test this more, but that's what I have thusfar.
Current projects: Pak128 Trees, blender graphics

jamespetts

#1
Thank you for your rather detailed post; there are quite a number of issues identified here.

Firstly, I do not think that the title issue, if I may call it that, is a bug at all: the behaviour that you describe seems specific and purposeful and I have not changed this code from Standard, so it seems fair to assume that this is working as designed (although if anyone knows differently, do let me know).

The other issues appear to be more serious. I have not looked into them in more detail yet, but will do so presently. The strangest of them are the fluctuations in the recorded distance between stops, which should simply be an as the crow flies distance, so this fluctuation is rather odd. It may well be that the same ultimate bug is behind all of these issues (aside from the non-issue about the freight icons), but I will have to look into this in more detail.

Edit: I am having great trouble finding the locations of the troubles that you describe relating to the stops and timings: can you give more specific locations of these? I want to look into this before I look into the industry issues, as the maximum in transit percentage is based on route timings (the same ultimate end to end route timings as used for goods routing, so it is designed to take into account the full route), so errors in this calculation can lead to errors in the percentages.
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.

prissi

(About the goods symbol) In standard connections are not cached. Hence the dialoge has to check each time if there is a route to a connected industry. This can be a little time consuming with there are many suppliers all without a route, so it was skipped so far. Can be changed, as it is rather a low number of goods to be routed.

jamespetts

Prissi - thank you for that. Do you know off the top of your head where I can find this code to save me from having to hunt for it?
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.

prissi

It will be different in experimental, as you use a static routing table which only change monthwise anyway.

jamespetts

I meant the code for displaying the little freight icons - is there a particular keyword that I can look for using the search command for the relevant variable or function name, for instance?
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.

Sarlock

I'll get back to you within 24-48 hours.  I am unable to play the game on my laptop while travelling, it seems unable to handle the CPU load of the game.  I'll report current transit times once I am back to my regular system.

My main cross-ocean route is Dashdon-Winterton-Cogsand, you might get meaningful data just from looking at the calculated trip times for freight for those three stations, in the meantime.
Current projects: Pak128 Trees, blender graphics

prissi


jamespetts

Prissi - thank you: that is helpful.

Sarlock - thank you for letting me know. I should note that there is, as of yesterday, a known but as yet not understood problem on the server whereby all clients are experiencing serious performance degradation manifesting in frequent freezes and a very unresponsive experience. I am not sure what might be causing this, but your laptop's capabilities might well not be to blame after all.

In any event, do let me know when you have more information.
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.

Sarlock

With the save game you just recently posted, this is the best way to see the issue:

Go to Cogsand dockyards, @5845,1225.  View the Details and scroll down to the cargo section.  Take a look at the calculated travel time for Yendermouth, 94.63km, Winterton, 296.63km and Dashdon, 576.88km.

Winterton and Dashdon are on the same line, with Winterton about halfway through... and yet it has calculated travel time to be barely longer to Dashdon despite the much longer distance.  Yendermouth also has a strange routing time, considering how relatively close it is.  At 9km/h average speed (per line CID-YID-FvID) it should take 10 hours to travel that distance, not the 58.5 hours that the list indicates.

Hopefully this helps point you in the right direction.
Current projects: Pak128 Trees, blender graphics

Sarlock

You will no longer get that data from the current game, you will have to use the save game from when the server was reverted (Nov 1818 I think it was).

I made some major modifications to my lines last night.  I was finding that many of my industrial connections were no longer performing with 5-6 transfers between them.  When I removed 2 of the transfers and reduced it to 3-4 transfers, those industries started to produce again.  Is there a limit to how far down the transfer list a industrial connection search will look?  I'll try and do some testing in an offline game and see if I can consistently create this to demonstrate.
Current projects: Pak128 Trees, blender graphics

jamespetts

There should be no limit in principle, beyond the general transfers limit (which is much higher than 6), to the number of transfers over which goods can travel without interference with production or in transit calculations. If you can find any more specifics about this issue, I should be grateful if you could let me know.
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.

Sarlock

I've done some additional testing with regard to industrial transfers and it seems that in the online game, 6-7 transfers is the limit that I can generally get connections to occur.  They will sometimes connect beyond that, so it's not a hard rule, but often a connection will not be made once you reach 6-7+ connections between the industries, even if you wait a few months for the simulation to notice them.  I wonder if this is due to the sheer size of the map that the simulation does not have time to crawl down that deep to find the intricate transfers potentially possible that deep?

Further to the original issue, here is an example of calculated distances from my most western freight port in Farrmouth, @440,1517



The times are regularly changing, but they're rarely even close to accurate.  To get to Feathervale, even in a straight line (which it's not - it's likely over 1200km using the route it takes), in 17 hours over 811km requires an average speed of 47 km/h.  I'm fairly certain my 15 km/h ships cannot achieve this.  :)
Current projects: Pak128 Trees, blender graphics