The International Simutrans Forum

 

Author Topic: Cargo network connection issue  (Read 276 times)

0 Members and 1 Guest are viewing this topic.

Offline Ranran

  • *
  • Posts: 865
  • Languages: ja
Cargo network connection issue
« on: May 23, 2020, 03:29:19 AM »
I am trying freight shipping on the server. It sometimes looks unnatural. I think there is a case where the connection judgment suddenly disappears.

This is my network of current Bridgewater-Brunel servers.



bakery used to be connected, but for somehow it is no longer connected. There is no change in the route.
Also, the grain farm and the wind mill appear to be connected, but they are actually refusing to ship.
As you can see from the chart, there is a room in storage. Grain farm does not transfer even though the dock is empty.
It's possible that I made some mistake, but once it was being shipped.  ???

EDIT: add the attachment image.
Especially in transit chart of the windmill looks weird.

Offline Ranran

  • *
  • Posts: 865
  • Languages: ja
Re: Cargo network connection issue
« Reply #1 on: May 23, 2020, 10:39:44 AM »
It looks like the in-transit of the tertiary industry via the secondary industry is broken. Probably after the transfer was broken?
Looks like you are not allowed to ship more than one.
You can also check it at the Clothes shop (7552, 2360) in bridgewater-brunel server. The connected Textile mills produce very little, despite having sufficient staff and stock.


EDIT:
You can see this kind of display at stations that refuse shipping.
« Last Edit: May 23, 2020, 12:10:01 PM by Ranran »

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 19684
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Cargo network connection issue
« Reply #2 on: May 23, 2020, 06:52:49 PM »
Thank you for the report. I am unable to reproduce this in a simple newly created game with a single grain farm > grain mill > bakery industry chain created just for the purposes of testing. Is this problem universal to all tertiary industries, or does it occur only in some locations?

Offline Ranran

  • *
  • Posts: 865
  • Languages: ja
Re: Cargo network connection issue
« Reply #3 on: May 24, 2020, 03:35:49 AM »
I am unable to reproduce this in a simple newly created game with a single grain farm > grain mill > bakery industry chain created just for the purposes of testing.
I was able to reproduce this with a small new map. The only time it appears to be working is right after connecting. It will break shortly thereafter.

I have prepared two saved games. Please observe these for a while.
https://drive.google.com/open?id=1K6_Y1gphO2tQZp95L8UP1peuFAn2Sddc
https://drive.google.com/open?id=1DEd6l71PtPiXTspiLRfm8dMpk1y4Hoov

At first it seems to be working fine.


However, once the windmill storage is full, the warehouse will never be full again.  ???
Grain becomes flour and is delivered to the bakery. You can see that the bakery also consumes it properly.
The stock of windmills was gradually decreasing, but the farm seems to have stopped shipping.  ???

As a result of the boycott of the farm, the windmill grain was almost exhausted.
It's also possible that windmill refused to receive. I don't know which is worse.
It seems that the grain transportation has been resumed because the stock has run out.  :D
However, transportation became very reluctant, as the relationship between the two became very bad.  ::-\
One of the two farms has been completely terminated.


The windmill seems to want to keep 1 in stock and 1 in transit...



I changed the carriage to 3 tons bulk and set it to standby until 100%.

It kept waiting on the farm forever. And the windmill is finally out of stock. Citizens will no longer be able to buy bread.  ::'(
The farm does not allow more than one in transit. The cause of this confusion was the Farm Coalition!  :police:


