The International Simutrans Forum

 

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

0 Members and 1 Guest are viewing this topic.

Offline DrSuperGood

  • Dev Team
  • Devotee
  • *
  • Posts: 2524
  • Languages: EN
Re: Pak128 Britian Extended Vehicle Balance.
« Reply #35 on: July 07, 2018, 07:08:03 AM »
Quote
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.
I suspect the value you provided for rolling resistance is incorrect. Possibly it excluded the rolling resistance of the steam engine which would be higher per ton than the coaches due to pistons and levers being attached to the wheels.

Even at 44.8km/h air drag starts to become significant if you are moving a box at those speeds, which might actually be more aerodynamic than a steam engine due to all the discontinuities on the surface as well as strange protruding shapes. Sure the calculations might not be completely accurate, I have a feeling 10m2 might be too large for the front cross section of a steam engine. At 89.6km/h drag is 4 times as much as at 44.8km/h and the power needed to overcome drag is 8 times as much. Hence the values do seem kind of reasonable.

I think all the "but below that speed, streamlining has no significant effect in real life" talk refers to everything now days being streamlined in the first place and hence below those speeds the drag is minimal that improving streamlining further has limited effect. Some modern cars have a drag coefficient of ~0.25 with tiny front cross section, where as something like a steam train would be ~2 (this might be wrong) with a much larger front cross section. This means that for a car the drag forces at 44.8km/h are insignificant where as for the steam train they are considerably more significant.
Quote
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.
This has nothing to do with the physics code. I literally went to Wikipedia and read up all the formula. The formula states that for a doubling in speed the force exerted by drag increases by 4 times and the power required to overcome drag by 8 times.

https://en.wikipedia.org/wiki/Drag_equation

Quote
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.
Problem is that the average could vary in so many ways... Raising the speed of the train would raise the average due to additional drag. Adding more coaches would raise the average due to additional rolling resistance. Using a vehicle with a better drag coefficient, eg, a smaller steam engine, might lower the average due to less drag losses.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 17765
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Pak128 Britian Extended Vehicle Balance.
« Reply #36 on: July 07, 2018, 12:22:13 PM »
I think all the "but below that speed, streamlining has no significant effect in real life" talk refers to everything now days being streamlined in the first place and hence below those speeds the drag is minimal that improving streamlining further has limited effect.

No, I recall reading this in relation specifically to steam engines: this is why so few steam engines were ever streamlined: it made virtually no difference to the speeds at which all but the fastest steam engines would ever run.

Quote
Problem is that the average could vary in so many ways... Raising the speed of the train would raise the average due to additional drag. Adding more coaches would raise the average due to additional rolling resistance. Using a vehicle with a better drag coefficient, eg, a smaller steam engine, might lower the average due to less drag losses.

And this is precisely what needs accurate calculation: we need to know, empirically and numerically, whether the difference in the average for fuel consumption differs sufficiently to make a real difference to what players have an incentive to do in enough different situations that are realistically likely to arise to make the enormous extra complexity of dynamic calculation of fuel consumption and consequent delay of many months or even years in the code being balance ready worthwhile.

Offline Vladki cz

  • Devotee
  • *
  • Posts: 2348
    • My addons, mostly roadsigns
  • Languages: EN, CS
Re: Pak128 Britian Extended Vehicle Balance.
« Reply #37 on: July 08, 2018, 08:19:42 PM »
I'd like to confirm, that the current code in simutrans for air friction uses only the first vehicles values.

And I must confess personally, that standing at a platform 1-2 m from the edge while a fast (160 km/h) train is passing by is not a good idea. However I spoke to a guy who works near the tracks, and said that there is huge difference in the blow between non-streamlined engines (boxy shape), and streamlined (pendolino and similar). But the biggest blow was from the engine, the rest of the train made much less turbulence.

Offline DrSuperGood

  • Dev Team
  • Devotee
  • *
  • Posts: 2524
  • Languages: EN
Re: Pak128 Britian Extended Vehicle Balance.
« Reply #38 on: July 09, 2018, 02:47:35 PM »
Quote
And I must confess personally, that standing at a platform 1-2 m from the edge while a fast (160 km/h) train is passing by is not a good idea. However I spoke to a guy who works near the tracks, and said that there is huge difference in the blow between non-streamlined engines (boxy shape), and streamlined (pendolino and similar). But the biggest blow was from the engine, the rest of the train made much less turbulence.
This is because the front shape causes most of the air displacement and hence most of the drag. The rest of the train is directly behind the front of the train so rides in the displacement it made so produces little drag.

That said train length does increase drag in the form of turbulance between coaches and surface friction of the sides of the coaches rubbing the air. This is most noticable with long mixed freight trains where the height of the freight coaches might vary such that the displacement fades away between them. Yes there are real life energy savings to be had by correctly ordering your freight so that similar height coaches are next to each other and ordering them from tallest in the front to shortest in the back.

Drag forces occur at every speed. Even at low speeds one can still have savings by reducing the drag coefficient. Just at very low speeds the power required is so low it can be considered trivial compared to other losses. For example a human has a drag coefficient of around 2, making us not much more aerodynamic than a box. However at common walking speeds of 5 km/h with the small front cross section of a human the result is minimal drag loss, so small one will not even notice it. However start to ski or cycle around and these drag losses are huge, so large that professional athletes have to adopt special poses and wear special clothing to reduce their drag coefficient. Let us not even talk about swimming and how bad the human body is at doing it due to this...

