The International Simutrans Forum

 

Author Topic: Recalibration of town buildings  (Read 1876 times)

0 Members and 1 Guest are viewing this topic.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18721
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Recalibration of town buildings
« on: December 24, 2018, 05:33:49 PM »
I have been spending some time to-day and yesterday recalibrating the proportion of residential to commercial/industrial town ("city") buildings. This is an interim measure pending a full reworking of the town growth system in the code, and I have been adjusting only settings in cityrules.tab.

The recalibration has involved greatly increasing the proportion of residential town buildings in proportion to the commercial/industrial town buildings. This is because, formerly, there were far too few people to fulfil the available jobs and to act as customers for consumer industries in towns. This made it very difficult to make any use of the industries, which had insufficient staff to function and which demanded too little in the way of goods on account of the fewness of customers.

I have now committed the change, which should be available in to-morrow's nightly build. This change only applies to maps generated anew after the new version has been applied. It does not affect existing saved games.

One thing that is important with these new settings is to generate enough industry. I have been experimenting with how much industry should be generated for optimum results. To get sufficient consumer industries in towns (assuming that one is starting before the 20th century - I have not tested late starts and the numbers may differ), I recommend around forty industries per town. That is, if you are starting with a map with 10 towns, you should have approximately 400 industries. If you are starting with a map with 100 towns, you should have approximately 4,000 industries. If you are starting with a map of 400 towns, you should have approximately 16,000 industries.

In the early years, a large number of primary industries are needed to generate enough product for secondary and tertiary/consumer industries, which is why such high numbers are required. Bear in mind that the number of supplier industries are calibrated to the maximum demand levels of consumer industries, but the consumer industries' actual demand levels are based on the number of visiting passengers (i.e. customers), which is why the number of consumer industries in proportion to the number of primary and secondary industries might previously have seemed too low.

With these new settings, employer buildings in or within walking distance of towns now consistently have all or most of their jobs filled, allowing them to operate normally.
In the future, more sophisticated town growth algorithms will hopefully allow transport dependent growth to emerge naturally, but this is some way off at present.

I should be very grateful for any feedback on the balance of the pakset after this recalibration from players who have generated maps and started playing after the new settings have been applied (i.e., using a pakset downloaded after circa 0600h GMT to-morrow).

Offline Matthew gb

  • *
  • Posts: 218
    • Japan Railway Journal
  • Languages: EN, some ZH, DE & SQ
Re: Recalibration of town buildings
« Reply #1 on: December 24, 2018, 07:00:54 PM »
Thank you for this Christmas present to the Simutrans-Extended community!

Offline Jando

  • *
  • Posts: 500
Re: Recalibration of town buildings
« Reply #2 on: December 31, 2018, 05:22:37 PM »
Good day all!

A welcome change indeed, thank you for that, James! However it has a possibly unintended side effect on passenger numbers.

I made a new map with this pakset in 1820 and connected 4 towns and around 10 industries with stage coaches, horse carts and pack horses. The good news is that the change makes it indeed much easier to staff the industries in town and close to town than before. The bad news is that passenger numbers are down too. I assume that is because we now have more residential buildings (that don't generate much visitor demand) and less commercial buildings (shops, that do generate visitor demand).

Visitor demand of a town (and thus people willing to travel to that town) on that map is largely determined by whether a town has monuments with large visitor demand, i.e. cathedrals, churches and cemeteries. Towns (no matter how large) without monuments demand very few passengers. I estimate that more than 90% of the passenger volume I see is to the monuments. It so happens that the map generation gave me a small town with 2 cathedrals and a church. Plenty of passengers from the 3 other towns want to go there - but nobody wants to go back to the towns without any monuments, thus the stage coaches are full on the leg to the monuments and empty on the return leg.

Thank you for your work and I wish you a happy 2019!

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18721
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Recalibration of town buildings
« Reply #3 on: December 31, 2018, 05:50:02 PM »
Thank you for your feedback on this: that is most helpful. May I ask - how many industries per town did you set when generating a map? I have found that a ratio of 40-50:1 is ideal. Anything less than that and there will not be enough commercial buildings in towns. Also, when using industries in this way, the industries/shops actually need to be working (i.e. stocked with goods) for the passengers to be able to travel to them. If you have a high enough ratio of industries, may I suggest trying to get some industry chains working and see whether this helps?
Edit: It would be very interesting if you could upload your map so that I can see how this is working in a developed game.

Offline Ranran jp

  • *
  • Posts: 481
  • Languages: ja
Re: Recalibration of town buildings
« Reply #4 on: January 01, 2019, 03:21:52 AM »
Hello 2019.  :)
I think the appearance probability of "COM"(commercial citybuilding) is very low... (´・ω・`)

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18721
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Recalibration of town buildings
« Reply #5 on: January 01, 2019, 11:40:02 AM »
It is indeed low, and this is intended: the idea is that commercial city buildings are not significantly more prominent than consumer industries. Do you think that the probability is too low? If so, may I ask how you calibrate what the correct rate should be?

Offline Ranran jp

  • *
  • Posts: 481
  • Languages: ja
Re: Recalibration of town buildings
« Reply #6 on: January 02, 2019, 09:36:05 AM »
Quote
Do you think that the probability is too low?
Yes. COM(commercial citybuilding) also includes office buildings. So I think that office buildings are becoming very rare.
There are no office buildings in the center of big city, there are only condominiums. Are there no white-collar jobs? (´・ω・`)

