The International Simutrans Forum

 

Author Topic: Cargo walking?  (Read 3559 times)

0 Members and 1 Guest are viewing this topic.

Offline Vladki

  • Devotee
  • *
  • Posts: 3338
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Cargo walking?
« on: November 28, 2016, 11:00:41 PM »
Hi I have noticed that cargo is "walking" in the server game. In simutrans -standard often used to connect  nearby factories by big station, and they delivered cargo to each other using that station without any vehicles. However in experimental it did not work, but now I see it does, just as if it is delivered from one factory to another by hand carts or forklifts. But it seems to be trying to get much further than to nearby factories. The stations at producers are being filled with cargo for their consumers, even if there is no transport link established. So the question is how it it supposed to work, and how can we exploit/use this new feature?

For examples have a look at the server game at trnava car factory TAZ, the nearby factories are getting some steel and there is a lot of steel waiting for factories further away.

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 19824
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Cargo walking?
« Reply #1 on: November 29, 2016, 12:23:29 AM »
It is intentional that goods can be taken by hand-cart (or equivalent) from industries to stops or other industries: this feature was discussed at length some time ago. The idea is that goods can be carried in this way for the number of tiles/meters specified in simuconf.tab as the station coverage radius for goods.

Offline Vladki

  • Devotee
  • *
  • Posts: 3338
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Re: Cargo walking?
« Reply #2 on: November 29, 2016, 09:11:39 PM »
Then I think there is some bug, as I can see cargo waiting on stops, that are much further from their destinations than coverage area. Even further than passenger/mail coverage area.

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 19824
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Cargo walking?
« Reply #3 on: November 29, 2016, 09:21:25 PM »
Then I think there is some bug, as I can see cargo waiting on stops, that are much further from their destinations than coverage area. Even further than passenger/mail coverage area.

Can you upload a saved game in which this can reliably be reproduced? Also, is it possible that the goods are being walked between sets of stations with overlapping coverage areas?

Offline Vladki

  • Devotee
  • *
  • Posts: 3338
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Re: Cargo walking?
« Reply #4 on: November 29, 2016, 09:41:10 PM »
It can be seen on the experimental  server game. And they are so far that even the source and destination station coverage areas are not overlapping

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 19824
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Cargo walking?
« Reply #5 on: November 29, 2016, 10:42:19 PM »
May I ask on which stations that it can be seen?

Offline Vladki

  • Devotee
  • *
  • Posts: 3338
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Re: Cargo walking?
« Reply #6 on: November 29, 2016, 10:49:36 PM »
There are many examples: e.g. Trnava Car factory TAZ - there is steel waiting to be delivered to brewery Trnavan on the other side of city.

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 19824
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Cargo walking?
« Reply #7 on: December 03, 2016, 09:19:30 AM »
Thank you very much for the report: I think that I have found and fixed this. Would you be able to re-test?

Offline Vladki

  • Devotee
  • *
  • Posts: 3338
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Re: Cargo walking?
« Reply #8 on: December 03, 2016, 12:39:52 PM »
It seems to be back at the original behavior, no cargo walking at all.  I'll test a little bit more and update the server soon. At the TAZ factory in the server game, there are two steel consumers (car factory and hardware factory), in walking distance, but they received only 10 t of steel each and no more...

Oh wow, now I get segfault when I connect to the server... But the server is happily running
« Last Edit: December 03, 2016, 01:22:12 PM by Vladki »

Offline Junna

  • Devotee
  • *
  • Posts: 1087
Re: Cargo walking?
« Reply #9 on: December 03, 2016, 09:18:57 PM »
I ended up with a lot of goods at all stations with destination "unknown" when I updated the exe for my main save game. Is this related?

Offline Vladki

  • Devotee
  • *
  • Posts: 3338
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Re: Cargo walking?
« Reply #10 on: December 03, 2016, 09:49:37 PM »
Yes that's it

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 19824
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Cargo walking?
« Reply #11 on: December 03, 2016, 10:23:01 PM »
I ended up with a lot of goods at all stations with destination "unknown" when I updated the exe for my main save game. Is this related?

Yes - that was the integer overflow. That should be fixed now.

