News:

Simutrans Chat Room
Where cool people of Simutrans can meet up.

Cargo walking?

Started by Vladki, November 28, 2016, 11:00:41 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Vladki

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.

jamespetts

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.
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

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.

jamespetts

Quote from: Vladki 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.

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?
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

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

jamespetts

May I ask on which stations that it can be seen?
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

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.

jamespetts

Thank you very much for the report: I think that I have found and fixed this. Would you be able to re-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.

Vladki

#8
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

Junna

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?

Vladki


jamespetts

Quote from: Junna 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?

Yes - that was the integer overflow. That should be fixed now.
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

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.

jamespetts

Yes, indeed, this is intentional; fish do not helpfully walk into baskets waiting to be eaten; they have to be caught.
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.

DrSuperGood

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...

Vladki

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.

jamespetts

Quote from: Vladki 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.

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?
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

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"

jamespetts

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.
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

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

jamespetts

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.
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.

DrSuperGood

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.

Vladki

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.

jamespetts

I do plan to add a better GUI for this when I have time.
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.

wlindley

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.

jamespetts

Quote from: wlindley 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.

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).
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.