The factory workers seem to be set in the lower class, and the workers in the office building are set in the upper class.
The upper class residential areas appear to be standing, but their main workplace does not seem to exist.
I think it is necessary to adjust the supply-demand balance of work for each class.
(If the city does not grow to a certain extent, there may not be a job for the upper class.)


As Jando pointed out, I think that short-distance visiting are also concentrated in the attraction building too.
They rush into football ground. They surely love football. And yes, I love Captain Tsubasa. :award:
btw, I think football stadium has much small visitor demand than football ground. ???


Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18721
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Recalibration of town buildings
« Reply #7 on: January 02, 2019, 12:04:04 PM »
This does show the difficulty of attempting to balance towns without the major town growth code change that is planned but that will be a very large project, and is queued behind at least one other very large project, itself held up by a major bug that has been the priority since September and is still not diagnosed, let alone fixed.

Allowing more commercial city buildings would give rise to much more in the way of small shops (not connected to a supply chain) in earlier times (I have tested this), which consume too many passengers in smaller towns. The current code has no way of distinguishing between larger towns in later eras, which should have abundant offices, and smaller towns (and all towns in earlier eras), which should have few, if any, offices.

As to the football stadia, this appears to be an error in the pakset: I will look into this.

Edit: I have pushed a fix for the stadium issue, reducing the visitor demand for the smaller stadia at the same time.

Offline Jando

  • *
  • Posts: 500
Re: Recalibration of town buildings
« Reply #8 on: January 02, 2019, 12:05:55 PM »
Hello all and happy new year!

Here's my test map of the 1820 game, now in spring 1821: https://simutrans-germany.com/files/upload/Actual.sve
Yep, map is made with 40 industries per town.

Overall I believe the passenger numbers and destinations are just a side-effect of an otherwise welcome patch. Practically it's not even wrong but only looks odd because visiting travel seems to be one-way in Simutrans, thus when you have towns with large visitor attractors and other towns with almost no visitor attractors then the result should even be what I see: full coaches in one direction and empty ones on the return trip. I switched all my coaches to carry only medium class and above passengers between towns and they run with a profit even with no passengers for the return trip. With that setting I rarely get any commuting traffic (what would be fitting for the time period too).

2 other observations:
- Some towns seem to have a very large amount of cow and sheep fields (I assume these count as commercial buildings).
- My stage coaches (running at 12 km/h) cannot overtake any other road travel thus they get stuck behind pack horses and livestock drovers (running at 5 and 7 km/h). That may be a standard Simutrans limitation, please tell me when you want a separate bug report for that.

Thank you again, James!

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18721
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Recalibration of town buildings
« Reply #9 on: January 02, 2019, 12:21:08 PM »
Thank you for that: I will take a look at that saved game presently.

The passenger generation system is definitely not one way: for every trip made by passengers, a return trip is generated. It is odd that this is seemingly not apparent in this setup: I will have to look into this.

The cow/sheep fields actually count as industrial buildings: I do not think that there is any way of changing this without the major town growth re-write which is a very major project some way down in a long queue of very major projects as described above.

As to the road vehicles and overtaking: if I recall correctly, this code is unchanged from Standard. I think that there has to be a minimum speed difference between the overtaking and overtaken vehicles, but I do not know where in the code it can be found, whether this is expressed as an absolute or proportionate difference and what the reason for having this specific difference would be. Attempting to alter this would therefore be a significant undertaking, and would have to wait until all of the higher priority projects have been completed, of which there are a great many.

Thank you again for your feedback: this is most helpful.