44.8km/h is not slow. The same shape moving at 89.6km/h would have 4 times the drag force and at 179.2km/h 16 times the drag force. I know that at 179.2km/h drag is a huge problem for steam engines, hence one can expect it to be 1/16 less of a problem at 44.8km/h.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 17765
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Pak128 Britian Extended Vehicle Balance.
« Reply #39 on: July 09, 2018, 04:27:57 PM »
It would be ideal if we could simulate non-frontal drag; but this is taking us rather a long way from the real issue of this topic, viz. precisely what features are actually necessary for balancing. As to drag generally, I know that Bernd Gabriel did use realistic values for drag (he had initially used too high a value to get realistic acceleration, which caused problems with light, low powered vehicles; we then realised that he had not accounted for transmission losses, so we used the "gear" values to account for these in all but steam engines where power is measured at the drawbar in any event, and then reverted to the realistic drag coefficient values, which we use now); but also that, at lower speeds, drag is relatively trivial. A cyclist will experience significant air drag at 32km/h, but a tram (for example) will have, proportionate to its power and other resistive forces, only relatively minor air drag at the same speed. When the drag coefficient was initially set too high in order to compensate for failing to take account of transmission losses, it was the low powered, light vehicles where this caused problems by making them too slow. A small proportion (the side drag) of a relatively minor part of the overall physics (the air drag) is not likley to make a major difference to the overall balance, certainly not enough to warrant delaying balancing until this can be done or changing what other balancing features are added just to take account of this.

Dr. Supergood - have you completed the aircraft analysis to which you referred above? It will be very interesting to see this, and, in particular, not just the loaded vs. unloaded calculations, but rather the static averaged vs. dynamic fuel consumption calculations. I will in the meantime see if I can find any historical sources on practical variance in fuel consumption, although what I have seen so far has strongly tended to be averaged fuel consumption for rail vehicles in particular (see the "snippet of relative pricing information" thread for the details of this that I have digested from various sources).

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 17765
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Pak128 Britian Extended Vehicle Balance.
« Reply #40 on: July 09, 2018, 09:24:17 PM »
Some more thoughts of a miscellaneous nature. Firstly, average speeds: in this post, I set out average fuel consumption for some 19th century steam locomotives and calculated that, for the LNWR Precedent class, the average speed would have to be in the region of 54km/h to match the calculated/extrapolated fuel consumption/power/thermal efficiency figures.
Looking at actual average speeds for trains in game: in a saved game from 1860 (from the Bridgewater-Brunel server), average speeds for passenger trains ranged from 35-58km/h, with most in the 40-50km/h range. Only Dr. Supergood's express trains with the LNWR "extra large bloomer" locomotives exceeded an average of ~52km/h.

