News:

SimuTranslator
Make Simutrans speak your language.

Industry balancing: short and long term

Started by jamespetts, June 17, 2009, 08:18:11 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

waerth

Quote from: jamespetts on December 26, 2010, 10:12:45 PM
Yes, that seems sensible enough :-)

Hi no fish and chips shops??? Every town in Britain has a chippie right (Only been in London once though) .... they could be supplied Fish, Oil and Potatoes?

W

jamespetts

AEO,

taking a look at this, I notice that version 1 has coal with a much reduced price per unit but also a reduced weight; you have reverted the weight, but not reverted the price in version 2 - is this intentional? Also, is there a reason that coal has its price reduced so greatly in comparison with the other goods? May I ask - how did you calculate the relative prices?

Wearth,

a fish and chip shop is an interesting idea - do you care to draw one?
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.

ӔO

@james
the price differences are to give some variety and were not changed because the weights didn't change drastically. The prices are not based on anything in particular.
If anything, I would assume, the fossil fuels would have been very cheap, but with high volume, otherwise they wouldn't be a popular choice for energy.

I just think the prices and speed bonuses are something that could be tried out, to give a difference between other paksets, but I don't mind if they are not.
My Sketchup open project sources
various projects rolled up: http://dl.dropbox.com/u/17111233/Roll_up.rar

Colour safe chart:

moblet

Industry balancing is all new, and still Greek, to me, so I'll confine myself to the opening post here.
James, I really like the sound of everything you've suggested. A few thoughts/questions from a newbie perspective:
1) Road vehicles having to load/unload at loading docks that consume a tile might prove to be a cumbersome arrangement in cities in particular, and isn't as realistic for trucks as it is for trains. One thought I have is whether it's possible to specify destinations by clicking on the business, and the truck briefly stops on the road outside the business to load/unload.
2) Is there an algorithm relating consumption of every good to population? The concentration of retailing into larger centres (from the corner shop to the mall) could possibly be handled as an algorithm too.
3) Warehousing plays a crucial role in modern supply chains, and if both primary production and retail are more dispersed, warehousing will become crucial in Simutrans, e.g. to deliver from one factory to 5 towns it will probably be most efficient to rail in bulk to warehouses outside each town and do truck deliveries from there. For dept stores and supermarkets warehouses will also do in Simutrans what they do in the real world - transform incoming "single type" loads into outgoing "single destination" loads. All of this will also help make the Simutrans world be - and look - more realistic.
4) It's not necessary for production and consumption capacity to be in constant balance, as in the real world they never stay that way for long if they ever are. Does/can Simutrans work on a basis of adding production capacity once consumption capacity exceeds it? I.e. Game might start with one coal mine and four local coal merchants consuming only 40% of production, new merchants open as population increases, as soon as enough merchants open to consume >100% of the mine's output a new mine opens. Is that how it works?
5) The backloading opportunities for raw materials that emerge as a Simutrans game matures are insane, and make for much higher loading factors than one would see in the real world. Another of the things that serves to artificiallly augment profits in mature play. Part of this is the way that raw material supply is contracted on the map, which doesn't seem to be discouraged by how far away the customer is (is that adjustable?) but one deviation from reality that strikes me is that in the real world, raw materials are not equally available anywhere on a map, they are concentrated according to local geology/geography/climate. In Simutrans they can drill anywhere and find oil, a great feature for pakDubai but a bit odd in pakBritain. If raw material supply was more highly concentrated that would do a lot to reduce the unrealistic levels of backloading, not to mention being more realistic generally. I would consider it perfectly reasonable for oil, iron, and coal to each only be available in one region of the map, and for most other primary products to be found only in certain areas. Of course in reality some raw materials are only available by international trade and therefore only available at certain ports.
6) Just as there's been an increase in scale in manufacturing and retailing, so has there been in raw material supply. The definition of what constitutes an economic deposit of mineral, or commercial grade, has changed over time. For example, 20 years ago the Chinese steel industry was using local iron ore, which is 35% iron. Now it uses ore imported from Australia and Brazil etc, 60% iron, which makes the steel mills much more productive. So one could have local village coal mines in 1750 hand-mining outcrops, but which can't compete with larger, more distant but more efficient mines as transport improves. Not essential, so maybe a low priority thing, but plausible. As for farming, I don't know about Britain, but in Australia and the US agriculture has tended towards fewer, larger farms over time. This may not be all that significant for gameplay, though, so can probably be ignored.

ӔO

