The International Simutrans Forum

 

Author Topic: Pak128 Britian Extended Vehicle Balance.  (Read 2762 times)

0 Members and 1 Guest are viewing this topic.

Offline DrSuperGood

  • Dev Team
  • Devotee
  • *
  • Posts: 2547
  • Languages: EN
Pak128 Britian Extended Vehicle Balance.
« on: June 21, 2018, 11:07:19 AM »
I have just made a pull request that changes the running and monthly costs of all vehicles. This post will highlight the changes made and server as a centre for discussion/complaint about any of the changes made. Hopefully these changes will make it into the next nightly build.

For anyone interested in seeing the logic behind the balancing, the spreadsheet that was used to generate the numbers for automatic merger is available below.
https://www.dropbox.com/s/3u8nvwb7gdklbz1/Pak128%20Britain%20In.xlsx?dl=0

Practically all trailers/coaches now have as good as 0 per km cost associated with them. The logic behind it is that trailers, coaches and other unpowered vehicles that are pulled/pushed around by powered verhicles will practically never wear out from doing so. In theory there is a cost as they will eventually wear out, however due to the low cost of trailers (no expensive engines) and their simplicity it is so small that it cannot be represented accuratly after rounding. Instead of rounding up (0.01) I rounded to nearest so in most cases this is in the players favour. For people on the server game this means that your trains will cost a lot less to run as a lot of the per KM cost is now expensive coaches.

All vehicles that have a cost now have a monthly cost associated with owning them. The extent of this cost is based on how well the vehicle ages when not used as well as the initial cost of the vehicle. This is only really significant for some vehicles such as planes, ships and such. Usually it will be a few simupounds per month for coaches and such.

Ships are very roughly balanced. One may find they have the wrong crew numbers or are impossible to run profitable over similar selections. This is because many of the ships have estimate weights and powers associated with them as well as strange water physics (not sure how realistic it is). Such ships can be balanced on an individual basis if required.

Some attempt was made to balance aircraft. How balanced they are I do not know.

Since the balance spreadsheet started out several weeks ago, some of the more recent manual changes made to the pakset might not be present in it. Over the next few weeks I will try to improve my automation framework or find some other way to merge in these changes as well as add additional columns for more balance information such as capacities, traction, retirement, etc.

The power to cost logic is almost certainly unrealistic. Until a power usage metering, fuel and consumable weight system is added to Simutrans Extended it will remain so. What such a system would allow one to do is meter the actual power used to move a vehicle and from that charge the player a more accurate fuel running cost. The fuel system would mean different types of fuel have different costs and these costs can change with respect to time to represent improvements in production technology to recessions and resource scarcities. The consumable weight system means that as a vehicle that consumes fuel travels it will lose weight proportional to the fuel being expended meaning that the vehicle becomes more economical to run per km a feature critical for steam engines (water and coal used up on the move) and aircraft (fuel used up on the move). Such a system does not mean that if a vehicle runs out of fuel it becomes stuck.

For accurate wearing out and maintainance values a vehicle durability system is needed, similar to what pathways now have. I believe this has already been proposed as the "overhaul" system and is an up comming feature some time in the distant future. All vehicles would have durability. As they move some amount of durability is expended. Every month they exist some amount of durability is expended. Some fraction of lost durability can be recovered cheaply by servicing the vehicle in a depot. Only way to fully restore durability is an expensive "overhaul", which in the case of some vehicles like large passenger aircraft or ships this might be a large cost of a new one. If a vehicles durability runs too low then its performance may be effected, including reduced maximum speed and power. The use of depots for this only makes sense with the up coming scheduling and recombination features as then depots become an integral and mandatory part of a lines operation.

Offline Vladki cz

  • Devotee
  • *
  • Posts: 2421
    • My addons, mostly roadsigns
  • Languages: EN, CS
Re: Pak128 Britian Extended Vehicle Balance.
« Reply #1 on: June 21, 2018, 06:15:20 PM »
So, if the per km costs for trailers are (almost) zero, it means that a 1 wagon train has the same per km cost as 100 wagon train ?
I think that until we have power consumption based running cost, we should assign some running cost to trailers as well.
Or did you calculate the running costs for engines to include a fully loaded train of maximum length it can pull?

In practice there are also maintenance tasks that have to be done after certain amount of km running. These should be accounted for too.
And until we have overhauls, they should be too split into per km or per month costs.

An idea for future overhauls and services - vehicles with neglected service could not only have their top speed reduced, but also comfort (passengers) or capacity (cargo) reduced.
And for the fuel consumption system, don't forget that vehicles differ in efficiency. Even thou they consume the same fuel, they have different consumption/kW.

Offline DrSuperGood

  • Dev Team
  • Devotee
  • *
  • Posts: 2547
  • Languages: EN
Re: Pak128 Britian Extended Vehicle Balance.
« Reply #2 on: June 21, 2018, 09:39:39 PM »
Quote
So, if the per km costs for trailers are (almost) zero, it means that a 1 wagon train has the same per km cost as 100 wagon train ?
Yes. However that 100 wagon train is impossible due to engine/pakset limitations so I never considered it...
Quote
Or did you calculate the running costs for engines to include a fully loaded train of maximum length it can pull?
They assume the engine is having to provide maximum power. It is up to the player to optimize the power output with length. Something that occurs naturally at the moment.
Quote
In practice there are also maintenance tasks that have to be done after certain amount of km running. These should be accounted for too.
Which they are currently in the form of a per km cost. However this is too small that rounding eliminates it.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18026
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Pak128 Britian Extended Vehicle Balance.
« Reply #3 on: June 21, 2018, 09:55:08 PM »
Thank you for this - I have now incorporated this. A better way of doing balance (subject to test based updating of this if Dr. Supergood should be so inclined) will have to wait until the balance critical features (vehicle maintenance and inflation) are added. There may be a number of further matters to discuss in relation to preparing for balance in due course that can learn from Dr. Supergood's experience at this interim balancing exercise, some of which Dr. Supergood touches on above (such as the issue of power usage), and it would be helpful in due course to have a thread discussing and analysing in detail (mathematically and based on empirical evidence, preferably with examples and modelling) precisely what dynamics it is necessary to simulate in order to achieve a realistic cost/revenue balance before the work on the balance critical features is completed, but I am currently very busy with professional commitments and only just about have time to merge this.

In the meantime, if anyone else would like to start that discussion, it would be very worthwhile. This is the first time that we have had even an approximate cost balancing for Pak128.Britain (either Standard or Extended), and I am very grateful indeed to Dr. Supergood for the large amount of work that this must have entailed. Even though this may well be some way different from the final balance once the features are implemented in due course, this is still a significant achievement and advance for the pakset.

Offline DrSuperGood

  • Dev Team
  • Devotee
  • *
  • Posts: 2547
  • Languages: EN
