Latest Posts

Topic: Minimum amount of goods in a port

Felix_Atagong
Avatar
Topic Opener
Joined: 2010-04-17, 12:56
Posts: 42
Ranking
Pry about Widelands
Location: Louvain, Belgium
Posted at: 2014-09-16, 11:36

I like the idea of ports and try to use them as much as possible, because I think they are fun. One problem however, is the transport between ports and the 'way' boats seem to handle goods.

I think everybody has been in a situation where only one brick is needed to finish a building, and all surrounding ports seem to have enough bricks, but the AI insists on sending an empty ship from Amsterdam to Hong Kong to pick up the brick and transport it to London, while the Antwerp port is literally choking on stone. face-smile.png

One solution could be to fill ports with a minimum amount of goods and to try to maintain that minimum: for instance minimum 50 stones, 10 marble, 30 wood, 3 gold, etc... (to be individually adjusted per port and per 'goods').

So if you start building on an island, the goods needed would be taken from the stock in the nearest port... and then the AI can bring the stock back to normal. A side effect is that there is a difference in approach between warehouses and ports that way as well.

(Sorry if this idea has been put here before, couldn't find it.)


Top Quote
wl-zocker

Joined: 2011-12-30, 16:37
Posts: 495
Ranking
Tribe Member
Location: Germany
Posted at: 2014-09-16, 12:39

Actually, the whole transporting system is a bit inefficient. This has only become easier to see with the ships.

I think that such a feature would be very useful. I see not reason why it should be restricted to ports - warehouses and headquarters could also benefit from that. I have found a discussion here: https://wl.widelands.org/forum/topic/384/. I have not read through the whole thread, but the idea seems to be the same. I am also quite sure that I have read about a similar problem with ports, but I cannot find it.

And please avoid to call that thing AI. AI is the computerplayer you can play against, and it can only do the same things as you. The requests are handled by the economy code.

Edited: 2014-09-16, 12:41

"Only few people know how much one has to know in order to know how little one knows." - Werner Heisenberg

Top Quote
DragonAtma
Avatar
Joined: 2014-09-14, 00:54
Posts: 351
Ranking
Tribe Member
Posted at: 2014-09-17, 02:11

I've thought about the idea of having warehouses distribute goods if there's a shortage somewhere, but that runs the risk of clogging the roads, especially on a map with narrow chokepoints (such as Sun of Fire).

It also feels a bit odd that although advanced roads have both a worker and a donkey/horse/ox, the flags next to them can only hold the same 8 items that flags by normal roads can hold. Maybe that should be raised to 12 when they're next to a major road?


Top Quote
wl-zocker

Joined: 2011-12-30, 16:37
Posts: 495
Ranking
Tribe Member
Location: Germany
Posted at: 2014-09-17, 09:30

I do not think that road get clogged when the minimum storage feature is used correctly, but it increases the productivity. I once had the following situation (playing the Atlanteans):

My fishers were far away from my smokeries (the smokeries were next to the woodcutters). The fish were stored in a warehouse next to the fishers' houses. A smokery can only hold eight fish, and when they all were consumed, no new fish had arrived yet (because of the long way), making the smokeries work very inefficiently. I built a warehouse next to the smokeries and asked to store all the fish there. This caused problems, because the fish were too many for my road network. I therefore had to stop some fishers. Now my smokeries worked at 100%, but I could not build any more because all the fish was going to the warehouse that could not get more fish without causing congestion.
The solution that would be possible with the proposed feature is to set the minimum storage of fish in the warehouse next to the smokeries to 50. When a smokery has consumed some fish, new fish from this warehouse arrives, fulfilling the request in time so that the productivity does not drop. The warehouse now orders new fish from the other warehouse/directly from the fishers, which does not cause more traffic than necessary (in fact, the only additional traffic caused is 50 fish (nonrecurring) to fill up the warehouse's initial storage). Additional fish is stored in the warehouse next to the fishers' houses.
I can even build a warehouse and smokeries somewhere else and set the minimum storage of fish to 50 there, too. When the fish take a different route, no roads will be congested. This setup is not possible with the current possibilities (do not store here/store preferredly here).

I do not see why increasing a flag's capacity should help. I can imagine three cases:

  • relatively low traffic: Wares do never/rarely have to wait at the flags. Eight wares never accumulate anywhere, so whether the capacity is eight or twelve does not matter.
  • sometimes much traffic: It can happen that there are eight wares at a flag, but since new wares come slower than the old wares are transported, the flag gets empty after some time. If the capacity is increased to twelve, the flag can hold more wares, but the evacuation would not go faster.
  • permanent problem: When the wares from two roads have to be transported over one road, or the next road is three segments long (while the previous ones were only two segments long), the wares accumulate. If you do nothing, this problem will not resolve itself. If a flag can hold twelve wares, it takes a bit longer until it is full, but the underlying problem is not solved.

"Only few people know how much one has to know in order to know how little one knows." - Werner Heisenberg

Top Quote
Ex-Member
Avatar
Joined: 2014-09-12, 09:53
Posts: 184
Ranking
Widelands-Forum-Junkie
Posted at: 2014-09-17, 09:53

I had seriour problems yesterday with wares being in the wrong place.

I was working on a long narrow map, the supply route was in places very constricted and busy as iron ore was at one end and coal at the other. I managed to squeze a warehouse in the centre at one at the east and west ends to minimise transport of raw goods I had also set up food and beer supplies at each end.

I knew the coal supply would soon run out in the West so set up several lumberjacks abd charcoal burners in the east, near the iron mines and built smelters and axe workshops nearby, all so that goods would be stored localally and only finished goods would need to be transported.

Some time later I noticed that iron production had stopped due to shortage of coal, the coal mine had finally run out as expected, the charcoal burners were not working though due to lack of timber, despite the being next to lumberjacks who where operating at 100%, a check of total wares showed I had over 600 timber, further searching found over 500 in the west warehouse the others had none. Most of the timber harvested in the east was being transported to the furtherest warehouse in the west. I issed a command to remove timber from the west warehouse but after an hour there was still a stock of over 300 timber there, the first supplies were just getting to the charcoal burners and timber was still arriving at the west warehouse.

I think it would be somewhat better is warehouses tried to distribute goods evenly between themselves, over ridden as required by the do not store this ware here button. I am not sure if increasing the falg stockpile from 8 to 12 would help much where there are 2 carriers on each side of the flag, the input/output rates should be similar with the same distance and slopes, the problem comes where a link has only one carrier or where two routes converge and all it would do is leave more stuff lying on the roadside instead of being safely in a building. I cannot coment on the working of ports as I cannot get them to do anything. I have a port, I have started an expedition and built a ship next to the port but nothing happens.


Top Quote
DragonAtma
Avatar
Joined: 2014-09-14, 00:54
Posts: 351
Ranking
Tribe Member
Posted at: 2014-09-17, 10:51

Keep in mind that some maps use natural bridges (that is, thin areas of stone) over an otherwise-uncrossable river. If you have an established economy on both sides of it, the area can get jammed; right now, in a Riverlands AI-only game (Purple + Orange vs Blue + Red), Purple's got a pretty much permanent jam on the bridge between their starting area and what would be black's starting area, while blue used to have a jam on the bridge between what would be green's area and yellow's area. Blue probably still wpould, except purple completely conquered them.

Maybe raising the maximum from 8 to 12 won't help. But I doubt it'd hurt (especially if there's an H-shaped intersection, which bridges would cause), especially since the AI often is not smart enough to put two roads on the same natural bridge.

..,.It also just feels *weird* that although the road carries twice as many goods, it can only hold the same number at each flag.

Edited: 2014-09-17, 10:53

Top Quote
wl-zocker

Joined: 2011-12-30, 16:37
Posts: 495
Ranking
Tribe Member
Location: Germany
Posted at: 2014-09-17, 11:07

Most of the timber harvested in the east was being transported to the furtherest warehouse in the west.

This sounds strange. When the warehouses have no priority, I observed that the wares are transported to the nearest warehouse. If you have a replay and you are sure that this is the case, could you please file a bug report (the bug tracker is https://launchpad.net/widelands). It sounds like something is going wrong, and sending the wares to the nearest warehouse should not be too hard.

I issed a command to remove timber from the west warehouse but after an hour there was still a stock of over 300 timber there, the first supplies were just getting to the charcoal burners and timber was still arriving at the west warehouse.

Did you set "Do not store" (the red cross) or "Remove wares" (the red arrow). In both cases, no new logs should arrive. In the latter case, the logs should be carried out of the warehouse. Note that this might take some time because they have to be transported away. You could also try to give your eastern warehouse a priority ("Store here", the green arrow) for logs.

I think it would be somewhat better is warehouses tried to distribute goods evenly between themselves

I do not think so. Imagine I build mills, wells and bakeries next to each other for short ways, and a warehouse to store superfluous wares. If I produce too much flour, it will be distributed all over the map, causing traffic. When I decide to build more bakeries, it will be transported back, again causing traffic. To avoid this, I would have to avoid storage of ALL wares (except the ones I need) in ALL warehouses I will ever build, which is definitely too much micro-management.
Instead, with the minimum storage feature, you can control where your wares go, and not where they shall not go (i.e. you need less clicks). I you do not care where the produced wares are, they will go to the closest warehouse, and not be transported over the whole map.

I have found a bug report https://bugs.launchpad.net/widelands/+bug/1153684, but it has not been discussed further. I also did not find similar bug reports or blueprints. When someone has a good idea for the UI (more buttons will be needed), it would be nice to revive that report.

I cannot coment on the working of ports as I cannot get them to do anything. I have a port, I have started an expedition and built a ship next to the port but nothing happens.

You need two ports and at least one ship to transport wares between them. The ships work like carriers on a road: When wares need to be transported from one port to another, they will do this, otherwise, they will do nothing. The first port has to be constructed like a normal building, the other ports can also be constructed via an expedition: Your expedition ship sails somewhere (you can control it) and when it find a suitable place, you can decide to build a port there.
Would you please tell me which of these steps was not clear to you? I am working on a tutorial to explain seafaring and would like to see what has to be included.


"Only few people know how much one has to know in order to know how little one knows." - Werner Heisenberg

Top Quote
Ex-Member
Avatar
Joined: 2014-09-12, 09:53
Posts: 184
Ranking
Widelands-Forum-Junkie
Posted at: 2014-09-17, 13:10

I will see if I have a save or try to recreate the situation so I can file a bug report if it happened as as thouht it did.

I used the remove wares button to move the logs, I did not think to use the store here for the other warehouses, in fact in this case an equal(ish) distribution would have suited me. Removal started immediately but stopped almost as soon due to congestion of the main road, it did take, as I said, about an hour for the first logs to get across the map. As I understand it the destination of a product is first set at the time of production so perhaps the logs still arriving at the west end had also been travelling for an hour? Or can the destination of wares be changed on route as can happen with soldiers?

I see your point about distribution of wares, it brings up another idea, perhaps wares should be sorted to warehouses that are near buildings that use them, in your example suplus flour would usually be stored in the warehoue(s) near bakeries, as it may be now, and only general wares like building materials would need to be evened out. I will think further on this.

I will look through the bug report, and think about the UI as well, an initial thought is perhaps an 'advanced' button that displays more tools, beginners are not inundated with choices and advanced users can chose to take more control, but first I will see what suggestions I can find for the UI.

With seafaring, I assumed I would need to build two ports to transport goods between them and I hoped that an expedition would allow me to sail to a place I could not reach by land and build a port there, it seems both ideas were correct. I found a place to build a shipyard and next to it a port, the shipyard finished and built a boat and at the port I started an expedition which assembled a number of building materials, but nothing else happens, the ship is still at the shipyard and I cannot move it to the port let alone start exploring. Currently I am building another port to see if I can set up goods transport.


Top Quote
wl-zocker

Joined: 2011-12-30, 16:37
Posts: 495
Ranking
Tribe Member
Location: Germany
Posted at: 2014-09-17, 14:49

As I understand it the destination of a product is first set at the time of production so perhaps the logs still arriving at the west end had also been travelling for an hour?

This is possible.

Or can the destination of wares be changed on route as can happen with soldiers?

When a ware is transported to a warehouse because it is not needed elsewhere and then a building suddenly requests it, I think the destination changes. Else, you can destroy all the roads between the log and their destination. Since there is no way, the look for a new destination, e.g. the warehouse with preference for logs.

Expedition: In the port, there should be a new (fifth?) tab giving you an overview about the materials. Present ones are colored, needed ones are grey. A builder (not listed) is also needed. When everything is ready, a ship drives to the port and sends you a message that you can start exploring now. Maybe you lack gold?

Warehouses that autocollect wares needed by the surrounding buildings: Since Widelands focuses on managing you economy, I doubt that this will be implemented. It takes away freedom from the player making gameplay too easy and too boring.

Advanced button: Ideally, everything in Widelands is so simple that beginners do not get confused by it. And having two options means more code to test and more bugs to occur.


"Only few people know how much one has to know in order to know how little one knows." - Werner Heisenberg

Top Quote
Ex-Member
Avatar
Joined: 2014-09-12, 09:53
Posts: 184
Ranking
Widelands-Forum-Junkie
Posted at: 2014-09-17, 16:50

OK I got ships working, thanks for the tips, the problem with the expedition was blackwood, with my eyes I cannot tell the difference of some wares being present or not. With patience they got their act together and I could sail them to a place suitable for a new port. In the meantime the third port was completed, the system automagically knew it was part of the transport system and started shuffling goods around, though mainly one or two items a trip as I was not building any great buildings. Off to look for some good seafaring maps.


Top Quote