Latest Posts

Topic: Solution proposals for maritime shipping problems

Solstice_s_Return
Avatar
Topic Opener
Joined: 2020-01-28, 12:24
Posts: 62
Ranking
Likes to be here
Location: Finland
Posted at: 2020-02-01, 13:27

Nordfriese wrote:

So those limits would work like this:

  • When a newly produced brick is intended to be stored at a warehouse:

  • If there are warehouses with less bricks than their individual target, send the brick to the closest of those

  • Otherwise, send the brick to the closest warehouse

Did I understand correctly?

This would have the side effect that if there is 1 warehouse with less bricks than its target, a brick might be brought from the other end of the map just to be stored there.

That would of course lead to a heavier road traffic and May cause problems. But as the wares are allowed to change their direction when production site or building site sets a demand, this problem is somewhat alleviated in most cases.

Propably it can't be that simple. It may also require checking of road traffic on route to an ideal storage building and if it is too high, then select the closest storage building instead.


Top Quote
hessenfarmer
Avatar
Joined: 2014-12-11, 22:16
Posts: 2648
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2020-02-01, 13:49

Nordfriese wrote:

This would have the side effect that if there is 1 warehouse with less bricks than its target, a brick might be brought from the other end of the map just to be stored there.

I believe that is exactly what is intended by this change because all other warehouses would have enough of them stored.

IMHO this rather speaks against this suggestion, because then it might clog up the road network. So how about instead:

  • Newly produced wares are brought to a close by warehouse

  • Warehouses with more wares than their target frequently send wares to understocked warehouses (preferreably close-by destinations) whenever there is low traffic on the route between them so it won´t affect the economy too much.

Basically this is what I wanted to achieve by reducing all other warehousses target while raising it in one of them.


Top Quote
JanO
Avatar
Joined: 2015-08-02, 10:56
Posts: 177
Ranking
At home in WL-forums
Posted at: 2020-02-01, 13:51

Nordfriese wrote:

This would have the side effect that if there is 1 warehouse with less bricks than its target, a brick might be brought from the other end of the map just to be stored there.

I guess this also is what happens quite now, if you set your new, empty warehouse to preferred (to get some building material to a now colony for example).
So basically we have the two ideas of filling new warehouses (or the ones with high unfulfilled demand) preferredly versus fill closest warehouses first?

Edited: 2020-02-01, 13:54

Top Quote
Yo...
Avatar
Joined: 2019-10-28, 13:47
Posts: 26
OS: Win 10
Version: 1.0 + 1.2
Ranking
Pry about Widelands
Location: MiddleEurope
Posted at: 2020-02-02, 01:27

Hi everybody,

I want to "go back" a bit to the initial first problem of the shipping system. I think too the maritime shipping needs some "improvements".
I tested it the last 1-2 weeks with build "master-5982". I'm not sure if the routing in this version is up to date. Maybe it works better than in b19 or b20, but in my opinion not "pretty fine". There are often ships on their way to an far away port (ship needs about 3 minutes, and the same time for the way back) with wares/workers for a port in the opposite direction, while another ship on the starting port of the first ship is idle instead of take the wares in the opposite direction (would need less than 20 seconds).

For me, Tibor's suggestion (Never embark goods for more than one port) would work better (combined with Solstice's home port). But maybe not in all cases. I'm sure there are circumstances in which the shipping works better if a ship embarks goods for 2 or more ports, but maybe not in all areas of a certain map. And on huge maps it can be frustrating if idle ships move back a long way to the home port, and move back if needed where they "ideled" a few minutes ago.
So I came up with an idea to (hopefully) solve this problems. It's a bit more complex but I think not very much. By the way: with this, every player can decide how much complexity/micromanaging he wants.

In the future the ports can be part of different "groups of ports" (for this suggestion/discussion I call it "regions", if it is ok for you. Just to have a common term). Per default all ports of a certain player are in the same (and only) region, the "main region", or "main group" (starting with the first and second port of a player).

The player can set up new regions (or delete them, but not the first "main region"). For every port the player can decide to which region(s) it belongs. Every port can be part of more than one region. If a region is deleted with ports assigned to it, these ports can (should) be automatically assigned to the closest still existing region. I think ports not assigned to a region (of course not new ones under construction) should not be possible.