Re: Pak128 Britian Extended Vehicle Balance.
« Reply #4 on: June 22, 2018, 01:03:06 AM »
Quote
inflation
I am not too sure that inflation would bring much to the table. Sure it is something that occurs in real life, but all it really serves to do is devalue any liquid capital a company owns. On top of that it would require being applied to practically every aspect that has a cost associated with it and in the end the game itself might be internally using normalized costs then adjusted for inflation. I would not say inflation is critical for balance, especially when compared with a better staffing system as well as an fuel consumption system.
Quote
In the meantime, if anyone else would like to start that discussion, it would be very worthwhile. This is the first time that we have had even an approximate cost balancing for Pak128.Britain (either Standard or Extended), and I am very grateful indeed to Dr. Supergood for the large amount of work that this must have entailed. Even though this may well be some way different from the final balance once the features are implemented in due course, this is still a significant achievement and advance for the pakset.
To give people ideas on the time spent, I recon at least 20 hours of work in total. About 4-8 getting everything set up and then the rest processing data.

The current balance numbers might be a bit too cheap for some vehicles. This is slightly intentional so that people can enjoy playing the pakset without finding it impossible to make money at certain stages. If particular vehicle combinations are too profitable one can adjust the values in future.

I was thinking of increasing the transport value of all freight by an order of magnitude. Currently freight generates so little money that on the server most players are not bothering with it and instead solely focusing on Passengers and Mail which are big money spinners. A large problem with freight at its current price is how little of it is available to transport.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18026
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Pak128 Britian Extended Vehicle Balance.
« Reply #5 on: June 22, 2018, 05:41:51 PM »
It is probably better to err on the side of being too easy rather than too difficult in case of doubt.

In relation to inflation, this is important for two main reasons: (1) the planned way of simulating inflation allows the simulation of differential inflation, in which labour costs, fuel costs, ticket prices, materials costs and other things change over time independently of each other so that the changing relationships between these things can be simulated (which was important in reality, especially changes in labour costs); and (2) (less importantly but still significantly) general inflation will prevent players accumulating large cash stockpiles early in the game which retain their value until the later part of the game (allowing, e.g., an 18th century canal empire to fund a 21st century airline).

In any event, thank you again for all your work on this.

Offline DrSuperGood

  • Dev Team
  • Devotee
  • *
  • Posts: 2547
  • Languages: EN
Re: Pak128 Britian Extended Vehicle Balance.
« Reply #6 on: June 22, 2018, 08:30:53 PM »
Quote
(1) the planned way of simulating inflation allows the simulation of differential inflation, in which labour costs, fuel costs, ticket prices, materials costs and other things change over time independently of each other so that the changing relationships between these things can be simulated (which was important in reality, especially changes in labour costs);
This has nothing to do with inflation. If one separates the parts then each of those can be made to change with time. Similar to how speed bonus works in standard, but expanded for all kinds of things like fuels, labour, etc.

This also might result in deflation in particular areas at certain times, as occurred in real life. For example during the oil crisis oil based fuel costs would rise significantly, but after the crisis ends the fuel prices decrease.
Quote
(2) (less importantly but still significantly) general inflation will prevent players accumulating large cash stockpiles early in the game which retain their value until the later part of the game (allowing, e.g., an 18th century canal empire to fund a 21st century airline).
Except this assumes a company keeps their capital liquid. Most companies, like rich people, invest most of their free money in assets which are more inflation proof. This is how many rich people are still living off the Rockefeller fortunes. As such their wealth retains similar value irrespective of inflation.

The only reason a cannel company would accumulate fortunes like my own company on the server is because the player who controls it lacks enough time to spend the money as fast as the company earns it. Something that is not realistic as years in real life are years as opposed to under a day.

Offline Spenk009

  • *
  • Posts: 214
Re: Pak128 Britian Extended Vehicle Balance.
« Reply #7 on: June 24, 2018, 08:50:21 AM »
The only reason a cannel company would accumulate fortunes like my own company on the server is because the player who controls it lacks enough time to spend the money as fast as the company earns it.
If you were to leave your company untouched until the 21st century, I'm certain that obsolescence increases, lost business to faster rivals, reduction of toll income, etc. would all factor in to reduce income and slowly bankrupt the company. It could be very interesting to see this, although difficult to make happen.



Dr SuperGood How would you like your feedback to the changes? I'm certain people are happy to share their savegames, write out their experiences and thoughts and/or show screenshots.

(Savegame: 6400*1280, yr. 1922, 435 towns, 4.7m pop, img)
Passengers: I've found that my company earns a lot more money (around 3x), many bus lines are now less unprofitable if they have passengers. Smaller railway lines over shorter distances are now profitable, larger lines have less of a pronounced bump in income (imo very good). My turbine channel ferries, which are usually filled with passengers have had no impact on profitability, however I'm trading them for turbine coastal ships to make use of the passenger numbers (the hefty monthly increase is hopefully worth it).
Goods: The system I use for goods is mixed trains across the map, connecting industries that are convenient or have high I/O. The trains are doing better although I still have trouble making lines profitable. Road and Naval sections incur losses. The goods network is neither complete nor well designed, so I doubt it's a representative of goods focused playing.

Offline DrSuperGood

  • Dev Team
  • Devotee
  • *
  • Posts: 2547
  • Languages: EN
Re: Pak128 Britian Extended Vehicle Balance.
« Reply #8 on: June 25, 2018, 08:37:01 AM »
Quote
Dr SuperGood How would you like your feedback to the changes? I'm certain people are happy to share their savegames, write out their experiences and thoughts and/or show screenshots.
By feedback I generally mean weather the balance changes are working or not. Or if you encountered some vehicle that is abolutly broken gameplay wise either positivly or negativly.

I balanced almost everything (I think 3 vehicles were added during that time which were not included in the spreadsheet) in the pakset. However I have tested only what is currently available on the server. Hence I cannot guarantee that something is broken or not, especially with the many modern trains or hovercrafts.
Quote
Goods: The system I use for goods is mixed trains across the map, connecting industries that are convenient or have high I/O. The trains are doing better although I still have trouble making lines profitable. Road and Naval sections incur losses. The goods network is neither complete nor well designed, so I doubt it's a representative of goods focused playing.
I think goods need their prices doubled or even tripled. The quantities they are available in, especially early game, is so low that it is always better to focus entirely on passengers.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18026
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Pak128 Britian Extended Vehicle Balance.
« Reply #9 on: June 25, 2018, 09:25:02 AM »
In relation to the prices of goods - these are all set relative to passengers using historical data, so it would not be right to double or triple the prices. Work does need to be done at some point to improve the balance between producer and consumer industries, however.

Offline DrSuperGood

  • Dev Team
  • Devotee
  • *
  • Posts: 2547
  • Languages: EN
Re: Pak128 Britian Extended Vehicle Balance.
« Reply #10 on: June 25, 2018, 05:56:00 PM »
Quote
In relation to the prices of goods - these are all set relative to passengers using historical data, so it would not be right to double or triple the prices. Work does need to be done at some point to improve the balance between producer and consumer industries, however.
The problem is that in real life you often had cargo ships and trains full to the brim with goods. Hence why they were so cheap to transport as there was so much of them. Passengers were logically more expensive to transport as you could not fill a bulk wagon or hold with them as they need space to breath and even accommodation and food on longer trips. Simply running 2-3 Australia to UK trips with a clipper carrying grain could pay for the clipper and then some!