Offline Vladki

  • Devotee
  • *
  • Posts: 3338
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Re: Cargo walking?
« Reply #12 on: December 04, 2016, 10:12:10 PM »
Now it seems to work correctly. I have made two examples on the testing server game - brewery sessler with adjacent pub, and a butcher next to slaughter house. Unfortunately the fishery next to fishing port does not work, but according to commit message this is intentional.

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 19824
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Cargo walking?
« Reply #13 on: December 04, 2016, 10:41:33 PM »
Yes, indeed, this is intentional; fish do not helpfully walk into baskets waiting to be eaten; they have to be caught.

Offline DrSuperGood

  • Dev Team
  • Devotee
  • *
  • Posts: 2827
  • Languages: EN
Re: Cargo walking?
« Reply #14 on: December 05, 2016, 05:04:48 AM »
Quote
Yes, indeed, this is intentional; fish do not helpfully walk into baskets waiting to be eaten; they have to be caught.
One could argue that the fishing port is close enough to the fish that they can be caught from the land or coast without a boat. However I guess if it was enabled you would get the stupid situation of fish going between nearby fisheries to be caught...

Offline Vladki

  • Devotee
  • *
  • Posts: 3338
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Re: Cargo walking?
« Reply #15 on: December 05, 2016, 09:18:46 PM »
Now I see something weird happening - at one moment I have hundreds of cargo units waiting on stop (highly overcrowded), and in a few minutes it is empty. And the stop is served by single truck, that could not have emptied the stop that fast. I tried to enable "just in time" which was disabled on the testing server, but it does not seem to have any effect.

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 19824
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Cargo walking?
« Reply #16 on: December 05, 2016, 09:52:24 PM »
Now I see something weird happening - at one moment I have hundreds of cargo units waiting on stop (highly overcrowded), and in a few minutes it is empty. And the stop is served by single truck, that could not have emptied the stop that fast. I tried to enable "just in time" which was disabled on the testing server, but it does not seem to have any effect.

Is this in Standard or Experimental? If the latter, please note that "just in time" is not implemented in Experimental, and, if you consider the behaviour that you describe to be a bug, can you post a saved game and/or steps to reproduce?

Offline Vladki

  • Devotee
  • *
  • Posts: 3338
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Re: Cargo walking?
« Reply #17 on: December 06, 2016, 08:46:18 PM »
This is in experimental. James, what do you mean by that "just in time" is not implemented in Experimental? I can clearly see a difference in the game behavior if I turn "just in time" on or off. I understand that JIT in experimental may be totally different from JIT/JIT2 in standard, but it makes a difference. With JIT off I was able to deliver goods to factories forever, and even when their inputs overflowed at 15000 units - extra deliveries were discarded, but the source was still producing.

As to the random cargo dis/appearance - just now I witnessed cargo appearing on transfer station without any truck/train arriving. Just seen the waiting bar rise... I'll try to find out when it happens, but now it was just "out of nothing"

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 19824
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Cargo walking?
« Reply #18 on: December 06, 2016, 10:06:49 PM »
I was referring to Dr. Supergood's new system - it may be that I have confused the nomenclature and that his new system is "JIT2", whereas "JIT" is an older and more basic setting from Standard that is incorporated into Experimental from there.

As to appearing "just out of nothing", this will be because it has arrived at the station some time ago and has been transferring in the meantime. I will have to implement the GUI suggested by Dr. Supergood above when I get a chance so as to make this clearer.

Offline Vladki

  • Devotee
  • *
  • Posts: 3338
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Re: Cargo walking?
« Reply #19 on: December 06, 2016, 10:21:33 PM »
What GUI ? It is not in this thread.

But I would have a suggestion:
- do not make any "invisible" cargo. It should be either on vehicle or on the station, or in the factory. So when a vehicle unloads, cargo should appear on the station, and then it can slowly transfer to the factory, but it should not just disappear. Now I noticed that it disappears also if it is transferring - one train unloads - cargo disappears, and then after a while appears on another train. Thats just weird. If you do not want it to transfer instantly between vehicles, it should be on the station for a while.
- even nicer would be gradual loading/unloading (similar to OpenTTD) - cargo will (un)load from/on vehicle gradually (piece by piece), so the (un)loading time is more enjoyable. Each piece should appear on the station, at the same moment when it disappears from the vehicle. However I understand that this may be quite a challenge so this is only a wishlist prioity.
- at source industry, cargo should be in the accounted in the output buffer until it appears on the station. Or just make a extra counters - hand carried cargo in/out

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 19824
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Cargo walking?
« Reply #20 on: December 07, 2016, 12:00:08 AM »
Ahh, apologies; it must have been another thread. The idea is to have a separate list of transferring cargo below the list of waiting cargo; this would be a list of cargo transferring into a station that is not ready to board transport there yet.