Edit: Looking at the map, it does seem as if there may be a problem with returning passengers. I will have to look into this when I get home.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18721
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Recalibration of town buildings
« Reply #10 on: January 02, 2019, 03:21:35 PM »
I have split the discussion relating to the error concerning visiting passengers into a separate thread better to keep track of it.

Offline Jando

  • *
  • Posts: 500
Re: Recalibration of town buildings
« Reply #11 on: January 06, 2019, 11:32:40 AM »
In the early years, a large number of primary industries are needed to generate enough product for secondary and tertiary/consumer industries

I'm not seeing this in actual games, James. I've tracked goods across 3 different industry chains in my current 1821 game and what I see is quite different from what I quoted:

- A single grain farm provides more than enough grain to keep a bakery supplied at all times.
- A single sheep farm provides more than enough wool to keep a clothes shop supplied at all times.
- A single cattle farm provides more than enough livestock to keep a butcher supplied at all times.

From what I see the current large number of primary industries (basically all types of farms) is not needed, there's much more supply than there is demand on the maps.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18721
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Recalibration of town buildings
« Reply #12 on: January 06, 2019, 01:31:11 PM »
You refer to a single farm being enough to keep a bakery supplied at all times; but is the bakery receiving as many visitors as it demands? The bakery's consumption will depend on the extent to which its visitor demand is fulfilled: the more visitors (customers), the more that it will consume. The industries are calibrated on the basis of all the visitor demand being fulfilled. If only part of the visitor demand be fulfilled, then there will not be full use of all the supply chain.

Offline Jando

  • *
  • Posts: 500
Re: Recalibration of town buildings
« Reply #13 on: January 06, 2019, 01:59:42 PM »
Hello James!

Visitor demand of bakery: 320
Visitors last year: 1444
Visitors this year: 1890

Screenshot of bakery here: https://i.imgur.com/voU0fi5.png

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18721
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Recalibration of town buildings
« Reply #14 on: January 06, 2019, 02:13:10 PM »
The visitor demand is per game month, so the annual visitor demand would be 320 x 12 = 3,840, whereas the bakery received only 1,444 visitors last year. It is connected to a total of three windmills, only one of which is supplying it. That one windmill is also connected to two other bakeries, but is supplying neither of those. It is in turn connected to two grain farms, and is supplied by only one of them.

If the bakery had its full visitor demand fulfilled, and if all the supplying windmills were connected to all the bakeries that they supply, each of which were consuming goods on the basis of their full visitor demand, then it seems likely that the full number of farms would be required.

Also, note that industries will always round up when selecting the number of suppliers. So, for example, suppose that a consumer industry has a demand of 7, and there are three producer industries each with a supply of 3: the consumer industry will connect to all three of them, as connecting to only two would give it a supply of 6, which is less than 7. Connecting to all three will give a supply of 9, which is in excess, but it is better to have an excess than not have enough, so there will be many cases where the producer industries will be slightly more in supply than the consumer industries demand.

Offline Jando

  • *
  • Posts: 500
Re: Recalibration of town buildings
« Reply #15 on: January 06, 2019, 04:28:13 PM »
Ah, thanks, I didn't know about visitor demand being per month. I assume all the visitors the bakery currently gets is by foot from locals, at least I've never seen a coach passenger with destination bakery coming in from another town, thus it's probably difficult to get more visitors to that bakery. But even then, the grain farm in that chain can provide double of what the bakery currently demands anyway. Sadly further tests have to wait, the windmill has now decided to go into staff shortage and doesn't produce any flour. :) No idea why.

Btw, towns seem to have some sort of negative starting number of jobs. At least the city hall job graph will show a negative job number when I delete all job providing buildings in a town, i.e. all cow and sheep fields, shops, churches, cathedrals and all other industry buildings.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18721
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Recalibration of town buildings
« Reply #16 on: January 06, 2019, 04:40:17 PM »
The latter appears to be a bug of some sort relating to the recording of the number of jobs in the graph; I should be grateful if you could post a separate report so that I can investigate that when I have a chance, although it might be some time.

Offline Jando

  • *
  • Posts: 500
Re: Recalibration of town buildings
« Reply #17 on: January 22, 2019, 07:01:15 PM »
First a bit of feedback on this new feature:

Setting the number of industries that high (I used 40 industries per town) leads to some pretty strange maps. Here are two examples of it:



Many, many farms are created and many of them are basically useless, because created so close to each other that they have little space, thus also little production. Most of the farms in the above screenshots would need to be removed through the map editing tool because they provide no meaningful production plus block the route to the few farms that have useful production.

Offline Jando

  • *
  • Posts: 500