Problem is in Simutrans Extended Pak128 Britain, good luck filling even a horse drawn cart with product! This is why it should be tripled or more. To make up for the fact that there is practically nothing to ship around. Where as with passengers you can load a ship to 1/4 capacity or even more, with goods you are lucky to load it to even 1/100 capacity early game (pre 1900 as on the servers currently). In the 1900s practically every town should have at least 1 coal distributers that takes large volumes (many tonnes) of coal. Coal mines should literally be filling train loads of coal every month.

What about deferring transport until there is a practical volume of good? Well the in transit limit does not allow for that! That is if one can even get a factory to work at all because a city has grown so large that it cannot get sufficient employment on either a plant or an end consumer.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18026
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Pak128 Britian Extended Vehicle Balance.
« Reply #11 on: June 25, 2018, 09:45:13 PM »
This is a somewhat backwards way of looking at things, rather of the "we couldn't fix your brakes so we made the horn louder" school of engineering. The proper way of dealing with these difficulties with the industry is to fix the underlying problems, rather than interfere with the currently correct prices.

Offline Spenk009

  • *
  • Posts: 214
Re: Pak128 Britian Extended Vehicle Balance.
« Reply #12 on: June 28, 2018, 05:08:25 PM »
Midland Class 2441 and Class 1632 are introduced at different times, but are available to the same date and have fairly similar properties. Previously they were the same running cost/maintenance, but now the latter is 1/3 of the price of the former. Is this an intended change?

Offline DrSuperGood

  • Dev Team
  • Devotee
  • *
  • Posts: 2547
  • Languages: EN
Re: Pak128 Britian Extended Vehicle Balance.
« Reply #13 on: June 28, 2018, 05:20:00 PM »
Quote
but now the latter is 1/3 of the price of the former
That would likely be as the result of it being introduced later when coal is cheaper and possibly having more efficiency. You can check the spreadsheet for details of where the values came from.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18026
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Pak128 Britian Extended Vehicle Balance.
« Reply #14 on: June 28, 2018, 05:47:34 PM »
You can find my calculation of the fuel efficiency of all steam engines in the Steam physics calc.ods document in the sources folder: thus might be helpful for calculating running costs (it is intended to be used for this purpose when the balancing features are introduced).

Offline DrSuperGood

  • Dev Team
  • Devotee
  • *
  • Posts: 2547
  • Languages: EN
Re: Pak128 Britian Extended Vehicle Balance.
« Reply #15 on: June 29, 2018, 05:10:14 AM »
Quote
You can find my calculation of the fuel efficiency of all steam engines in the Steam physics calc.ods document in the sources folder:
When I checked them the problem is that they assume the trains are running at their maximum speed. Hence with train speed increases the cost per km decreases, but in a realistic way. However if someone dumped a whole lot of heavy coaches on the train to force it to run well below its maximum speed the result is they get effectively cheap power from the engine.

As a result under such a model it is entirely pointless to use anything but the fastest locomotive as even pulling slow trains is done more efficiently by them than the dedicated slower locomotives. The only time a player might refrain from using such a fast locomotive is if the cost to buy it cannot be afforded, and even then they have to think in the long run due to it having a payback time.

This is why the model I used has the cost per km directly proportional to the power output. This is not realistic however it means that cheap small slow engines have a purpose for hauling appropriate stuff compared with the fastest always being the best.

As mentioned earlier for correct fuel costs a fuel system is needed. The game can then calculate the fuel costs based on actual work an engine does. This would mean that putting a lot of coaches on a fast train to make it slow or running a train with few coaches fast would use the same amount of fuel per unit time as both situations are using the full power of the train. However care must be taken with such a model and ships as a lot of the ship weights appear incorrect or guesses and I do not think ship physics is completely accurate.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18026
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Pak128 Britian Extended Vehicle Balance.
« Reply #16 on: June 29, 2018, 09:55:50 AM »
That is a very useful analysis. Careful consideration to how to treat this issue will be necessary in due course, starting first, perhaps, with an analysis of whether adopting a realistic system would make a significant difference. We do need to address these issues before completing the balancing features and it is very useful that Dr. Supergood has had a go at interim balancing now so that we can see what features are necessary for balance.

In terms of ship physics, we may need to look into this in more detail. Does anyone have any data against which the ship physics can be tested? The main thing about ship physics that is different from the physics of other vehicles is the "rolling" resistance (i.e., resistance in the water).

Offline DrSuperGood

  • Dev Team
  • Devotee
  • *
  • Posts: 2547
  • Languages: EN
Re: Pak128 Britian Extended Vehicle Balance.
« Reply #17 on: June 29, 2018, 10:53:37 AM »
Quote
In terms of ship physics, we may need to look into this in more detail. Does anyone have any data against which the ship physics can be tested? The main thing about ship physics that is different from the physics of other vehicles is the "rolling" resistance (i.e., resistance in the water).
This also has to be done with Aircraft since again they use different physics than a train or road vehicle.

Another reason for a fuel system is that it allows fuel costs to vary with time. For example coal would start out quite expensive in the 1840s due low scale mining and usage but by 1880 it would be considerably more cheap per kj of coal due to the large scale mining and transport occurring. This is important because it means running a more powerful locomotive that uses more coal per unit time would be more affordable at the times it happed in real life. This also is important for modern transport simulation as a big factor with transport today is fuel economy, with year on year rising fuel and energy prices encouraging the use of more economical planes, ships and trucks.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18026
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Pak128 Britian Extended Vehicle Balance.
« Reply #18 on: June 29, 2018, 11:06:25 AM »
It was and is certainly planned to have a system in which fuel costs changed with time using the inflation system (different types of costs inflating/deflating at different rates).

As to aircraft and ship physics - on reflection, I am not sure how important that these actually are in economic terms in the game. Unlike with trains, where there are locomotives that can pull an indeterminate number of carriages or wagons and it is important for the game engine to make sure that players cannot get an unrealistic effect by using weak vehicles to haul heavy loads), aircraft and ships are singular units. Because they tend to go long distances (and, in the case of ships, go very slowly), the rate of acceleration is of minimal importance. What is really important for aircraft and ships therefore is just the top speed, at which they will be travelling most of the time. In principle, it should be much easier to balance the physics for these than for rail vehicles (and, to a lesser extent, road vehicles).

Offline DrSuperGood

  • Dev Team
  • Devotee
  • *
  • Posts: 2547
  • Languages: EN
Re: Pak128 Britian Extended Vehicle Balance.
« Reply #19 on: June 30, 2018, 03:30:14 AM »
Quote
the rate of acceleration is of minimal importance. What is really important for aircraft and ships therefore is just the top speed, at which they will be travelling most of the time. In principle, it should be much easier to balance the physics for these than for rail vehicles (and, to a lesser extent, road vehicles).
With powered ships the current speed (not maximum speed) is extremely important when it comes to economics. In recent times container ships have been going slower on average as reducing speed a knot or two results in huge fuel savings for the same distance. For the same reason cruise ships often run well below their maximum speed as it results in huge fuel savings. This was especially important back in the days of steam ships as running at full power would burn coal very fast resulting in huge fuel costs as well as short maximum range. The player should only be paying for fuel that is used, not the full power of the ship.