Offline DrSuperGood

  • Dev Team
  • Devotee
  • *
  • Posts: 2827
  • Languages: EN
Re: Cargo walking?
« Reply #21 on: December 07, 2016, 02:45:12 AM »
Experimental automatically has a better than JIT2 cargo system. Since it has access to transit times it can calculate a sensible maximum in existence amount appropriate for a stop. Standard does not have this so has to use other approaches to achieve similar results.

Due to popular resistance about changing the standard cargo distribution model in standard JIT2 was added as a parallel model, leaving JIT0 and 1 apparently untouched (mechanically it was changed but results are as good as before). In standard JIT 0 means no cargo metering. JIT1 uses maximum input for flow control but this has huge problems with regard to traffic management. JIT2 uses a more continuous and "Just-in-time" like approach to flow control, ordering replacements as inputs are used but has its own problems. I eventually plan to revise JIT2 further fixing some glaring issues which were identified ~1 year ago during tests however this is on hold currently due to technical difficulties I have with the SVN server.

Experimental uses the an enhanced version of the maximum in transit limit of standard's JIT1 model for flow control, which one should aptly name maximum in existence. In this version the maximum in existence factors in both in-transit amounts as well as current input storage amounts when restricting good ordering. The maximum in existence limit is computed using in-transit times and consumption rates and has some tolerances. As far as I am aware input storage maximum does not really have an effect in experimental, outside of maybe an additional offset to maximum in existence.

Offline Vladki

  • Devotee
  • *
  • Posts: 3338
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Re: Cargo walking?
« Reply #22 on: January 08, 2017, 07:21:20 PM »
I must say that the current behavior of cargo in experimental is very confusing.

As an example: I have a refinery, and I have already delivered quite some load of crude oil, and it has produced all products, and keeps them in the internal storage. Then I set up a line to deliver e.g. petrol to a petrol station, the truck is waiting for 100% load but nothing happens. There's no cargo appearing on the stop, neither loaded on the truck. At first sight - something has gone wrong - double check of the usual stuff - do I really have the the oil truck waiting, are both stops connected, cargo enabled, roads connected, weight limits, factories have contract... everything is OK and still no cargo... and after a while, POP! and the loading bay is full of petrol.

Maybe it has disappeared from the internal storage of refinery, and was accounted on petrol station as "in transit", but that is not easy to notice. I would be in favor of more gradual delivery, and especially if the stop is right next to the factory, the transfer from factory to stop should be immediate.

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 19824
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Cargo walking?
« Reply #23 on: January 08, 2017, 11:13:02 PM »
I do plan to add a better GUI for this when I have time.

Offline wlindley

  • Devotee
  • *
  • Posts: 1022
    • Hacking for fun and profit since 1977
  • Languages: EN, DE
Re: Cargo walking?
« Reply #24 on: January 09, 2017, 03:01:33 PM »
Has this changed the behavio(u)r of cargo transfer?  Formerly, a ship carrying cargo "via port X" would drop off cargo at X, and that cargo would immediately appear in the list of goods waiting at X.  Now, the goods seem to simply vanish, making all my save games' economies go down in flames.

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 19824
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Cargo walking?
« Reply #25 on: January 09, 2017, 03:05:23 PM »
Has this changed the behavio(u)r of cargo transfer?  Formerly, a ship carrying cargo "via port X" would drop off cargo at X, and that cargo would immediately appear in the list of goods waiting at X.  Now, the goods seem to simply vanish, making all my save games' economies go down in flames.

The behaviour has indeed changed: the goods take time to move through the port to be ready either for transfer or to appear in the internal storage of the receiving industries. This is intended to simulate the time that it takes goods actually to be transshipped at ports, railway stations, etc.. They do not disappear: they just take time to become available (although their status is not currently shown).