For each region (including the "main region") the player can set up:

  • home port of this region (long time idle ships set sail to this port; if not defined for a certain region the ship stays where it is in idle-mode)
  • maximum number of ports to embark goods to at once (possible values e.g.: "1, 2, 3, 4+") -- this is obsolet if the region has not more than 2 ports
  • optional (if not too complex): amount of maximum ships and amount of minimum ships (maximum and minimum can have the same value, that means no variation, no ship of this region is available for exploring or new regions) -- if in a certain region are more ships than the "maximum ships", the spare ships sail to the closest home port of another region (or main region), or to a region with less than "maximum ships".

The region settings for each port should be possible as pre-setting while it is still under construction (like the other pre-settings in newer versions).

The default settings for all "regions" including the main region always can be (for example):

  • "ships embark goods to not more than 2 ports"
  • home port is the first built port (for new regions: the actual home port of the main region, or it is not defined)
  • minimum ships: - (means: even a single ship in this region can be used e.g. for exploring)
  • maximum ships: - (means: not limited)
  • a new port is always part of the closest already existing region (if connected via water).

Of course at least one port of each region has to be part of one or more other regions, too, if it's not connected via streets with a second port. Otherwise the exchange of goods/workers wouldn't be possible.
I think that easyly can be checked by the game, and it can give a warning to the player if a "link" to the rest of the economy/economies is missing (e.g. a red bold flashing(?) warning on top of the "region setting window" or a message (like "no trees") if such a port or the last street between 2 ports is destroyed (street: only if destroyed for more then 20(?) seconds, so there are not hundreds of messages while the player just rebuilds his street-network)).

Also the player can get a message/warning if there are in all regions so much ships as the "minimum setting" says and a new ship is needed (new region or new exploration).
With this warnings the lesser advanced players hopefully don't messing up too much their shipping system. Or the higher advanced players on realy huge seafaring-maps.

Who don't want to micromanaging this stuff just can let it be with the default "main region" or sets up not more than 2 oder 3 such regions. If a player wants only regions with 2 ports in each (that would be pretty much a single-routes-system like Solstice suggested at the beginning) then he can do -- or try -- it.

And the algorithm for the sea-transporting is still used (just separated in regions) and all the hard work on it wasn't for nothing.

With this system it would be possible on a huge map to define for example: the main region around the home island, and several regions for the far away colonies with additional "connecting regions" (which including just 2 ports each: 1 in home region, and 1 in a colony region), so the ships in the colonies don't have to sail across the whole map just for 1 or 2 planks.
It is even possible to set up a single port (maybe with a tower/castle) on a small island in the middle of an ocean as a transport centre or junktion.

So, sorry for all the text (and all the odd english), what du you mean? Did I miss a big problem?

(edit:) Oh, and it would be pretty helpfull for the "regions set-up" if the ports can get individual names (by player or by a list like the ships)

Edited: 2020-02-02, 01:41

Top Quote
Tibor

Joined: 2009-03-23, 22:24
Posts: 1377
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2020-02-02, 08:10

@ Yo

First, a technical comment - you can have multiple separate waters and thus multiple "main regions"....

So you suggest new entity - region - that is list of ships and list of ports, where one ship can be only in one region (or none), but one port can be in multiple regions (or none). Once the ship is part of a region, it is allowed to sail only to region's ports.

Those list can be also empty, logically.

So:

  • New ships are not assigned to a region so can sail everywhere.
  • New ports are not assigned to a region so are available only for ships not assigned to a region.

This omits the concept of "main region" I think this is not needed.

Edited: 2020-02-02, 08:37

Top Quote
Nordfriese
Avatar
Joined: 2017-01-17, 17:07
Posts: 1949
OS: Debian Testing
Version: Latest master
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2020-02-02, 10:58

I think a region system which the player has to configure himself would be too complex.

First of all, the player would have to learn what regions are, how to define them, how to kep the overview, and all the do's and don't's which we don't even know ourselves without having tested such a concept. Those aren´t things you learrn by playing a tutorial once.

Again we have the problem that errors in the region setup introduce long detours and economy splits, and the player will have no idea why it´s broken. Automated warnings cannot check for all cases.

IMHO it would be better to adapt the current algorithm if there are bugs in it. So what exactly needs fixing?


Top Quote
Yo...
Avatar
Joined: 2019-10-28, 13:47
Posts: 26
OS: Win 10
Version: 1.0 + 1.2
Ranking
Pry about Widelands
Location: MiddleEurope
Posted at: 2020-02-02, 14:19