By 1904 (the current date for the server game), train average speeds have increased, but not by a great deal: now, they are mostly between 50-60km/h, with extremes at 25km/h for urban rail and 67km/h for express trains (e.g. Bay Transport's Northern Frontier Express).




Looking at the "Snippet of relative pricing information" thread, the following posts deal with historical sources showing fuel consumption using either average speeds or giving a simple per kilometre/mile figure without indicating the speed:

https://forum.simutrans.com/index.php/topic,6521.msg85675.html#msg85675
https://forum.simutrans.com/index.php/topic,6521.msg98733.html#msg98733
https://forum.simutrans.com/index.php/topic,6521.msg129252.html#msg129252
https://forum.simutrans.com/index.php/topic,6521.msg147771.html#msg147771
https://forum.simutrans.com/index.php/topic,6521.msg157715.html#msg157715
https://forum.simutrans.com/index.php/topic,6521.msg157721.html#msg157721
https://forum.simutrans.com/index.php/topic,6521.msg140571.html#msg140571
https://forum.simutrans.com/index.php/topic,6521.msg160790.html#msg160790
https://forum.simutrans.com/index.php/topic,6521.msg166768.html#msg166768
https://forum.simutrans.com/index.php/topic,6521.msg169046.html#msg169046

The following posts give some indication of the fuel consumption per unit of power (but this might simply be extrapolated from coal usage at an average speed)
https://forum.simutrans.com/index.php/topic,6521.msg85675.html#msg85675
https://forum.simutrans.com/index.php/topic,6521.msg113258.html#msg113258
The following posts give some indication of dynamic fuel consumption
https://forum.simutrans.com/index.php/topic,6521.msg151288.html#msg151288 (aircraft)

(Incidentally, this post gives at least one source for the amount of coal burnt per square foot of firegrate per hour on a steam locomotive).

Thus, there is far more information available regarding averaged fuel consumption than dynamic fuel consumption. Using a dynamic fuel consumption model therefore requires a known accurate means of extrapolating from the static, averaged figures that we have which is also sufficiently simple to implement to be workable.


In relation to implementation of a dynamic system, if this should prove necessary, one possible way of doing this is to assume that a vehicle is using its full power and thus maximum fuel consumption whenever it is accelerating or travelling at a speed limited by its power, and calculate a percentage of currently used power (and therefore fuel) when it is travelling at a speed limited by something other than its power (the convoy's or the way's speed limit, signals, etc.). This percentage could be displayed simply to the player and the player could therefore easily understand how much power is being used.
However, there are some serious issues that need to be considered before even this scheme can be implemented (if indeed it can). Firstly, there is the question of how to calculate this. I have no idea what the formula should be, save that increasing power increases with the square of increasing speed. The physics engine is quite computationally intensive because it uses a fixed point system implemented using integral values (because floating point precision cannot be kept in snyc over a network with clients compiled for different platforms). Any per-step calculation involving square roots for all vehicles might significantly harm performance.
Secondly, there is the question of how to get the data for the maximum fuel consumption. As above, almost all the data are for average fuel consumption. There are some data for aircraft's maximum fuel consumption, but road, rail and water vehicles have no equivalent data.

Thirdly, there is the vexed question about what to do about deceleration and idling. If we are modelling actual, dynamic fuel consumption, we have to assume a minimum fuel consumption for when the vehicle is decelerating; but this also requires one to assume that this minimum fuel consumption is maintained when the vehicle is, e.g., stuck behind a signal or in a traffic jam. This is not consistent with the existing per km cost system and so would require further complexity, possibly removing fuel from the per km cost system entirely and making fuel consumption time based - but this would then be far, far more complex to implement (and also harder to explain to the player). This would also make it even harder to get good fuel consumption figures against which to calibrate it, especially for internal combustion engine vehicles whose economy is typically measured in miles per gallon or litres per kilometre.


In any event, I shall look forward in due course to Dr. Suergood's aircraft calculations and any calculations showing whether there is a serious balance difference between static and dynamic calculation of fuel consumption.

Offline ACarlotti

  • *
  • Posts: 244
Re: Pak128 Britian Extended Vehicle Balance.
« Reply #41 on: July 10, 2018, 12:47:11 AM »
It seems to me that the example I gave in this post (with the added proviso that all four trains travel at the same speed for most of their journey) is sufficient to demonstrate a need to charge for fuel consumption (or some equivalent measure).

This could perhaps be as simple as adding a running cost to powered vehicles which is charged proportional to the motive power they apply, although I think it would be more sensible to introduce some of the following sets of variables (many existing variable included for completeness):
Fixed:
  • Monthly Running cost
  • Distance Running cost
  • Weight
And per fuel type (could also be specified once for all types for compatibility):
  • Maximum power
  • Maximum force
  • Minimum power (could be negative for regenerative braking back to grid, or positive to represent an idling engine while decelerating)
  • Fuel cost (per unit of energy)
A separate proposal I think I made elsewhere:
  • Energy buffer capacity (e.g. for battery-fuel hybrids, or to simulate steam locomotives building up energy before a hill, or horses being capable of working harder to climb a short hill
  • Buffer max charge rate
[li]Buffer max power output
[/li][/list]

Fuel weight: Modelling this precisely would probably require a refuelling system to be implemented, but I don't think this is necessary. Even for aircraft, where almost half the gross weight can be fuel on long-haul flights, the extra weight doesn't seem to affect fuel consumption much, based upon this graph for a 777.  Furthermore, I think a realistic refuelling system is incompatible with Simutrans, since most transit vehicles refuel only overnight, or sometimes off-peak, whereas Simutrans has no concept or day/night or peak/off-peak. That's not to say that fuel capacity is unimportant, but it can be mostly simulated using the existing range feature (or perhaps planned maintenance features for something like horses requiring an overnight rest). This does ignore some subtleties such as aircraft having a greater range with a smaller payload, but I don't see any reason to implement that as a feature. This is related to the lack of stabling sidings/depots in Simutrans.

All of the above features, along with an increase in the number of electrification types, are sufficiently interlinked that they should probably all be at least accommodated, if not implemented, in a future modification/reworking of the physics system. They all seem computationally feasible to me (with the probable exception of fuel weight and refuelling); the main issue (as with all things) is having time to develop them.

Offline DrSuperGood

  • Dev Team
  • Devotee
  • *
  • Posts: 2524
  • Languages: EN
Re: Pak128 Britian Extended Vehicle Balance.
« Reply #42 on: July 10, 2018, 07:23:21 AM »
Quote
I have no idea what the formula should be, save that increasing power increases with the square of increasing speed.
Power increases by the cube of increasing speed as covered by the drag formula. This is because the drag force increases by the square of speed but work is force times distance and power is work over time and speed is distance over time. Hence power to overcome drag increases by the cube of speed.

This is why reducing speed even a small amount for both ships and trains can have significant energy savings. This applies to ships especially due to the higher density of water than air so their hulls in the water produce a lot of drag at anything but the lowest speed (why ships are so slow in general and why hovercrafts are so fast).
Quote
Even for aircraft, where almost half the gross weight can be fuel on long-haul flights, the extra weight doesn't seem to affect fuel consumption much, based upon this graph for a 777.
In retrospect I agree. Averaged statistics are probably fine for aircraft. At most a landing/takeoff charge could be added to make short distance flights more or less economical with some types of aircraft to achieve a similar graph shape with averaged values.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 17765
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Pak128 Britian Extended Vehicle Balance.
« Reply #43 on: July 10, 2018, 11:58:28 AM »
Thank you for your thoughts. I can only reply briefly now as I am in a train, but one very significant thing that must be considered is that fuel economy is not constant for any given engine but rather varies with speed and load. A high power engine running at a low load will be less efficient than a high power engine running at a high load or a low power engine running at a low load.

See here for discussion: https://physics.stackexchange.com/questions/195479/engine-fuel-consumption-vs-power

This makes it much harder to produce a satisfactory formula for this,as one cannot simply calculate a single jule per watt figure for each vehicle.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 17765
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Pak128 Britian Extended Vehicle Balance.
« Reply #44 on: July 15, 2018, 10:42:03 AM »
To add to the previous post in a little more detail: given that fuel economy per unit of power output is not consistent at different levels of power output, the only way in which a dynamic system for calculating the contribution of fuel consumption to running costs is likely to be more realistic than a static averaged system (the latter of which would use data from sources that would already have taken into account by averaging the vehicle's differing fuel efficiency at differing levels of power output) is: (1) to have data about the relationship between fuel efficiency, current power output and maximum power output for different sorts of vehicles; (2) develop an algorithm to simulate this relationship which is accurate enough to make the overall fuel consumption significantly more accurate than for a static averaged calculation but fast enough not significantly adversely to affect game performance; and (3) find a clear, simple and precise way of communicating this relationship to the player using the UI.

At present, I do not have any idea as to where even to begin on any of these three things. For (1), which is where one would have to start, one would need to have, at the very least, multiple data points for each of the following types of engine: (1) reciprocating steam engines; (2) reciprocating internal combustion engines; (3) jet engines; and (4) electric motors. Each of those data points would, in turn, comprise a multi-point graph showing the relationship between power output and fuel efficiency at any given level of power output. I am afraid that I have no idea where one can find such data. Does anyone else have any ideas for where such data might be obtained?

The non-constant relationship between fuel efficiency and power output is potentially significant in other ways, too. Given that it appears that the way in which this relationship is non-constant is that (as one might expect) engines with a high maximum power output are considerably less efficient when being used at a low level of power output than engines with a low maximum power output (at least for internal combustion engines and probably also steam engines - it is not clear whether and if so to what extent his applies to electric motors), a static, averaged system is likely to be less wrong than it would be if this relationship were constant. Importantly, an algorithm that assumes a constant relationship would not give players any incentive to use lower powered vehicles where the higher degree of power is not necessary, whereas both the dynamic system with the dynamic efficiency to power ratio and the static averaged system would give players such an incentive. This is of particular importance, since, without such an incentive, vehicle choice becomes far less meaningful, and whole swathes of lower powered vehicles become more or less useless, which is the exact opposite of the purpose of Simutrans-Extended. Thus, for practical purposes, a dynamic system that assumes a static relationship between power output relative to the maximum and fuel efficiency is likely to be more wrong than a static averaged system. Only a double dynamic system (one that both changes both fuel consumption and fuel efficiency with power output) is likely to be better than a static averaged system.

The bottom line seems to be this: unless there are people able and willing to assist with both data and algorithm, I do not think that a dynamic model is feasible, as an overly simplistic dynamic model is likely to be worse than a static model, and one that is not overly simplistic is likely to be very, very complex indeed and require extensive research data which are very hard to obtain. Is anyone in a position to assist with this?

Offline DrSuperGood

  • Dev Team
  • Devotee
  • *
  • Posts: 2524
  • Languages: EN
Re: Pak128 Britian Extended Vehicle Balance.
« Reply #45 on: July 15, 2018, 07:24:25 PM »
There are different tiers simulation to consider. At present I would say using averaged efficiency with dynamic power. This would still mean that moving an empty freight train or a train with few coaches saves over a full freight train or one with many coaches. Like wise lower speeds would give savings due to less drag than higher speeds. It would also remain simple enough to calculate in real time I hope because the maths involved for energy efficiency with speed often become quite complex and use non trivial functions. There may be cases where running very slowly is too economical as a result, however one must remember that a competitor just has to run slightly faster and the line loses all business so in practice I do not see it being abused that much out of desperate or miser people. Running fast will never be too economical due to drag, even if in real life the engine is more efficient than it should be at those speeds.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 17765
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Pak128 Britian Extended Vehicle Balance.
« Reply #46 on: July 15, 2018, 11:03:00 PM »
There are different tiers simulation to consider. At present I would say using averaged efficiency with dynamic power. This would still mean that moving an empty freight train or a train with few coaches saves over a full freight train or one with many coaches. Like wise lower speeds would give savings due to less drag than higher speeds. It would also remain simple enough to calculate in real time I hope because the maths involved for energy efficiency with speed often become quite complex and use non trivial functions. There may be cases where running very slowly is too economical as a result, however one must remember that a competitor just has to run slightly faster and the line loses all business so in practice I do not see it being abused that much out of desperate or miser people. Running fast will never be too economical due to drag, even if in real life the engine is more efficient than it should be at those speeds.

As explained in the previous post, single dynamic fuel consumption is likely to produce a worse (or, at best, equally bad) degree of realism than static averaged fuel consumption in terms of what players actually have an incentive to do. For the reasons already given, only double dynamic fuel consumption is likely to give any improvement in realism (so far as player incentives are concerned, which is the important thing to consider) over static averaged fuel consumption.

Offline ACarlotti

  • *
  • Posts: 244
Re: Pak128 Britian Extended Vehicle Balance.
« Reply #47 on: July 16, 2018, 12:07:27 AM »
Have you taken into account that higher monthly or distance-based maintenance (/staffing) costs, higher weight and higher rolling resistance will also tend to penalise using an overpowered vehicle?

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 17765
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Pak128 Britian Extended Vehicle Balance.
« Reply #48 on: July 16, 2018, 12:46:38 AM »
I doubt that a higher powered vehicle would need more staff than a lower powered vehicle: a steam engine of any size still needs just one driver and one fireman; a huge articulated lorry needs the same number of drivers as a van; a large double decker 'bus needs the same number of drivers as a small single decker 'bus (there were some differences with very small minibuses which could be driven by people with van licences at one point, but that does not scale with power). Higher weight may be significant in some cases, but may well not be particularly significant in others (and weight will certainly not scale in a linear fashion with power in any event), and of course, a higher powered vehicle would almost always have a better power to weight ratio than a lower powered vehicle or else it would be of no use at all compared to the lower powered vehicle. Aside from higher weight, it is not clear why more powerful vehicles are likely to have higher rolling resistance.

The only real co-acting incentives against using higher powered vehicles where lower powered vehicles would suffice are weight and capital cost (and the latter more importantly than the former); but I am doubtful that these will produce the same incentive patterns in practice as a system involving more accurate fuel efficiency.

It really does not seem likely that a singly dynamic fuel consumption system will be any more accurate than a static averaged system (although of course we have not tested this empirically; but I am not sure that we have the data with which to do so at this stage; does anyone have any data with which this can be tested? The trouble is, of course, that the very data necessary for this testing are the same data as we would need to implement the doubly dynamic system in the first place).

Offline DrSuperGood

  • Dev Team
  • Devotee
  • *
  • Posts: 2524
  • Languages: EN
Re: Pak128 Britian Extended Vehicle Balance.
« Reply #49 on: July 16, 2018, 05:51:06 AM »
Quote
a steam engine of any size still needs just one driver and one fireman
The late stage steam engines I thought required at least 2 firemen at any given time, with express services like the Mallard requiring replacement firemen on standby (4-6 firemen in teams of 2 swapped out using a corrodor tender). This is because a fireman can only shovel so much coal per hour for so long. Now if the standby firemen should be getting paid when not shovelling coal is another question.

Replacement firemen were also parked at stops along the way for some stopping express services. As such even if only 1-2 firemen were on the locomotive at any given time, one might still need many more employed to man the engine with them being swapped out at stops.

Obviously staff management and swapping is an extremely complex system. As such having averages might be better. For sure more powerful steam locomotives would average more staff to run.
Quote
a higher powered vehicle would almost always have a better power to weight ratio than a lower powered vehicle or else it would be of no use at all compared to the lower powered vehicle
Not true at all. Power to weight ratio has to do with performance, a metric only cared about when speed is critical such as motor racing or express services. What drives the use of large vehicles is efficiency, the cost per ton per km hauled.
Quote
Aside from higher weight, it is not clear why more powerful vehicles are likely to have higher rolling resistance.
Depends on type of vehicle. In the case of road vehicles the rolling resistance is not linear with weight as more weight causes the tires to deform more and hence generate more rolling resistance when moving along the road than stiff wheels like rails will.

Mostly larger vehicles are more efficient from a drag loss point of view. This is why it is a lot more economical to move long coal trains rather than short coal trains even though rolling resistance loses are less with short coal trains. Exception is with aircraft where on top of normal drag losses they are also subject to parasitic drag to generate lift force, in which case weight efficiency is a major design consideration.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 17765
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Pak128 Britian Extended Vehicle Balance.
« Reply #50 on: July 16, 2018, 10:11:54 AM »
The late stage steam engines I thought required at least 2 firemen at any given time, with express services like the Mallard requiring replacement firemen on standby (4-6 firemen in teams of 2 swapped out using a corrodor tender). This is because a fireman can only shovel so much coal per hour for so long. Now if the standby firemen should be getting paid when not shovelling coal is another question.

Only two classes of locomotives, both on the same railway (the LNER) were ever fitted with corridor tenders: the A3 and A4 class. Those locomotives hauled very long distance expresses between London and Edinburgh, some of them with few or no stops. The journey would take in excess of a working day, and therefore both driver and fireman would be changed using the corridor tender. No other railway in the UK ever used corridor tenders.

Quote
Replacement firemen were also parked at stops along the way for some stopping express services. As such even if only 1-2 firemen were on the locomotive at any given time, one might still need many more employed to man the engine with them being swapped out at stops. Obviously staff management and swapping is an extremely complex system. As such having averages might be better. For sure more powerful steam locomotives would average more staff to run.

I am not aware of any situation in which, in the UK, the fireman was changed when the driver was not changed. Do you have any sources for this? (Changing both crew was fairly common on longer runs, of course).

Quote
Not true at all. Power to weight ratio has to do with performance, a metric only cared about when speed is critical such as motor racing or express services. What drives the use of large vehicles is efficiency, the cost per ton per km hauled.

Do you have any significant examples of where the power to weight ratio declined with increasing power for land vehicles?

Quote
Depends on type of vehicle. In the case of road vehicles the rolling resistance is not linear with weight as more weight causes the tires to deform more and hence generate more rolling resistance when moving along the road than stiff wheels like rails will.

Surely heavier road vehicles would just have higher pressure tyres?



The idea of dynamic fuel consumption requires very great complexity and additional time. In order to make the degree of sacrifices necessary to implement this, I need to have a high degree of confidence that this will be significantly better than a static averaged system in terms of how the game plays in practice (i.e., player incentives in non-edge cases). It is not at all clear at present (and, indeed, it seems from what I have found so far unlikely) that this will be the case unless the fuel efficiency be dynamic as well as the fuel consumption.

This source gives some indication of the relationship between load and power consumption for internal combustion engined road vehicles; I have great doubt that we will find anything for steam engines, although I suspect that the graph is most similar to the diesel engines given, as the fire would have to be "forced" to produce maximum power output, resulting in much unburnt material being ejected through the chimney. I do not know the position for electric motors. Information on the relationship for electric motors can be found here. If anyone can come up with a workable algorithm to use the information in this graph in a way that interacts with the variables that we already have in the Simutrans engine, that would be most useful.

As I think that I have indicated above, the only way that I can think of making dynamic fuel consumption workable is by making fuel consumption time based rather than distance based, as we then have to take into account idle loads. We would then have to take account of the fact that some engines can be switched off in some cases of sufficiently long stops (giving a zero idle load), and that others cannot. We would also have to take into account the fact that for some vehicles (such as horses), their food consumption would not vary much with load (perhaps that could be simulated with a very high idle load - an animal's resting metabolic activity is far greater than the difference between resting and exercising metabolic activity). We would then have to come up with a way of converting miles per gallon and equivalent distance based fuel consumption data into time based data. We can probably do this for aircraft without much difficulty as we have hourly fuel flow figures for many aircraft, and we can do this for steam engines as we have hourly coal burn statistics already, but I do not know how we could do this for road vehicles.

If anyone can think of a means of overcoming all of these challenges, I should be very grateful to know.

Edit: I think that I have mentioned this briefly above, it it is worth making clear here: if we do not get the dynamic relationship between power output and efficiency right, then the average fuel consumption actually experienced by players in the game is likely to be significantly wrong. A static, averaged system will already have taken the dynamic relationship between power output and energy efficiency into account in giving the averages. Thus, this is another reason that the only real options are either double dynamic energy costs or static, averaged energy costs.
« Last Edit: July 16, 2018, 12:59:16 PM by jamespetts »

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 17765
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Pak128 Britian Extended Vehicle Balance.
« Reply #51 on: August 06, 2018, 08:10:08 PM »
The time to resume work on the vehicle maintenance features is now approaching, but it is necessary to reach a final resolution on this issue before it does.

So far as I can discern from the discussion so far, the position is that, whilst fully dynamic fuel consumption would be ideal, if not done properly so that the fuel efficiency as well as fuel consumption varies with power output, this could easily be no better than, or even worse than, a static averaged system for fuel cost as was originally planned.

Given the very great amount of additional work likely to be involved in dynamic fuel cost calculation, it is necessary to have a high degree of confidence that such a system would (1) be workable; and (2) be preferable in the form implemented to a static averaged system. This would mean (1) devising a workable algorithm to vary not just fuel cost but also fuel efficiency with power output; and (2) finding enough data for relevant types of vehicles to enable the actual in-game figures to be based on real life data, or extrapolations or interpolations there-from.

At present, I do not believe that it is possible to implement a workable dynamic system within current known constraints, as I do not know anywhere where I could find what a suitable formula could be or find enough data.

If anyone would like to propose a workable scheme, I should be grateful if this could be done, at least in outline, soon (preferably within the next week or so), or else I will have to continue as originally planned with a static averaged system.

Thank you all for your input on this idea so far - it is appreciated.

Offline DrSuperGood

  • Dev Team
  • Devotee
  • *
  • Posts: 2524
  • Languages: EN
Re: Pak128 Britian Extended Vehicle Balance.
« Reply #52 on: August 07, 2018, 10:53:52 AM »
To a large extent vehicle maintenance should not heavily couple with fuel economy. For now simply implementing vehicle maintenance would solve some of the above mentioned problems with accurate vehicle life costs.

Accurate fuel and running costs can be visited at a later time. Unfortunately it is the sort of feature that may require some experimentation and testing before results are satisfactory.

Although the mathematics involved are quite simple, and could potentially be estimated and still good enough, the problem is getting actual realistic data. Drag was a huge problem with steam engines but no one has shoved one in a wind tunnel because the importance of drag is a very modern concept, post dating the fall of wide spread steam usage. Aircraft do have fuel efficiency variances based on distance and loaded weight but these seem to be quite small so might be worth averaging away. Ships do have variances in fuel efficiency based on their speed they travel at, however how much of a variance is probably unknown for early steam ships, especially since they were hybrid sailing ships and in real life arriving on time often out does the difference in fuel economy.

There are different tiers of system that could be implemented, possibly individually. It may be found that some are sufficient that others could be ignored. In any case at some stage they will have to be looked at since averaging just will not work due to allowing players to exploit extreme cases that abuse the averaging or exposing them other extremes that unfairly punish them.

Ultimately at least the following needs to be looked into and modelled in some form or another.
  • Aero/hydrodynamics and the ability to limit maximum speed. Slower means lower drag which means some savings. This would mostly apply to ships and early trains, with others possibly able to use averages instead. Most of the energy cost of ships is due to this.
  • Acceleration and deceleration costs. Accelerating heavy vehicles uses a lot of energy which ultimately is wasted when breaking. This would mostly apply to trains and road vehicles as they are considerable masses that may be subject to regular acceleration and deceleration, especially within inefficient networks. Most of the energy cost on some underground networks with short distance stops is likely due to this. This can be ignored with ships because ships have very low top speeds and generally travel long distances without stopping and often take advantage of coasting so averages would suffice.

The following features probably do not need to be investigated and instead could be modelled by averaging or other easy to implement mechanics.
  • Dynamic maximum range of vehicles. Technically maximum range varies with speed, weight and the amount of breaking performed. However simulating fuel would likely annoy players and becomes hugely complicated.
  • Fuel efficiency of aircraft. Although the data will be available somewhere due to how much money is involved with aircraft and air transport being a recent invention, the gains from it are likely minimal over using averaging. For ranges that an aircraft would have extremely poor economy in real life (huge aircraft short distance) one could apply a minimum permitted flight distance or a constant takeoff/landing charge.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 17765
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Pak128 Britian Extended Vehicle Balance.
« Reply #53 on: August 07, 2018, 12:07:09 PM »
Thank you for your thoughts.

You write that a static averaged model "just will not work": can you elaborate on this? Are there any non-edge cases in which significant anomalies in what players are incentivised to do are likely in a static averaged model compared with a model that is dynamic both as to fuel consumption and fuel efficiency?

As written, the difficulty is: (1) a single dynamic model (i.e., one in which fuel consumption changes with power output but fuel efficiency does not) is likely to lead to worse fidelity to real values than a static averaged system; and (2), while a double dynamic model (i.e. one in which both fuel consumption and fuel efficiency changes with power output) is likely if implemented properly to lead to the highest fidelity of fuel consupmtion, this is likely to be too difficult to implement for three reasons: (a) the inherent complexity of finding a workable algorithm; (b) the computational intensity on large maps; and, most importantly of all, (c) the inability to find enough data with which to calibrate this. Without overcoming each of these three difficulties, I cannot see any possibility of attempting to implement a dynamic system being anything other than worse than a static averaged system.

The purpose of my last post was to state this conclusion and invite suggestions as to how those three problems might be overcome. If they cannot be overcome, then a static averaged system is the only practical option.

I should note, however, that fuel consumption for some types of vehicles (e.g. steam trains) is a relatively small part of the overall running cost (Ahrons estimated it around 12% in the 1850s), so a slight lack of fidelity in fuel consumption is unlikely to lead to any significant alteration in player incentives in any event.

(To put this discussion in context: the planned vehicle maintenance features include splitting maintenance/repair costs and fuel consumption for vehicles, having both based on real life data in so far as they can be found, and having different rates of inflation apply to both during the course of the game, the fuel consumption figure being based on historical fuel costs and the maintenance figure being based on historical staff costs/wage levels).

Offline ACarlotti

  • *
  • Posts: 244
Re: Pak128 Britian Extended Vehicle Balance.
« Reply #54 on: August 07, 2018, 04:37:01 PM »
the difficulty is: (1) a single dynamic model (i.e., one in which fuel consumption changes with power output but fuel efficiency does not) is likely to lead to worse fidelity to real values than a static averaged system;

I don't believe this can be true. If the dynamic model is used in the code, then it would still be possible to use the current static costs by setting all the dynamic (i.e. new) costs to zero. We are not throwing away the existing cost mechanisms, merely adding new ones that can be used in parallel. If there are any cases where a completely static model truly is better than the simple dynamic model, then we can continue effectively using that.

This get-out might not work for trains, but I think trains are where the simple dynamic system will give the greatest improvements over the static system. Indeed, I don't think you have responded to my scenario in reply #34 (cost savings due to switching to a more efficient locomotive should be greater for longer/heavier train).

I think the best way forward is to modify the code to allow for dynamic running costs, and then try them out. If it does turn out to give worse operational costs, then we can revert to the current model without any further changes to the code (perhaps even leaving dynamic costs as an option for other paksets).

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 17765
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Pak128 Britian Extended Vehicle Balance.
« Reply #55 on: August 07, 2018, 05:04:01 PM »
Thank you for your thoughts.

I don't believe this can be true. If the dynamic model is used in the code, then it would still be possible to use the current static costs by setting all the dynamic (i.e. new) costs to zero. We are not throwing away the existing cost mechanisms, merely adding new ones that can be used in parallel.

It is a little more complex than that: the current code does not distinguish between maintenance cost and fuel costs. The plan is to have maintenance costs and fuel costs separated and then governed by different rates of inflation; so the code needs to be updated in any event.

What I was referring to in the passage quoted was not so much the need to replace parts of the code, but rather the fact that, without modelling both dynamic fuel consumption and dynamic fuel efficiency, modelling dynamic fuel consumption alone is likely to lead at least in many significant cases to less accurate average fuel consumption than simply modelling average fuel efficiency. There are some particular problems with this: firstly, it is fairly easy to find averaged fuel consumption data for a range of vehicles, but very difficult to find such data in a way that correlates these data with power output.

Secondly, there is a particularly important aspect to dynamic fuel efficiency which in reality has a very significant impact on vehicle selection, which is this: a high power output vehicle will tend to be much less efficient at lower power outputs than a low power output vehicle. Not simulating this fact may well render useless a large range of low power output vehicles that are useful in reality precisely because they have better fuel efficiencies at their intended, lower power outputs. One of the things that I am especially keen to avoid is the situation that exists with Standard in which players have an incentive always to use the most powerful vehicle for everything. If there is no cost to using an overpowered vehicle, it would be difficult to avoid this. Even peripheral means of incentivising the use of lower powered vehicles (higher capital cost and weight) are likely to be insufficient in a significant number of cases, particularly with rail vehicles where these factors are likely to be less significant in many cases. In reality, there was a reason that huge heavy freight engines were not also used for suburban passenger work.

Quote
If there are any cases where a completely static model truly is better than the simple dynamic model, then we can continue effectively using that.
There are two problems with using a case by case approach to determine when it is better to use a static rather than dynamic fuel consumption system: firstly, it is likely to be difficult to work out which vehicles fall in which cases, and secondly, it is likely to be very confusing for players for fuel consumption to vary with power output in some, but not all, cases. The first problem in this case exacerbates the second.

Quote
This get-out might not work for trains, but I think trains are where the simple dynamic system will give the greatest improvements over the static system. Indeed, I don't think you have responded to my scenario in reply #34 (cost savings due to switching to a more efficient locomotive should be greater for longer/heavier train).
My apologies for not having dealt fully with this earlier. For ease of reference, I quote the relevant parts below.
Quote
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 wagons

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.
The comparison is valid, but the real question is whether a dynamic system can be implemented in which the overall adverse effects of implementing it  are less than the sub-optimal state of the improvement in energy costs of upgrading from diesel to electric in the above example being less differentiated than they would be in reality.
The biggest problem is the lack of effective data available as to dynamic fuel consumption and its relationship with power output; if, for example, a particular 'bus is recorded as having an average fuel efficiency of 4 miles per gallon, how can that datum be used to calibrate a dynamic system? As somebody who needs to be able to balance the pakset, I have to have a reliable way of extrapolating from fragments of real life data, and I see no way of doing that with the available data for a dynamic system.

The second biggest problem with a single dynamic system is that described above as to the perverse and unrealistic incentives created by having non-dynamic fuel efficiency. In practical terms, those adverse effects would appear to create incentives that deviate more significantly from reality than the incentives created by there being insufficient difference between energy cost savings of high and low power output situations.

Quote
I think the best way forward is to modify the code to allow for dynamic running costs, and then try them out. If it does turn out to give worse operational costs, then we can revert to the current model without any further changes to the code (perhaps even leaving dynamic costs as an option for other paksets).

The trouble with this approach is that that modification to the code would take a truly gargantuan amount of work (the physics engine is fantastically complex and I did not write it, so I have little understanding of how it works), so there has to be a very, very high chance that this will be very significantly better than a static averaged system to justify doing this work. I would also need to be very confident that it would be possible to get sufficient real life data to calibrate a dynamic system at least as well as a static system could be calibrated before coding for this.

What I had suggested in a post some time ago was dry run testing - mathematical extrapolation of various cases without modifying the code to test in principle whether either of the three theoretically possible systems, being (1) static averaged; (2) single dynamic; and (3) double dynamic would be viable.

As stated,  unless we can actually find a way of overcoming the three obstacles to a dynamic system, being
(1) the difficulty in creating a workable algorithm for a double dynamic system, or alternatively, the perverse incentives generated by a single dynamic system;
(2) the possibly excessive computational load of having to calculate fuel consumption dynamically; and
(3) (probably the most problematic of all) the lack of data enabling a dynamic system to be calibrated,
the only sensible way forward that I can see is to implement the static averaged system.

Edit: Incidentally, an additional thought in relation to the issue raised in post no. 34: in most cases, a player hauling a small load would be more likely to choose a low powered locomotive over a high powered locomotive capable of hauling a large load. Thus, in the situation where the player is using locomotives with different maximum power outputs in each pair of the four cases given, the fuel cost saved by the player will be greater in moving from the high powered diesel locomotive to the high powered electric locomotive than from the low powered diesel locomotive to the low powered electric locomotive.
« Last Edit: August 07, 2018, 07:00:48 PM by jamespetts »

Offline ACarlotti

  • *
  • Posts: 244
Re: Pak128 Britian Extended Vehicle Balance.
« Reply #56 on: August 07, 2018, 07:40:48 PM »
You raise many good points; I should also try to remember that you have experience of developing a pakset that I do not. If it should turn out that static averaging isn't sufficient, then I could at some future point try implementing a dynamic system. But at the moment I have enough other things to do that I wouldn't want balancing to wait for me to have time to rework the physics engine.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 17765
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Pak128 Britian Extended Vehicle Balance.
« Reply #57 on: August 07, 2018, 08:16:11 PM »
Thank you again for your thoughts on this. One of the important considerations is to work within the resource limits that we have available in terms of data and time, which can make a significant difference to what the optimum solution is.

One thing that might be worth bearing in mind for future reference is that it is likely that any good dynamic system for fuel consumption would have to change fuel consumption completely from a distance based measure (which is most suited to a static averaged system) to a time based measure, which would involve discarding any distance based measure data and starting again, so it would only make sense for anyone to implement such a system if good data for all types of mechanical transport are available for this.