With aircraft the weight of the plane, including fuel on board, is critical for their economics. A long distance flight with an aircraft will cost on average more per km than a short distance one as more energy is expended lugging fuel. In fact a long distance flight that has just taken off is unable to land until most of its fuel has been expended as planes are not designed to land reliably/safely at that weight. Like with boats, the current speed of an aircraft is also important for economics with slower often being more efficient. This is why passenger planes have been running slower over the decades, to reduce fuel costs.

I do not know how much weight effects the economics of a ship. Often ships require extensive ballast if their cargo holds are empty for ship stability, hence I imagine weight having little effect on ship economics.

This means that a speed cap feature is required between hops in line management. However even with such a feature one needs to calculate a fuel cost for ships and planes that is appropiate for the speed they run at. If a correct physics model is not used, one which energy used can be metered, then one would need to work out a mathematical model for each plane and boat to come up with reasonable fuel consumption estimates per km travelled.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18026
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Pak128 Britian Extended Vehicle Balance.
« Reply #20 on: June 30, 2018, 10:38:53 AM »
I have been wondering about a speed cap feature: that should not in itself be excessively complicated to implement. However, one significant problem of a speed cap feature and also a weight dependent running costs feature is how to communicate the running costs to the player when the formula for calculating them is very complex. Have you any idea of a sensible and clear way of explaining these running costs in the user interface (and also of researching the relevant running costs for ships)?

For aircraft, fuel consumption is often available as an hourly rate based on that aircraft's standard cruising speed. I have not found any more in-depth data than that. One of the difficulties of making the formula for calculating fuel costs more complex is that one needs more detailed research data, which are not always available. Certainly, so far as I can tell, for aircraft they are not readily available. Would it not be better to have ships' and aircraft's maximum speed to be their normal cruising speed and calculate fuel consumption on the assumption that they are travelling at this rate? Aircraft circling at airports already have a feature to reduce their per km cost on account of their lower speed in this situation.

For steam engines, my calculations in the spreadsheet (the correct name of which is steam-physics-calc.ods - the previous file name was given from memory) give the kilograms of fuel consumed per hour per square foot of firegrate area, the calorific value of the fuel, the thermal efficiency of the locomotive and the resulting power. There are actually two ways in which the calculations are done: for the rows highlighted in yellow, these are calibrated engines, where the thermal efficiency is calculated backwards from the power, and the power is set by testing in-game performance against recorded real world performance (adjusting for gradients using a formula where necessary). The white rows are non-calibrated engines, whose efficiency is supplied manually based on a reasonable guess as to the efficiency of a locomotive of that sort in the relevant era and taking into account any reports about what is known about the locomotive and whose power is calculated from the efficiency and from the calorific value of the sort of coal known to be used by the railway company for which it worked. Neither of those calculations rely on making any assumptions about speed.

Assumptions about speed would be necessary for converting the data currently in this spreadsheet into a range or fuel consumption per kilometre, however. The original plan was to do this on the basis of an assumed average speed as a fraction of the multiple speed (perhaps 2/3rds). Do your calculations suggest that the actual average speed of trains varies so much that this would create real economic distortions in the game? If so, I should be interested to see these calculations.

Another thing to bear in mind if one has a non-fixed fuel consumption per kilometre is that not only will the running costs vary with this, but so will the range of those vehicles whose maximum range is determined by fuel capacity (e.g. aircraft and steam locomotives - but not, e.g. horses). This would require a whole other layer of complexity.

Given the intractable complexity of varying per km fuel consumption, do we perhaps need to do some modelling to calculate the real significance of this in an in-game setting to determine whether this is necessary, and, if it is, precisely how much depth is required for this?

Offline DrSuperGood

  • Dev Team
  • Devotee
  • *
  • Posts: 2547
  • Languages: EN
Re: Pak128 Britian Extended Vehicle Balance.
« Reply #21 on: June 30, 2018, 03:22:45 PM »
Quote
I have been wondering about a speed cap feature: that should not in itself be excessively complicated to implement. However, one significant problem of a speed cap feature and also a weight dependent running costs feature is how to communicate the running costs to the player when the formula for calculating them is very complex. Have you any idea of a sensible and clear way of explaining these running costs in the user interface (and also of researching the relevant running costs for ships)?
How are they done in real life? The idea would be to give a player a fuel expenditure estimate in the form of currency. This estimate need not be perfect, even in real life they never are, but close enough so that a player can see that running his trains 10km/h slower top speed might save him about X currency. For weight one can factor in fuel weight as well as average freight/passenger weight. This estimate could be shown at a line management level when the player is selecting the vehicles to use for that journey (part of the new recombination system), and also when selecting a vehicle for the current hop. Actual fuel costs could be charged when a train arrives at a stop (refuels) as that would probably simplify calculations no matter how the system is implemented.

Sure if the vehicle gets a passenger spike it might use more fuel than the estimate, but the owner really should not care as more passengers means more revenue. Like wise if there is bad traffic congestion resulting in much reduced economy (breaking is wasted energy for most vehicles) the player would understand that his fuel costs are higher than estimates and would likely try to optimize traffic flow.

In line management one could also show the actual fuel expenditure for a hop. This could be as simple as logging how much over or under the estimate was spent between a particular hop so as to factor in different vehicles servicing the same line. Again this can be calculated at stops, so is processor friendly. This could even be shown as a percentage over/under, which would be enough for a player to notice there might be a problem or maybe a line is running more efficiently than expected.

In real life fuel consumption is often not a direct concern when planing a route. For example trucking some freight between to depots it is unlikely that fuel consumpution was estimated beyond the km distance between the stops and the average km per liter of fuel. When it is calulated, it is usually rule of thumb estimates, often overly cautious. To save on fuel economcy companies generally use rule of thumbs that have been calculated by engineers and accountants. For example they might order their entire shipping fleet to run a few knots lower to save fuel. The amount acutally saved will approximatly be what is expected, but obviously will deviate from the estimates as nothing in the real world is perfect. Exception is aviation industry because fuel is a huge cost and running out of fuel has catostrphic results, there estimates will likely be more accurate and factor in even weather but they still have to run on the side of caution with reasonably excessive fuel.