Tibor wrote:

@ Yo

First, a technical comment - you can have multiple separate waters and thus multiple "main regions"....

Yes, I know, but I ignored this fact to simplify it a bit face-wink.png

So you suggest new entity - region - that is list of ships and list of ports, where one ship can be only in one region (or none), but one port can be in multiple regions (or none). Once the ship is part of a region, it is allowed to sail only to region's ports.

Not quite; only a list of ports (at least for the player). The game assigns the fitting amount of ships by itself (out of all the ships they are not already assigned to a region (by the game) or they are more than the minumum amount in a region), the player don't have a say which ship should be in which region, if you meant it this way. I guess that would be way too complex and micromanaging-style.

Those list can be also empty, logically.

So:

  • New ships are not assigned to a region so can sail everywhere.
  • New ports are not assigned to a region so are available only for ships not assigned to a region.

This omits the concept of "main region" I think this is not needed.

Maybe. I'm not sure if it makes problems or not to have no "main regions". Mainly it was meant that the "main region" can't be accidentally deleted, if at least one region is needed that this system works properly. If it works without a region at all, than all is ok.

But ... unfortunately Nordfriese don't like this whole idea ...

I know the region concept is complex, but to not have a say in the (sometimes very odd) behavior of the ships is often frustrating (at least how it is now).


Top Quote
Tibor

Joined: 2009-03-23, 22:24
Posts: 1377
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2020-02-02, 14:31

the game assigns the fitting amount of ships by itself

So if you have one ship and 3 regions - the game would need to make a decision where and the result will be some ports will be unattended. I mean this design has also cons.

"No main regions"

All ports are by default in "main region", no need to create additional structure (the main region) to have what we have now. Once a port is linked to a region, it will switch from all ports to region's ports only mode.


Top Quote
Yo...
Avatar
Joined: 2019-10-28, 13:47
Posts: 26
OS: Win 10
Version: 1.0 + 1.2
Ranking
Pry about Widelands
Location: MiddleEurope
Posted at: 2020-02-02, 14:58

Nordfriese wrote:

I think a region system which the player has to configure himself would be too complex.

not "has to" but "can configure"

IMHO it would be better to adapt the current algorithm if there are bugs in it. So what exactly needs fixing?

I don't know how the algorithm works, but often ships start with goods/workers for several ports in different directions from the embarking port, a second later an idle ship does nothing close to a nearby port. I dont't know if it depends on the size of the certain map or on other circumstances.

Sometimes 2 or 3 ships start empty to a port while a ship with wares already is on its way to this port (and often at least one of the empty ships changes in idle-mode when arrives the port, so it was useless to move to this port and a few seconds later it is needed for another transport from another port), but I can't see for what destination the wares in the port are meant. So it seems odd but still might be sensefull in a way?

If the algorithm could plan ahead a bit the usage of the ships (e.g.: a ship arriving to a port in the next 5 seconds (on huge maps 10 or 15 seconds) that will be empty and idle afterwards can be planned to embark waiting wares in a nearby port instead of to use a ship that loads wares for a different direction first) and prefers single-destinations on longer distances if possible, it could help to solve the most problems, but I guess this is very complex to code.

Edited: 2020-02-02, 15:03

Top Quote
Yo...
Avatar
Joined: 2019-10-28, 13:47
Posts: 26
OS: Win 10
Version: 1.0 + 1.2
Ranking
Pry about Widelands
Location: MiddleEurope
Posted at: 2020-02-02, 15:14

Tibor wrote:

the game assigns the fitting amount of ships by itself

So if you have one ship and 3 regions - the game would need to make a decision where and the result will be some ports will be unattended. I mean this design has also cons.

Yes, that would be a problem. But I think even the dumpest player (maybe not the AI face-wink.png ) can understand that 3 regions don't work with just one ship. (And for this are the warnings/messages).

"No main regions"

All ports are by default in "main region", no need to create additional structure (the main region) to have what we have now. Once a port is linked to a region, it will switch from all ports to region's ports only mode.

That seems exaclty what I suggested in my first post face-smile.png If it is officially called "main region" or not (if the player can see the term "main region" or not) doesn't matter very much I guess.

Edited: 2020-02-02, 15:16

Top Quote