Bakery is always having trouble keeping bread in inventory because of these conflicts. It is difficult for citizens to get bread. Please help them. The ranran shipping company is also a victim. (´・ω・`)

Offline Dutchman on Rails

  • *
  • Posts: 251
Re: Cargo network connection issue
« Reply #4 on: May 24, 2020, 09:32:22 AM »
I sometimes see industries supplying limited amounts of goods or not shipping in my early games as well. These are generally the industries that are the furthest away. In my experimental game, one cattlefarm does supply milk to the industries in Chafferham, but not Livestock to the slaughterhouse in the same town.
I think there may be a maximum journey time for goods as there is for passengers, beyond which the goods simply won't ship. Which would be perfectly reasonable if a bit bewildering at first. This can also stop shipping. In the 1750s/1800s journey time can increase drastically by having a slower horse or cart keeping up everyone (I don't see any overtaking on 'two-lane roads' anymore). If my assumption is correct, a decrease in journey time could cause the journey times to fall off. Note that the journey time includes waiting and transfer times.

At one point I could restore a transport route in this way. I had replaced a pack horse route with a transfer to a passing ship, and this collapsed the route, probably due to the transfer times. Reinstating the old route brought the goods back.
Finally, I see the same behavior of an initial transport route working, but then dropping off. I assume initially the system doesn't have the data to calculate the actual journey times and may make an optimistic guess.

Offline Ranran

  • *
  • Posts: 865
  • Languages: ja
Re: Cargo network connection issue
« Reply #5 on: May 24, 2020, 09:59:08 AM »
Please note that that is a small map made for experimentation.
Their transportation distances are short and they are carried directly without transship.
You can also see this issue in many places on my network at bridgewater-brunel server.
« Last Edit: May 24, 2020, 10:17:12 AM by Ranran »

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 19684
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Cargo network connection issue
« Reply #6 on: May 24, 2020, 10:59:37 AM »
There is not a maximum journey time for goods; this looks like a potentially very complex issue that will need considerable work to deal with, but is also potentially important to fix.

Offline Ranran

  • *
  • Posts: 865
  • Languages: ja
Re: Cargo network connection issue
« Reply #7 on: May 24, 2020, 07:05:51 PM »
I may have found a clue to a solution. (´・ω・`)


This is the status of the brand new windmill. Notice the red underlined part.

From the left, this shows the current holdings, in transit, max in transit , and storage capacity.

I was confused by these weird notation of numbers, but the numbers clearly showed anomalies. Yes, we were missing what it was telling us.
Compare the bracketed numbers in yellow with the ones shown in previous posts.

It seems that this is rewritten to an abnormal value for some reason. And the game behaves exactly as that number.

Offline Ranran

  • *
  • Posts: 865
  • Languages: ja
Re: Cargo network connection issue
« Reply #8 on: May 25, 2020, 01:50:05 PM »
I continued to look for the cause of this bug.
I tried to find out when and how the maximum amount of transportation shown above changes.

staff_shortage does not seem to be directly related.
It doesn't seem to change when factory is not working.
setting just_in_time also doesn't seem to matter (maybe this is another bug)

It will suddenly change to 0 after the factory is up and running. In the case of windmill / bakery it will definitely happen soon. And I tried a lot, but it never returned.

Immediately after the factory is up and running (as soon as you see the brown pile), reloading the save will set it to 0 without waiting for time.
So it turns out that one of the files I submitted yesterday was intended to be the one before the world was locked down, but it was locked down by the loading it.
I prepared two new saved games before the suspension order was issued. By loading this and then starting the convoy from the depot, you can see how the shipping stop command is received.
https://drive.google.com/open?id=15tvZ1XQZ4yaqRXyHzGAVnFDqp-lJGTD2
https://drive.google.com/open?id=12OS07mT8NZ0dk65ZaZ97PCpUmQpRx7ZY

Checked another building-a 1880 Grain mill and bakery but again had a similar bug.
It turns out that it is more accurate to say that this is not a zero, but an extreme reduction.


I found that this anomaly would occur even when the moon changed. In the demo save, this symptom is not seen, so the exact condition has some inaccuracies.

Anyway, when this recalculation process occurs, it definitely breaks, so I think that the max transit calculation process has a bug.
This process should not be necessary if just_in_time = 0, but even in that case, the factory will be suspended due to the shipping limit order due to the destruction of max transit.

I went backwards from the display and found that it is fabrik_t::calc_max_intransit_percentages() that is calculating it.

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 19684
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Cargo network connection issue
« Reply #9 on: May 25, 2020, 04:02:10 PM »
I am afraid that I am having some trouble reproducing any error here. I am looking at the grain farm/windmill/bakery chain on the fct-connection-3.sve file. The result that I get after running on my debug build for a number of months without saving/loading is this:



Is this different to the result that you get?

Note that the in transit number is intended to be dynamic: secondary and tertiary industry demand is regulated to match actual consumption and take into account actual travel lead times so that the industries be neither overstocked nor understocked. Note that, in this saved game, the pack horses from the windmill to the bakery will not be loaded because they are both served by the same stop, so the flour will simply be hand-carted to the bakery.