Quote
For aircraft, fuel consumption is often available as an hourly rate based on that aircraft's standard cruising speed. I have not found any more in-depth data than that. One of the difficulties of making the formula for calculating fuel costs more complex is that one needs more detailed research data, which are not always available. Certainly, so far as I can tell, for aircraft they are not readily available. Would it not be better to have ships' and aircraft's maximum speed to be their normal cruising speed and calculate fuel consumption on the assumption that they are travelling at this rate? Aircraft circling at airports already have a feature to reduce their per km cost on account of their lower speed in this situation.
Problem is cruise speed varies based on economics. If fuel is cheap and passengers want to pay a premium to get to their destination then cruise speed is higher. In real life passengers often want to pay as little as they can and fuel is expensive so cruise speeds are lower. The issue is due to air density and weight, since the more dense the air is the larger the drag losses are but the easier it is to keep a heavy plane flying as well as the more efficient the turbo fan jet engines are. Drag losses go up with speed. This is why planes need to fly very high above sea level to achieve such high speeds such as 920 km/h since otherwise the noses and engines of the plane would literally overheat if at sea level due to the drag. However turbo fan engines rely on combustion as well as air flow to provide thrust, and as such the higher the altitude they are operating at the lower their efficiency becomes. Cruise speed is thus determined by cruise altitude which is determined by economics. Many modern planes are capable of cruise speeds much faster than they are operated at.
Quote
give the kilograms of fuel consumed per hour per square foot of firegrate area
That makes a lot more sense now! I thought it was kg per hour in total...

However again this depended on how much work (steam) the locomotive was using. If they were pulling a light train slowly they would not need to burn the maximum fuel to produce the maximum steam. For example if a steam engine was in a station for an extended period it is unlikely much coal had to be shoved in it while parked there. Of course coal has delayed burning so the fireman/men would start shovelling coal in before it departs so the boiler is up to pressure, but that is just how they worked. Additionally some fuel is needed to keep the fire running, a sort of standing loss. In any case even with steam engines there would be economics for running a train slower. This can be as simple as running at a slow speed in crowded track sections where trains often had to stop, something one experiences daily in real life commuter trains.
Quote
Assumptions about speed would be necessary for converting the data currently in this spreadsheet into a range or fuel consumption per kilometre, however. The original plan was to do this on the basis of an assumed average speed as a fraction of the multiple speed (perhaps 2/3rds). Do your calculations suggest that the actual average speed of trains varies so much that this would create real economic distortions in the game? If so, I should be interested to see these calculations.
Trains that ran slower might have a longer range. A train that can go 300km at 100km/h might make 500km at a slower average running speed. This is especially the case with early steam ships as they had poor fuel efficiency and capacities. To be honest I am unsure with steam trains, since drag only becomes a problem at higher speeds so this might not effect early steam trains that much. With ships this happens at a much lower speed due to the density of water. Like wise with aircraft at cruise altitude this happens at a much higher speed due to reduced drag from low density air.
Quote
Another thing to bear in mind if one has a non-fixed fuel consumption per kilometre is that not only will the running costs vary with this, but so will the range of those vehicles whose maximum range is determined by fuel capacity (e.g. aircraft and steam locomotives - but not, e.g. horses). This would require a whole other layer of complexity.
Unlike real life a game can be more forgiving as it is less complex and accurate. As such if loaded fuel estimates and ranges are wrong and result in a vehicle technically running out of fuel on a journey one might overlook it and not punish the player at all next to charging them the extra fuel spent with possibly some penalty percentage.

For some vehicles a speed against range graph could be shown, eg planes. For trains one might also show a weight against range graph for a certain speed (selectable).
Quote
Given the intractable complexity of varying per km fuel consumption, do we perhaps need to do some modelling to calculate the real significance of this in an in-game setting to determine whether this is necessary, and, if it is, precisely how much depth is required for this?
Even if the model ends up not that complex or deep, in any case a better model than currently exists is required for realistic vehicle operation and running costs. To put in in perspective the reason aircraft cruise speed has become slower is it saves the airline companies millions every year, even if the aircraft could cruise much faster at a different altitude by design.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18026
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Pak128 Britian Extended Vehicle Balance.
« Reply #22 on: June 30, 2018, 03:35:54 PM »
The UI suggestions relating to graphs and estimates seem to require a truly gargantuan amount of work for the UI alone - would you be interested in coding this? Any UI elements beyond the very simple are very hard indeed to code in Simutrans because of the nature of the codebase.

I note that you seem content to simplify away range depending on actual speed and work but not per kilometre costs. I am not clear why you are taking a different approach to these things in this instance.

For aircraft, there is very little variation in the speeds at which a given model of aircraft actually routinely cruises. There is a degree of discretion for an airline operator to select a lower cruising speed and save some fuel (as there is for ships), but would it really be a major issue of this choice was made at the pakset design level rather than the player level? I should note that already the aircraft speeds are based on their cruising speeds not their maximum speeds.

In relation to modelling, what I meant was actual calculations based on real life data done now to determine whether the work/speed variance in relation to fuel consumption is significant enough (compared to using an estimated average for each powered vehicle type) to be worth simulating in the game given the amount of additional work that would be involved and therefore the many additional months before this feature would be available. Have you done any calculations of this sort; do you have any data from which such calculations can be made?


Offline Vladki cz

  • Devotee
  • *
  • Posts: 2421
    • My addons, mostly roadsigns
  • Languages: EN, CS
Re: Pak128 Britian Extended Vehicle Balance.
« Reply #23 on: July 02, 2018, 08:52:47 PM »
This seems to be heading for too much complexity. I think before we start touching fuel consumption related stuff, we should first check and fix all other physics related stuff - acceleration, slopes, corners. Especially slopes seem to be a problem at the moment - with some vehicles being underpowered even to climb one level up.

In real life fuel consumption for a trip is estimated by using long time averages (or manufacturer specs). These average numbers should take into account usual cruising speed (for ships and planes), usual weight of cargo, some mix of going uphill and downhill, etc. In all specs I have seen the consumption is in liters / 100 km or liters / hour (or miles / gallon). I have never seen liters / Joule. Well you can find J/kg for different fuels, but that is the heat you get from burning them, not the mechanical work you get by using the fuel in engine. I don't think that the efficiency ratio for different vehicles would be easy to find. Maybe some approximate values for certain types of engines, but those would be very broad ranges. Efficiency also varies with RPM of engine.

Even if you would be able to find those values, it would be very confusing for players. Now we have two easy numbers: $/km, $/month. For full physics we would have:
$/kg (or liter) of fuel, J/kg of fuel, efficiency % of engine - well this can be put together to get $/J.
And how is a player supposed to calculate the $/km ?
Take into account weight of the train, energy needed to accelerate to full speed, friction (at varying speeds), distance.
You have to check how often it has to slow down and accelerate again due to corners, and how much it goes up or down hill.
Also how much fuel it uses while running idle (loading cargo).
All this can't be calculated before the engine is bought. One has to assemble the train, and set up schedule. Only then we can calculate price of each hop of the route.

If this complex model is ever implemented, I would suggest that each convoy, would have it's own counter for fuel consumption, so that player could make estimates based on really measured values.
And the depot window should show approximate value taken either from real world specs (for common cruising speeds/altitudes, usual length/weight of train, excluding special record setting events, etc), or values obtained by playing the game.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18026
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Pak128 Britian Extended Vehicle Balance.
« Reply #24 on: July 02, 2018, 10:32:11 PM »
Vladki has a point that a fuel consumption based system is likely to be difficult for players to understand and engage with - this is why we need to undertake modelling to check whether it is strictly necessary if we are to have a workable balancing system using real life numbers or whether using (as discussed above) an average speed would be close enough to suffice.