I just realized I made a mistake with the iron ore to steel ratio.

it should be at most 10t of iron ore to 7t of steel and that is one of the most ideal numbers you can get from hematite.

2 Fe2O3 -> 4 Fe + 3 O2
1000g : 700g : 300g
159.69g/mol : 55.85g/mol : 32.00g/mol
6.26mol : 12.52mol : 9.39mol

Of course, there will be impurities that are not Fe2O3 mixed into the iron ore as well, so it would be closer to what moblet has given. Anywhere from 40 to 60% of steel produced for every ton of iron ore.
My Sketchup open project sources
various projects rolled up: http://dl.dropbox.com/u/17111233/Roll_up.rar

Colour safe chart:

jamespetts

Quote from: moblet on January 24, 2011, 03:39:16 PM
1) Road vehicles having to load/unload at loading docks that consume a tile might prove to be a cumbersome arrangement in cities in particular, and isn't as realistic for trucks as it is for trains. One thought I have is whether it's possible to specify destinations by clicking on the business, and the truck briefly stops on the road outside the business to load/unload.

There is no reason in principle why a pakset cannot define a "loading bay" on a road as if it were a 'bus stop. This would require no change to the code, and would also work in Standard.

Quote2) Is there an algorithm relating consumption of every good to population? The concentration of retailing into larger centres (from the corner shop to the mall) could possibly be handled as an algorithm too.

The current system is quite simple, and not changed in Experimental from Standard. Pure consumers (that is, "industries" that consume but do not produce; things such as shops and diaries) in towns are assumed to represent that town's demand for goods. The demand factors built into those "industry" types, when combined, constitute the demand of they city in which they reside. The city's growth figures are based in part on the ratio of goods supplied and goods demanded in a particular city.

Quote3) Warehousing plays a crucial role in modern supply chains, and if both primary production and retail are more dispersed, warehousing will become crucial in Simutrans, e.g. to deliver from one factory to 5 towns it will probably be most efficient to rail in bulk to warehouses outside each town and do truck deliveries from there. For dept stores and supermarkets warehouses will also do in Simutrans what they do in the real world - transform incoming "single type" loads into outgoing "single destination" loads. All of this will also help make the Simutrans world be - and look - more realistic.

This is possible (in both Standard and Experimental) without any change in either the code or the paksets: interchange stations can be set up with large storage capacities (using warehouse graphic station extension buildings: there are some in Pak128.Britain), which are, in effect, warehouses and enable this sort of distribution.

Quote4) It's not necessary for production and consumption capacity to be in constant balance, as in the real world they never stay that way for long if they ever are. Does/can Simutrans work on a basis of adding production capacity once consumption capacity exceeds it? I.e. Game might start with one coal mine and four local coal merchants consuming only 40% of production, new merchants open as population increases, as soon as enough merchants open to consume >100% of the mine's output a new mine opens. Is that how it works?

Not quite. Industries are built by the game in "chains". A chain is a series of vertically connected producers and consumers forming a complete set. When the method for increasing the industry density is called, the program first evaluates whether there is a consumer that is not fully supplied (as in, has some inputs at 0%), and, if so, builds the appropriate producer. Beyond that, however, it will simply build an industry at random (based on the weighting factors specified in their .dat files), and then, either link to existing suppliers/consumers, or, more likely, build a series of new suppliers/consumers. The industry density is increased in Standard when the population grows by a certain fixed amount. In Experimental, there is an industry density algorithm which takes the population divided by one divided by the chance factor of all industries at the beginning of the game, then creates new industries whenever the current density is less than that initial "target" density. This is checked once every game month. New power stations are created whenever the demand for electricity exceeds the supply.

I do need, and am planning, to change this, however, as users have reported problems with Experimental's feature of closing obsolete industries in which industries close such that a supply chain is left with a great undersupply of certain products in a certain part (if the supply chain is affected such that there are no supplies at all, then the game will first try to link existing industries, or, if it cannot, close the affected factories, which might produce something of a cascade of closures along the chain). I am planning to write an industry re-linker that will make sure that no part of an industry chain is supplied by less than a certain percentage of its demand, although exactly how this will work I have not yet decided.