Re: Recalibration of town buildings
« Reply #18 on: January 22, 2019, 07:19:37 PM »
And a question, James. Thanks in advance.

I'm currently experimenting (or rather fooling around :) ) with a map that I created with no industry at all, i.e. zero industries per town in map creation. Instead I place all industries as public player with the map editing tool, scaling the number of consumers and manufacturing industries per town with number of inhabitants of that town. That gives some realistically looking towns and good transportation opportunity, however I notice that almost all these industries are out of staff almost always. To keep the industries going I have now set minimum_staffing_percentage_consumer_industry and minimum_staffing_percentage_full_production_producer_industry both to zero in this experiment via the settings dialogue.

I wonder whether industries created during map creation and industries created via map editing tool are somehow treated differently when it comes to number of jobs and staff shortage calculations. Should this approach of creating industries via map editing tool work or not?

Thanks!

Offline ACarlotti

  • *
  • Posts: 478
Re: Recalibration of town buildings
« Reply #19 on: January 22, 2019, 07:33:56 PM »
Many, many farms are created and many of them are basically useless, because created so close to each other that they have little space, thus also little production. Most of the farms in the above screenshots would need to be removed through the map editing tool because they provide no meaningful production plus block the route to the few farms that have useful production.
Part of the issue is that fields are only built at the same altitude as the factory (this was originally to ensure that the climate matched). I thought I had recently read of a suggestion to change this, but I can't find any reference now (in the code or the forum).

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18721
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Recalibration of town buildings
« Reply #20 on: January 23, 2019, 11:16:12 PM »
Thank you for your feedback: this is most helpful. In general, having a large number of farms is correct: most of the English countryside is taken up with agricultural usage. The issue with small farms is likely to be very complex to solve, as it would require new and possibly very complex algorithms to work out how many fields that a farm would be able to generate in the future (since the generation of the fields is after the generation of the farms themselves).

I have not looked in any detail at the manual industry creation tool. You write that such industries are usually out of staff: have you checked whether the staff demand is different from automatically generated industries?

Offline wlindley us

  • Devotee
  • *
  • Posts: 975
    • Hacking for fun and profit since 1977
  • Languages: EN, DE
Re: Recalibration of town buildings
« Reply #21 on: January 24, 2019, 04:00:36 AM »
It sure would be nice if farms (anything with Fields), as they are built, would build a road of the lowest current capacity (e.g., bridleways in 1820) at least to their boundary (or, dare one hope, perhaps as far as the nearest road) to make it possible to connect farms to our player stations without having to spend 10 x 5000¢ bulldozing fields (or resorting to switching to the public player).

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18721
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Recalibration of town buildings
« Reply #22 on: January 24, 2019, 09:30:40 AM »
It sure would be nice if farms (anything with Fields), as they are built, would build a road of the lowest current capacity (e.g., bridleways in 1820) at least to their boundary (or, dare one hope, perhaps as far as the nearest road) to make it possible to connect farms to our player stations without having to spend 10 x 5000¢ bulldozing fields (or resorting to switching to the public player).

This is already in the queue of tasks: but it is a long queue and critical debugging must be completed first.

If anyone else would like to work on this in the meantime, that would be most helpful.

Offline Jando

  • *
  • Posts: 500
Re: Recalibration of town buildings
« Reply #23 on: January 24, 2019, 12:50:12 PM »
... I have not looked in any detail at the manual industry creation tool. You write that such industries are usually out of staff: have you checked whether the staff demand is different from automatically generated industries?

Yep, checked that, same number of jobs in automatically and manually placed industries. You can use this link to a saved game (from a bug report in another thread) for industries out of staff: https://simutrans-germany.com/files/upload/AA_Test.sve

Saved game shows town of Brackhill, 3.946 population as shown in city hall, town has 4 operational industries:

- Fishing port, 271 jobs, 264 available
- Public house, 48 jobs, 48 available
- Bakery, 176 jobs, 168 available
- Market, 480 jobs, 464 available

Town has 4 public properties, all of them out of staff. Town also has 6 shops and 1 beer house from map creation, all of them out of staff. Some of the cow and sheep fields are out of staff, some of them have staff.



Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18721
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Recalibration of town buildings
« Reply #24 on: January 24, 2019, 01:13:53 PM »
Can I check - did you link the manually placed industries?

Offline Jando

  • *
  • Posts: 500
Re: Recalibration of town buildings
« Reply #25 on: January 24, 2019, 02:05:05 PM »
Can I check - did you link the manually placed industries?

Yes, links made with the map-editing tool.