Offline DrSuperGood

  • Dev Team
  • Devotee
  • *
  • Posts: 2547
  • Languages: EN
Re: Pak128 Britian Extended Vehicle Balance.
« Reply #25 on: July 02, 2018, 11:14:47 PM »
Quote
I have never seen liters / Joule.
This is covered by chemistry.
Quote
but that is the heat you get from burning them, not the mechanical work you get by using the fuel in engine
That is covered by engine efficiency.
Quote
Efficiency also varies with RPM of engine.
Which is why gearboxes are used, to try and keep the RPM of an engine within its optimum range.
Quote
And how is a player supposed to calculate the $/km ?
They are not. The game should give them an estimate which is reasonably accurate.

The problem with per km costs is it does not factor in the actual amount of work done. A fast powerful train pulling a lot of coaches might move very slowly but it is doing the same amount of work as if the train was pulling few coaches very fast. A more accurate measurement would be cost per hour since then a slow train or fast train using the same power will result in the same cost. However this is not accurate itself since if the train is not using all its power then it should not be billed as using all its power, as would be the case of a powerful locomotive pulling a few coaches slowly. Fuel can also be saved by running trains slower than their designed speed, eg making sure they do not exceed the minimum speed maximum of trains traveling the same congested line.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18026
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Pak128 Britian Extended Vehicle Balance.
« Reply #26 on: July 02, 2018, 11:30:53 PM »
Dr. Supergood - do you have any data as to the variation in fuel consumption per kilometre for, say, railway locomotives for the purpose of modelling?

Offline DrSuperGood

  • Dev Team
  • Devotee
  • *
  • Posts: 2547
  • Languages: EN
Re: Pak128 Britian Extended Vehicle Balance.
« Reply #27 on: July 03, 2018, 07:43:07 AM »
This article covers many points relating to energy efficiency. It includes mentioning that drag on aircraft is directly proportional to weight (due to converting forward motion into vertical lift to keep the plane from falling) and hence weight is directly proportional to fuel consumption with aircraft. It also covers that one of the biggest energy expenditures on urban railway lines is breaking, being as much as over 40% of the total energy usage. It also mentions the energy of different fuel sources. Also mentions that train fuel economy can vary greatly between different stretches of the same route.
https://en.wikipedia.org/wiki/Energy_efficiency_in_transport

Here is a paper which covers efficiency related concepts specifically for trains. In the section of Dynamic train movement a simulated train was used to demonstrate how energy consumption for the same journey varied with both train weight and train speed. It is worth noting that due to the higher loadings in the simulation, the train velocity decreased which itself raises energy efficiency, hence why it looks like heavily loading the trains becomes increasingly more energy efficient. A second graph goes on to show the effect of maximum driving speed on energy consumption by keeping the weight of the simulated train constant. A section also discusses fuel cost implications. A table shows that in their simulation of 20km at a 2% gradient moving 100t cost 14€ of energy while 2,000t cost 120€ of energy. It also makes mention that energy is a huge cost, often greatly exceeding the cost of line rental for a distance on a real network.
https://hrcak.srce.hr/file/122021

How one could model this I am not sure. One could try pre computing efficiency metrics for each hop of a line using some kind of simulation model. One could also try using a physics system and metering the energy used. In any case in real life this stuff does make a big impact to economics.

As far as player usability goes it would likely be similar to real life energy efficiency, often after thought or something that occurs towards modern times. If a player is noticing huge expenditure on energy they might look to optimize energy efficiency such as lowering the maximum speed on low traffic lines or decoupling coaches that often sit mostly empty. As fuel costs rise towards modern times the player would have to increasingly look to save energy, including removal of inefficient rolling stock, flattening/straightening of lines, optimizing signals, lowering maximum speeds, etc.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18026
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Pak128 Britian Extended Vehicle Balance.
« Reply #28 on: July 03, 2018, 10:22:56 AM »
What we really need to model is the extent to which fully dynamic fuel efficiency calculation in so far as it can be implemented produces different results in game to static, averaged fuel efficiency per vehicle. For aircraft, for example, one would have to calculate, not only passenger loading, but luggage loading and the fuel weight necessary for the flight, which then reduces during the flight - a fantastically complex thing to calculate in itself. What is really necessary to understand is not whether these things are significant in reality in general, but rather whether they are so significant that it would be impossible to have any workable balancing using (averaged) real life figures without using dynamic rather than static fuel efficiency computation.

There is a difference between the game being simplified and not fully simulating some real-world dynamics such as varying fuel consumption, but being accurately balanced within those simplified parameters, and the game being unbalancable (or only balancable in a way that means that, even within the simplified range of things simulated, the optimum thing to do is often significantly different in game than it would be in reality) because of not simulating those additional dynamics. It is necessary to discern which is the case before progressing with balancing features.

It is not immediately clear to me precisely how one would go about modelling for this comparison - any thoughts on appropriate formulae/algorithms would be welcome.

Offline DrSuperGood

  • Dev Team
  • Devotee
  • *
  • Posts: 2547
  • Languages: EN
Re: Pak128 Britian Extended Vehicle Balance.
« Reply #29 on: July 03, 2018, 06:05:02 PM »
Quote
What we really need to model is the extent to which fully dynamic fuel efficiency calculation in so far as it can be implemented produces different results in game to static, averaged fuel efficiency per vehicle. For aircraft, for example, one would have to calculate, not only passenger loading, but luggage loading and the fuel weight necessary for the flight, which then reduces during the flight - a fantastically complex thing to calculate in itself. What is really necessary to understand is not whether these things are significant in reality in general, but rather whether they are so significant that it would be impossible to have any workable balancing using (averaged) real life figures without using dynamic rather than static fuel efficiency computation.
With trains it is pretty obvious such a system is required. A train pulling fewer coaches or a lot of empty freight coaches should cost significantly less per km than the same train pulling a lot of coaches or full freight coaches. This is required to give a lot of economic sense behind having smaller trains with fewer coaches.

For example take a bulk train running coal from a mine to a dock along a flat stretch of rail. Currently moving the train costs the same in both directions. In real life it costs considerably more to move the train full of coal to the dock than it does to move the empty train from the dock back to the coal mine.

However coal mines are seldom on a plain, especially in the UK, and hence in real life the mine might be at a considerably higher altitude from the dock. Now in this example the same bulk train is running coal from a mine to a dock downhill. Due to gravity there is a huge energy saving on the previously energy intensive mine to dock route which now might require almost no input power (nearly free) depending on how steep the gradient is. On the other hand the dock to mine journey now requires considerably more energy to cover lugging the empty trucks up the gradient so is more expensive energy wise. However since the empty bulk trucks are only a fraction of the weight of the full bulk trucks the net result of this line configuration is that less energy is needed to move the coal and so considerable amounts of money are saved.