Quote5) The backloading opportunities for raw materials that emerge as a Simutrans game matures are insane, and make for much higher loading factors than one would see in the real world. Another of the things that serves to artificiallly augment profits in mature play. Part of this is the way that raw material supply is contracted on the map, which doesn't seem to be discouraged by how far away the customer is (is that adjustable?) but one deviation from reality that strikes me is that in the real world, raw materials are not equally available anywhere on a map, they are concentrated according to local geology/geography/climate. In Simutrans they can drill anywhere and find oil, a great feature for pakDubai but a bit odd in pakBritain. If raw material supply was more highly concentrated that would do a lot to reduce the unrealistic levels of backloading, not to mention being more realistic generally. I would consider it perfectly reasonable for oil, iron, and coal to each only be available in one region of the map, and for most other primary products to be found only in certain areas. Of course in reality some raw materials are only available by international trade and therefore only available at certain ports.

There is a feature whereby industries can only be built in certain "climates", which are defined in Simutrans as height ranges. There has been talk of making climates depend on latitude as well as altitude, but this has never been implemented. This is as far as this goes in Simutrans at present, aside from the ability to specify the minimum distance between factories in simuconf.tab. There would probably be some benefit to the ability to restrict where factories are built by region, but that would first require answering the conceptual question of what counts as a region in Simutrans and how that would be coded and made clear to the player. It s, however, possible to make industries appear only at the water's edge. This means that it is possible to make certain goods available only from international ports by making an international port a sort of industry that "produces" certain raw materials. (By the same token, it is possible to make an international airport of sorts by making a "tourist attraction" with the appropriate graphic and a very, very high passenger/mail level. Neither of these techniques have yet been implemented in any pakset, although they have been mooted for Pak128.Britain).

Interestingly, I've rarely seen any significant backloading (assuming that by backloading you mean loading a different cargo on the return trip) in Simutrans games.

Quote6) Just as there's been an increase in scale in manufacturing and retailing, so has there been in raw material supply. The definition of what constitutes an economic deposit of mineral, or commercial grade, has changed over time. For example, 20 years ago the Chinese steel industry was using local iron ore, which is 35% iron. Now it uses ore imported from Australia and Brazil etc, 60% iron, which makes the steel mills much more productive. So one could have local village coal mines in 1750 hand-mining outcrops, but which can't compete with larger, more distant but more efficient mines as transport improves. Not essential, so maybe a low priority thing, but plausible. As for farming, I don't know about Britain, but in Australia and the US agriculture has tended towards fewer, larger farms over time. This may not be all that significant for gameplay, though, so can probably be ignored.

This is already done in Pak128.Britain-Ex with the system of industries closing down when they become obsolete, and being replaced by industries which have a larger capacity and a lower "chance" (meaning that few will appear - note the description of the industry density system described above).

Quote from: AEO on January 24, 2011, 04:25:11 PM
I just realized I made a mistake with the iron ore to steel ratio.

it should be at most 10t of iron ore to 7t of steel and that is one of the most ideal numbers you can get from hematite.

2 Fe2O3 -> 4 Fe + 3 O2
1000g : 700g : 300g
159.69g/mol : 55.85g/mol : 32.00g/mol
6.26mol : 12.52mol : 9.39mol

Of course, there will be impurities that are not Fe2O3 mixed into the iron ore as well, so it would be closer to what moblet has given. Anywhere from 40 to 60% of steel produced for every ton of iron ore.

Can you post a modified version of your spreadsheet with this amendment?
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.

jamespetts

Quote from: AEO on January 23, 2011, 04:40:29 AM
okay, I took another stab at this.

This time all the input and output are the actual values they should be in game, instead of a I/O ratio.
I also reverted the weights of goods where weight is specifically given.

The input/output ratio for steel, petroleum and coal power are more or less based on real values.
the others are more or less a guess, taking into account economic and environmental factors.

10t coal = 20MW/hr
10t hematite = 9t iron/steel
9m^3 petroleum = 12m^3 petrol

http://dl.dropbox.com/u/17111233/pakbr128%20goods%20balancing%20v2.ods

I have implemented a slightly modified version of this in the version of the sources in my Github repository (leaving out the changes to prices and to power stations for the time being, the output for power stations having been carefully calibrated in the past, and the prices being left to be calibrated as part of a different project in the future). Initial testing seems mostly good, although I think that there could still be more shops to every factory: the range was between one and four, with the average being about two (and this was with revised settings that reduced the consumption of shops). I think that four would be a good average; do you think that you could look into this (or comment on what you were hoping to acheive in this respect)?

I have only had chance to test it so far by creating maps and looking at what industry is set up - I have not had the chance to try transporting things and seeing whether the balance is right in that respect.

Incidentally, there might be some merit in looking back over this old thread for some analysis of industry balancing issues.
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.