Currently in Simutrans and Extended this is impossible to simulate as the trains cost the same per km irrespective of how much of their power gets used. Trains will also always try to accelerate to the maximum speed they can, even if it does not make them arrive any faster as they are scheduled to run behind slower trains so end up waiting at signals. Now I am not saying that it needs to be simulated every tick with a phsyics model. However some system needs to be in place that allows the player to limit maximum speed and depending on maximum speed and how much weight a train is lugging the running cost of the train goes down.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18026
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Pak128 Britian Extended Vehicle Balance.
« Reply #30 on: July 03, 2018, 10:37:51 PM »
It does not really assist much to state that it is "obvious" or that the difference is "huge". What we need are numbers. In particular, what we need to know is not just whether there is a difference in fuel consumption between running full and empty or running on the level or uphill, but rather whether it will make a significant difference to how the game plays out and what strategy is optimum for the player in all but edge cases if we actually simulate these things dynamically rather than taking an average of level and uphill, loaded and unloaded, etc.. It is this latter aspect that is critical - this is what tells us whether the extra complexity is worthwhile (and also, if it is, in precisely what way and to precisely what extent, so that we can work out what simplifications may be workable in simulating this).

Let us take some specific examples to work with for the purpose of modelling. I suggest that we model three specific examples: (1) a freight train; (2) a passenger train; and (3) a passenger jet airliner.

Starting with the freight train, let us use for these purposes the LNWR DX Goods of 1858 as the locomotive, and imagine that it is hauling 25 wagons of coal (each with an 8t load) with a 7.5t brake van at the end of the train. The tare weight of such a train is 149.5t, and the payload is 200t, making the loaded weight 349.5t. The rolling resistance empty is 0.284kN and full 0.664kN. The locomotive's power is 167kW. My estimate of its thermal efficiency is 3.8%; it burns 31.75kg of coal per hour per square foot of firegrate area to produce the 167kW output, the coal having a calorific value of 8.12 kW/kG. The firegreate area is 17.1 sq. ft., so the total coal consumption is 542.9kg/hour. The train's maximum speed is 56km/h, which, being a slow freight train, it is likely to achieve for perhaps about 80% of its journey. Taking 80% of 56km/h gives us 44.8km/h, which would then be the basis for the average speed for the purpose of fuel consumption calculation for the averaged method. At 44.8km/h and 31.76kg/hour, that gives us 542.9kg/44.8km, or ~12.1kg of coal per km.

Turning to a passenger train, we can start with some real world data reproduced here showing that the LNWR "Precedent" class had an average coal consumption of 33.2lb/mile. This would work out as 16.6kg/mile or 10.4kg/km. It is instructive to compare this with the extrapolated figures for this class of locomotive. This locomotive has a power of 204kw and I have estimated a thermal efficiency of 4.5%. It is estimated to have consumed 32.75kg of coal per square foot of firegrate area per hour, and has a firegrate area of 17.1 square feet, giving a total hourly consumption of 560kg/hour of coal. The locomotive's maximum speed is 130km/h, but it is unlikely to sustain this for long in practice, so I will estimate an average speed of 65km/h (half the maximum speed). At this speed, 560kg of coal would be consumed per 75 km, giving a per km consumption of 8.6kg/km. To get 10.4kg/km as from the historical data, the average speed would have to be estimated at about 54km/h. (This might be a good way of calibrating the average speed if we were to do it in this way).

As for a passenger aircraft, we will take the example of the Boeing 707. According to this source, this used approximately 1,200 gallons of fuel per hour, or 4,542l per hour. The Boeing 707-120 has a capacity of 137 passengers in ordinary configuration. Its tare weight is 84t and its loaded weight is 93.59t. It is given a power of 43,200kW and has a range of 5,037km. Its maximum speed in game (i.e., its deemed cruising speed) is 885km/h. At this speed, it will burn 4,524l of fuel per km, equivalent to 5.11l of fuel per km.

The above are all calculations based on the averaging method that I was planning to use (the final step, omitted here, being to convert the per km fuel consumption figures into per km costs using historical pricing data for the relevant fuel types).

Can you set out some specific worked examples (with figures as above), being not edge cases, for these three vehicle sets in which a dynamic system would make a real difference to the actual average per km cost paid by players in different situations, each realistically likely to occur in game, such that these differences would not simply be irrelevant by virtue of being averaged out over time and that players would have a real incentive to make substantially different choices in a dynamic than an averaged static system?

Offline DrSuperGood

  • Dev Team
  • Devotee
  • *
  • Posts: 2547
  • Languages: EN
Re: Pak128 Britian Extended Vehicle Balance.
« Reply #31 on: July 05, 2018, 02:39:20 PM »
I am having trouble coming up with the needed examples. With aircraft it seems that there can be around 10-15% variances in fuel cost with range and like wise with weight however I cannot easilly find a mathematical model for this that would fit with your example aircraft (the one shown was for a different model of aircraft).

Quote
My estimate of its thermal efficiency is 3.8%; it burns 31.75kg of coal per hour per square foot of firegrate area to produce the 167kW output, the coal having a calorific value of 8.12 kW/kG. The firegreate area is 17.1 sq. ft., so the total coal consumption is 542.9kg/hour.
I am a bit unsure of how you came up with "31.75kg of coal per hour per square foot of firegrate area". I would imagine the amount of coal one needed to burn was based on how much work the train had to do. I recall hearing that firemen would have to shovel in extra coal in the run up to a hill to make sure there was enough steam to climb it. Sure that would define the maximum power of the steam engine, but not how much fuel it is burning unless you assume all power is being used.

Now be aware I did not do advanced physics so what I am about to say might not be correct...

For simplicity sake let us say this train runs at 44.8km/h along a 44.8km stretch and ignore acceleration/deceleration losses (more important with commuter services, probably trivial for a freight train). This means that time is 1 hour (3600 seconds).

Rolling resistances...
Loaded -> 664N
Unloaded -> 284N

The total work done...
Loaded -> 664N  * 44,800m = 29,747,200J
Unloaded -> 284N  * 44,800m = 12,723,200J

This means that the power used to move the train during that time is...
Loaded -> 29,747,200J / 3,600s = 8,263W = 8.3kW
Unloaded -> 12,723,200J / 3,600s = 3,534W = 3.5kW

Something looks very wrong with these values, they are so small that a tiny 20kW train train could manage it. You did say rolling resistance so I am guessing this does not factor in aerodynamic drag, another huge loss for trains. As this train is slow it should not be that much, but who knows...

The density of air at sea level is 1.2kg/m3 according to wikipedia. UK being an island with trains often running near sea level means this is reasonable. The velocity is 44.8km/h, as mentioned above, which is ~12.4m/s. I cannot find a decent drag coefficient for an old steam powered freight train however some site state that a "passenger train" is 1.8 and a "Rectangual box" is  2.1 so 2.5 seems a good estimate to factor in the complex shape of a steam engine and rough surface of open coal trucks. Apparently for frontal surface area a value of 10m2 is commonly used for trains, so lets go with that.

Drag Force -> (1/2) * 1.2kg/m3 * 12.4 ^ 2 * 2.5 * 10m2 = 2,306N

This is considerably larger than the rolling resistance, not something we can ignore.

The total work done...
Loaded -> (2,306N + 664N)  * 44,800m = 133,056,000J
Unloaded -> (2,306N + 284N)  * 44,800m = 115,942,400J

This means that the power used to move the train during that time is...
Loaded -> 133,056,000J / 3,600s = 36,960W = 37kW
Unloaded -> 115,942,400J / 3,600s = 32,206W= 32kW

Now this value makes more sense. The empty train will be using 32kW of coal while the full train 37kW of coal.

Since you calculated the 542.9kg/hour to produce 167kW that means the train will consume...
Loaded -> 542.9kg/hour * 37kW / 167kW = 120kg/hour
Unloaded -> 542.9kg/hour * 32kW / 167kW = 104kg/hour

In per km fuel costs...
Loaded -> 120kg/h / 44.8km/h = 2.68kg/km
Unloaded -> 104kg/h / 44.8km/h = 2.32kg/km

Or in savings when moving the empty coal train over the full coal train...
Savings = 1 - 2.32kg/km / 2.68kg/km = 0.134 = 13.4%

Firstly this calculation shows that the train in the given conditions would be using well under half its potential coal consumption since only a small amount of its power is needed to keep the coal trains moving. Secondly it shows that running the empty train is 13.4% cheaper per km than when pulling the full train. It also shows that most of the power is being used to combat airodynamic drag, possibly due to how bad I am at calculating this sort of thing (maybe the number was smaller in real life? or larger?). It is also possible the rolling resistance numbers are wrong, I do not know for sure.

This does sort of make sense. The train only needs most of its power when accelerating or when climbing a hill. There are practical limits to the load it can hall based on these conditions.

Now this does not factor in accelerating the train to 44.8km/h. This uses the trains extra power but is technically an energy cost hence would have a cost in kg of coal associated with it.
Loaded -> 1/2 * 349,500kg * 12.4m/s ^ 2 = 26,869,560J
Unloaded -> 1/2 * 149,500kg * 12.4m/s ^ 2 = 11,493,560J

Assuming 30MJ per kg of coal (https://en.wikipedia.org/wiki/Energy_density) with 3.8% efficiency...
Loaded -> 26,869,560J / 30MJ/kg / 0.038 = 24kg
Unloaded -> 11,493,560J / 30MJ/kg / 0.038 = 10kg

Is this cost significant? it is between 1/10 and 1/5 of an hour of running, more so when loaded than unloaded.

I will look into the second rail example later.
« Last Edit: July 05, 2018, 02:50:57 PM by DrSuperGood »

Offline ACarlotti

  • *
  • Posts: 298
Re: Pak128 Britian Extended Vehicle Balance.
« Reply #32 on: July 05, 2018, 09:33:37 PM »
One brief thing to note is that I believe the physics engine currently uses only the air resistance of the leading vehicle, ignoring any resistance along the side of the train or caused by the gaps between vehicles. While the resistance to the leading vehicle is more significant than that to any other individual vehicle, this does not necessarily mean that subsequent vehicles can be ignored. Indeed, I think over a long container trains the overall effect of subsequent vehicles is rather significant. (I do not have any figures for this right now, but the RAIB report about a wheelchair striking a freight train due to air movement overcoming the brakes comes to mind.)

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18026
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Pak128 Britian Extended Vehicle Balance.
« Reply #33 on: July 07, 2018, 12:15:22 AM »
Dr. Supergood - thank you very much for the calculations. I have not had time to review them in detail as yet, as I have been very busy this week, but some initial thoughts pending your second rail example.

Firstly, I suspect that there is an error somewhere apropos air resistance: between rolling resistance and air resistance, rolling resistance is by far the most significant. Air resistance is trivial at low speeds, and minor at moderate speeds. It is more significant at higher speeds, and significant enough that streamlining makes a difference at >90mph (but below that speed, streamlining has no significant effect in real life). I am not sure where the error is in the calculations (one or more off by orders of magnitude error(s)?) as I did not write the physics code.

Secondly, for the purposes of discerning the economic (rather than purely physical) significance of different fuel consumption rates, we have to compare not just loaded and unloaded fuel consumption, but dynamic calculation of fuel consumption (as you suggest) against static averaging of fuel consumption (as originally planned) to see whether this differs significantly in significant enough ways in enough cases to justify the additional complexity that this would entail. For example, taking your figures of 37kW vs. 32kW (I pause to wonder whether we should really be measuring energy, i.e. kWh, rather than power (kW)) for loaded vs. unloaded, what we need to do is to compare, not 37kW with 32kW, but rather the average of the two, 34.5kW being applied at all times as against the figure being calculated dynamically and varying between 37kW and 32kW.

Of course, on a flat journey, this would make no difference at all: the loaded trip in one direction would consume 37kW and the unloaded trip 32kW, and the two would average out to 34.5kW, which would be exactly the same result as if the average 34.5kW had been applied to both trips individually. One case that you mentioned where this might make a difference is with a heavy freight load that is higher in altitude than its destination. This is indeed the case, but I am doubtful as to the actual significance of this in gameplay terms, both in terms of the magnitude of the numerical significance and the frequency with which it is likely to be encountered in game. The pakset will have to be balanced so that flat journeys make a profit in any event, so it it really important that players would not be able to make extra profit from a downhill run?

Another perhaps more significant consequence might be that players have more disincentive than they would have in reality to use more powerful vehicles where less powerful vehicles would do; but I am still not sure of the real practical significance of this in magnitude terms, nor whether a simple dynamic power calculation would get this right: after all, players should not have an incentive (as they do in Standard often) to use the most powerful vehicles for everything.

A. Carlotti - as to side drag: this is an interesting thought. I did not write the physics code, and given its complexity and my lack of knowledge of the details of physics, I should be reluctant to change it; I also do not know any figures for calculating side drag so as to be able to modify the code even if i were inclined to do so.

Offline ACarlotti

  • *
  • Posts: 298
Re: Pak128 Britian Extended Vehicle Balance.
« Reply #34 on: July 07, 2018, 04:21:15 AM »
I think it is currently impossible to produce accurate (or close to accurate) running costs for all four combinations of:
1. A diesel locomotive with high energy costs
2. An electric locomotive with low energy costs
and:
a. A short train of (say) 2 coal wagons
b. A long train of (say) 20 coal waggons

Clearly replacing 1b with 2b should lead to a greater reduction in running costs than replacing 1a with 2a, but at present these two replacements cannot produce different reductions in costs.

So this suggests that some account of actual energy consumption is needed in the long run.

A. Carlotti - as to side drag: this is an interesting thought. I did not write the physics code, and given its complexity and my lack of knowledge of the details of physics, I should be reluctant to change it; I also do not know any figures for calculating side drag so as to be able to modify the code even if i were inclined to do so.
I think I would feel comfortable working on this at some point in the future, but I would anticipate this being multiple years away given my other priorities.