News:

Simutrans.com Portal
Our Simutrans site. You can find everything about Simutrans from here.

Curve radii and speed limits

Started by jamespetts, March 03, 2014, 11:57:07 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jamespetts

I have been trying to work on a solution to the problem of the well known exploit in which higher speed railway track is used on corners to circumvent the speed limit on corners without the expense of upgrading the entire line. This is possible because, currently. the speed limit of trains on a 45 degree corner is proportional to the base track limit.

The best solution in principle to this is to remove this relationship and for the track speed limit to be based on the angle of curvature alone. However, I am having some trouble trying to work out what exactly the relationship should be between track speed limits and corners. One of the difficulties is that corners in Simutrans are discrete units of 45, 90 or 135 degrees over a pair of tiles, or up to 180 degrees over four or more tiles, which allows for far less variation in speed limits than reality. The second difficulty is that I am not much good at mathematics and think that I have probably got the calculations wrong somewhere.

Taking the second problem first, I found an equation at this website for calculating the radius of a curve from the distance and the angle. It is an interesting question as to how many tiles that a corner in Simutrans should be said to occupy, since the corner itself is on the transition between two tiles, but if one assumes that it takes two tiles, then, at Pak128.Britain-Ex scale of 125m/tile, that produces a radius of 257 meters for a 45 degree angle turn, 147 meters for a 90 degree turn and 125 meters for a 135 degree turn.

Using a formula from this Google Books result, and assuming track that is not superelevated, I get a speed limit of 157km/h for the 257m radius, 119km/h for the 147m radius and 109kmh/ for the 125m radius.

These results, however, seem to be at odds with this Wikipedia page, suggesting that a 120km/h speed requires a radius of 640m on superelevated track.

A further problem is that this set of equations requires both a square root and a sine, and is likely to be too computationally expensive to run on the fly.

The solution, in principle, it seems to me is greatly to simplify the calculations based on some hard coded values (customisable in the pakset) and interpolation between them. However, how to implement this is another question. Firstly, does anybody have any idea of what the values should actually be? The only information that I have found so far is the Wikipedia article and the results of my own calculations, which contradict each other, and the Wikipeida article only applies to high speed large radius curves with superelevation. Secondly, what are people's views on whether it should be possible to specify certain track as having superelevation, thus increasing the corner speed limit of that track? Connected to that, to what extent should this allow an increase in the limit? It is difficult to find good research material on this. Thirdly, as a matter of principle, over what distance does it seem reasonable to assume that corners are spread? There is already a system, which I should like to maintain, of interpolating between the 45 and 90 degree speed limits if a 90 degree turn is made by a pair of 45 degree turns within a certain number of tiles of each other (and so on with other speeds); but what should the base distance be assumed to be for the purposes of working out what the limit should be?

I should be very interested in views, and even more interested in sources of reliable information, on these matters.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

TurfIt

The U.S. speed limit law... http://www.ecfr.gov/cgi-bin/text-idx?rgn=div5&node=49:4.1.1.1.8#49:4.1.1.1.8.3.5.4
Works out to 25-30mph for the 257m radius curve. Not sure what your google books source is doing, but it seems way out there.

jamespetts

I have probably misinterpreted the equation in my spreadsheet: that seems like the same equation (albeit using Imperial rather than metric measurements) that I was using from the Google Books result.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Sarlock

I am coming from a weak point of lack of understanding of the intricacies of train motion mechanics, but is the speed limit around a corner very dependent on track speed?  It would seem to me that the same weight/length/height train can only corner so fast no matter what the speed limit of the track beneath them is (effects of superelevation aside).  The design of the train likely decides more than the track does.  If this is the case, you could possibly ignore the track speed limit altogether, retain the current calculation, and apply that to the speed of the train rather than as a limit based on the multiple of the track speed (ie: the same train can only corner at the same maximum speed irregardless of maximum track speed, assuming that it is in excess of the computed limit).

You could consider superelevation to be an included feature of high price/maintenance/speed tracks, available in future years.  This would increase the maximum cornering speed.
  EDIT: This poses the same problem as before, though, exposing a potential exploit by just using this track type in these instances. 

As you suggest, the goal is something that models well with the least amount of computational load.
Current projects: Pak128 Trees, blender graphics

ӔO

#4
It might be that your first equation is for cars.

If you look at the track curvature for TGV or bullet trains they are typically in the 3000m radius or higher.

---

Have you seen this page?
http://en.wikipedia.org/wiki/Minimum_railway_curve_radius
My Sketchup open project sources
various projects rolled up: http://dl.dropbox.com/u/17111233/Roll_up.rar

Colour safe chart:

jamespetts

I am fairly sure that the equation was for railway trains, not road vehicles - my ability to interpret and apply mathematical equations is far more open to doubt than my ability to remember information!

Sarlock: yes, indeed, the point is that the speed limit is largely independent of the base track speed limit. I am not sure what you mean by keeping the "existing calculation", however, as the existing calculation is based on a proportion of the track speed limit, which is exactly what we are trying to avoid.

What I think would be the simplest and most effective thing to do is just allow the speed limit for certain corners (45, 90, 135 and 180 degrees) to be set in simuconf.tab, and use the existing interpolation calculations between them. The tricky question is what those numbers should actually be!

As to superelevation, this is a difficult question. An "is_sperelevated=1" flag in a way's .dat file would be easy enough to implement (or perhaps even a specification of the cant ratio), but the question would then be what effect that this actually has on the corner speed limits. One might ask what is to stop a player putting superelevated track on corners on an otherwise low speed section: the answer would have to be the same as the reason that superelevated corners are not used on low speed track in reality: the higher speed achievable would be above the track's base speed limit in any event. This would require the effect of superelevation to affect only the 45 degree corner speed (as with tilting trains at present), and also require careful calibration of the values, on which point, refer to the above questions.

A final question is whether superelevation, if used, should be cumulative with the speed advantage of tilting trains or not. From my somewhat incomplete understanding from what I have been able to read so far, the simple answer based on real life practice is "yes", but I should be grateful if anyone could confirm or refute that.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

ӔO

tilting trains can go faster around superelevated corners compared to non-tilting.

Tilting, in effect, allows extra elevation, so instead of is_superelevation=1, you get a 2.

If you go with this route, you could keep certain trains from using extremely superelevated tracks.
My Sketchup open project sources
various projects rolled up: http://dl.dropbox.com/u/17111233/Roll_up.rar

Colour safe chart:

Sarlock

When the track is laid, could that speed limit can be placed upon the angle at that very time (even if the tooltip still says its maximum speed based on track type)?  Then any future trains that navigate that corner will be limited to that maximum speed unless they are able to tilt (and a bonus equal to a determined percentage between the limited speed and the maximum speed of that track type).  This saves you from having to do a per train calculation as the limit is already placed upon the track curve.  It also limits all tracks to the same speed for corners.

On the flip side, with no ability to make curves less than 45 degrees, careful gameplay consideration has to be made to not overly penalize the player with no option for them to make a more realistic curve for a high speed train.  I'd suggest that two sections of straight track with a 45 degree in the middle should be treated as a wide, gentle curve, not two straight sections with a sharp corner in the middle. (and what if the scale is changed to 20m/tile? 1km/tile? will max curve speed change?)
Current projects: Pak128 Trees, blender graphics

Carl

I cannot help with the maths, but I have two comments/concerns to raise about curve radii.


1. Any new equation must take account of variance in the meters-per-tile value between maps.


2. In line with Sarlock's last comment, I've often thought that the behaviour of 45-degree turns was a bit off, but I'm worried that certain scenarios be taken into account in any change.

Here's an example:


Any representation of this in Simutrans would look something like this:


Now this comprises a series of 45-degree turns to represent a straight piece of track at a ~20-degree angle. In current versions of Experimental, a train must (counterintuitively) travel at less than full speed across this piece of track because of the regular corners. Nevertheless, with the right settings, the effect of this on simulation is bearable and limited. I am concerned that a new equation, if not implemented carefully, could worsen this effect -- it needs to be clever enough to recognise when a 45-degree turn is not a 45-degree turn -- i.e. when it looks like the above. We do not want to end up with an equation which treats the above as a series of 45-degree turns and thereby forces even slower passage than is the case currently.

jamespetts

Thank you all for your various inputs. What I was imagining was a system whereby the corner speed limit for each type of corner is specified in simuconf.tab, so whoever configures a pakset (or reconfigures one) can take the meters per tile value into account when specifying these numbers, rather than have the game calculate them itself. Thank you for confirming the position apropos tilting trains.

One of the great complexities, however, about Sarlock's and Carl's suggestion is the presence of junctions/switches, and the ability to relay track. The speed limit of a corner must depend on the relationship between adjacent and nearby tiles, since a corner is always on the border between tiles. If we take into account more than two tiles, then the presence of junctions means that trains approaching from different directions will have a different curve radius with which to contend. The corner speed limit also cannot be calculated on laying a tile, as relaying other tiles in the vicinity would cause the effective radius to be altered.

Carl's diagram raises an interesting point. Currently, as indicated above, cumulative corners are treated together so as to increase the curve radius: two 45 degree turns in quick succession, for example, are treated as the equivalent of somewhere between a 45 and 90 degree turn, and the closer that they are together, the closer to the 90 degree speed limit and the further from the 45 degree speed limit that is imposed. The interesting point is whether the reverse effect should prevail when there is a straightening turn within a certain number of tiles (as in Carl's diagram, a 45 degree turn in one direction, then, shortly afterwards, a 45 degree turn in the other direction on otherwise somewhat straight track).

In principle, this could be used to infer an even smoother corner, but the difficulty is in working out the mechanics of it, which are really very complicated indeed. First of all, what would be the minimum degree of inferred curvature that might affect the speed limit, and from what pattern of tiles would this be inferred? Given that we cannot calculate square roots and sines for every vehicle of every convoy in every step, we have to have fixed points of pre-set speed limits and simply interpolate between them. Secondly, what would the formula be for inferring a gentler than 45 degree curve? The current system for inferring tighter curves from a cumulation of successive less tight curves is to calculate the total number of degrees turned within a given number of tiles. Doing the converse will not work, as, in examples like that in Carl's diagram, the result would always be zero, as the train would end up heading in the same direction as that in which it started. Another approach would be to look at the total sideways deviation in a given number of tiles: a single bend from a straight to a 45 degree angle which continues indefinitely at that 45 degree angle without a second correcting turn would have X/2 tiles sideways deviation for every X tiles in the original direction. A 45 degree turn corrected by a contrary 45 degree turn in the next tile on otherwise straight track of infinite length would have a deviation of only 1 tile sideways for any arbitrary number of straight tiles. However, this approach has a problem: for values of sideways deviations greater than 1, it cannot distinguish between pairs of 90 degree turns and sets of 45 degree turns. The example given above would have the same deviation if, instead of having straight sections and 45 degree turns between them, it had a single pair of 90 degree turns in the middle with track connecting them laterally.

Indeed, the issue with the 90 degree turns is the most extreme example of a conceptual problem with inferring a less than 45 degree turn, which is that, although averaged out over a long distance in empty surroundings, it can make sense to think of the track in Carl's example above as being a proxy for one continuous curve, imagine the same track arrangement with straight track continuing at some of the corner points and with stations or sidings on that track, or avoiding specific obstacles (industries, roads, city buildings) at the points of the curves: in these cases, the track would be behaving in ways that it would not be possible for very gently curved track to behave, giving the player a very substantial and unreal functional advantage by combining the operational benefits of a series of sharply curved sections with the speed limit of a long continuous curve.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Carl

Thanks for the reply, James.

I think that in the light of this growing complexity, one should think carefully about a cost-benefit analysis of any change in behaviour here. Arguably, the target exploit here is relatively small -- especially since the higher speed track used in the exploit costs more to maintain anyway, so it is not without cost -- and the current cornering mechanics are, as my work on the GB map shows, perfectly consistent with relatively accurate simulation despite small infelicities. On the other hand, the potential workload in finding the best implementation of a new system -- coupled with the difficulty of making it work properly with the kinds of cases discussed in previous posts and the danger of losing the accuracy of simulation that current versions provide -- might make a cost/benefit analysis weigh against any change. Worth thinking about, anyway.

Incidentally, on the GB map I have sometimes used the "exploit" of setting the speed limit higher than the sectional appendix dictates around corners or sections of track like the one in my previous post -- in order to ensure timely running. For instance, if there is supposed to be a 60mph speed limit on a corner section, then I will occasionally have to set the speed limit for 70mph for a portion of the corner so that the trains are able to travel close to 60mph. If I keep the limit at 60mph then they travel at only 53-55mph round the corner. I haven't had to do this often -- most services can keep time without doing -- but I have had to do it once or twice, such as on the route from Norwich to Diss. This route has a 100mph speed limit, but it resembles the picture I posted above, so trains were traveling around 93mph all the way and losing a couple of minutes relative to the timetable. This is a slight inconvenience, but nothing compared to the inconvenience of having trains slow down much more substantially over this section of track.

Vladki

Long time ago whe I played OpenTTD, i noticed that trains didn't slow down on two consecutive 45 degree bends, if the track continued in the same direction. So this could be taken as an exception to allow full speed on straight track that just does not go exactly to the north (or other 45 degree direction). However if there would be some straight tiles between the bend, normal curve rules would apply, as this would be a real double curve.

Sarlock

Carl makes a very valid point about the cost-benefit of such a setup.  Given that the effect is minor (many players may not even notice) and the exploit of minor concern (Simutrans online game isn't a directly competitive game) maybe it's not worth the mental investment and computational load.  One could simply assume that 45 degree turns are smooth enough to not have a significant slowdown and only when you reach 90+ degree turns is there a meaningful hit to maximum speed.
Current projects: Pak128 Trees, blender graphics

MCollett

Quote from: Sarlock on March 04, 2014, 03:40:54 PM
One could simply assume that 45 degree turns are smooth enough to not have a significant slowdown and only when you reach 90+ degree turns is there a meaningful hit to maximum speed.

+1

90 degree turns on the map presumably represent tight real turns carried out in a short distance and significantly restricting maximum speed.

45 degree turns on the map may represent moderate real turns carried out in a short distance, and somewhat restricting maximum speed; but they may equally (or perhaps, more likely) represent a real turn carried out over a much longer distance, or even, as Carl's example shows, no real turn at all.  If checking nearby tiles to see which of these is right is too complicated or slow, then keeping the speed penalty to a minimum is clearly the right option.

Best wishes,
Matthew

Banksie_82

I always thought of the more expensive track as implying a better design of curvature, including:

- Gentler curve (greater radius), since the scale and orthogonal nature of the game restricts the manual design by the player. Although this becomes more blurred as the scale reduces (or increases, depending on how you think of it).
- Superelevation, ignoring the fact that this is detrimental to slower, longer and heaver trains
- Strength of track, to withstand the additional centrifugal/lateral forces during cornering

All this amounts to me thinking the current system is a pretty good approximation.

I agree with Carl, that the effort required to change the concept and workings probably isn't worth the benefit.

If you feel the exploit does indeed need to be addressed, perhaps rather than the corner speed taken from the two tiles defining the corner, it could be the average speed of track for 1km either side of the corner in the path of travel. Or, if this is too simplistic, then maybe a distance dependent on the actual velocity of the train at the time.

isidoro

The simplified physics of cornering is that the force (due to friction or other) needed to keep the object on the curve (no superelevation) is proportional to the speed squared over the radius (i.e. for a curve with a quarter of the radius of a certain one, you would need to slow down to half of the original speed).

On the other hand, a straight line (with different slopes) or a curve with different radii (4.5 and 7.5 tiles) would look like the ones in the picture I attach, more than the curve shown in Carl's.  From my picture, it seems sensible to consider two consecutive 45 degree turns in opposite directions to be effectively straight, at least from the physics point of view.

Nonetheless, any of the straight lines shown in the picture would surely seem unnatural and force the player to do that to get maximum speed is something to be well thought before implementing, I guess...


jamespetts

I think that I have found a sensible and simple (at least partial) solution to this, which I have pushed to the way-improvements branch: adjusted corner speed limits, still based on a percentage for the 45 degree turns, are based, not just on the corner tile itself, but also on the preceding and succeeding tiles with the consequence that simply upgrading the track actually at the corner is of no effect.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

sdog

My suggestion is to use approximation to determine the trajectory over a large portion of the track, instead of a local look.

With proper method the 20 degree track carl would describe could be approximated as a straight line.

What you would have to define is a window for approximation, ie going 20 tiles ahead and 20 back.

You can google for approximation methods on the net. I can also try to sketch an ad hoc algorithm for such a thing, that would be only a starting point.

Let there be a sufficiently large piece of single track, no branching.

Let w be the window, and N our starting point.

take the coordinates for all rail-tiles N-w < n < N+w, using one coordinate as x the other as the value.
Approximate this section in turn by K pre-defined functions f_k. Where f_1 is always a line. f_2 ... f_K are other appropriate functions (simple polynomials, fancy cycloids) all with pre-defined parameters.

Evaluate which function is the best approximation, different weighting methods could be used for this.

Each function f_k maps to constants v_k, c_k which are the speed limits and friction constants.

move N by one tile, repeat.


This is expensive, but only has to be done once for a new track. I have no idea what to do with points however.  Choose w such that it reflects train lenghts. If w is large, it needs to have higher order functions to allow for S or more complicated shapes. If the functions would stop at quadratic functions, a line would be always chosen for S shapes.

Alternatively, It might be sensible to rotate the original distribution, such that it is always monotonously rising. If that is not the possible (second derivative changes sign) reject and reduce w.

Carl

Quote from: jamespetts on March 05, 2014, 01:43:03 AM
I think that I have found a sensible and simple (at least partial) solution to this, which I have pushed to the way-improvements branch: adjusted corner speed limits, still based on a percentage for the 45 degree turns, are based, not just on the corner tile itself, but also on the preceding and succeeding tiles with the consequence that simply upgrading the track actually at the corner is of no effect.
Thanks for your work on this, James -- that does sound like a good solution for the time being.

zook2

Just off the top of my head (and it's probably an idea that has been throught of and discarded ten years ago already): what if you stored the "curve effect" with the train instead of the track?

I have absolutely no idea how many checks have to be made for each vehicle and simulation step and it may be too much of a peformance hit, but if you added a "curve counter" to each train, increased it by a certain amount for a curve (e.g. +5 for 45°, +20 for 90° etc.), defined a threshold below which speed wouldn't be affected, and subtracted 1 from this counter in each time step, then the train would remember recent curves it had passed and you could force it to slow down once the threshold had been crossed.

A slow train would lose "curve penalties" faster than it could accumulate them and not be affected. A fast train would be pushed over the threshold quickly and be penalized. Calibrating the effect for different track types wouldn't be too hard (I suppose) because there are few curve radii to consider.

jamespetts

#20
The curves are already stored in the vehicle, not the way: it would be impossibly difficult to code them into the way because the degree of curvature would vary depending on where the vehicle is coming from. The difficulty in principle is that the minimum curve radius possible in Simutrans is a 45 degree turn, and the next least severe curve radius is 90 degrees: there is an unavoidable lack of information there that no amount of coding, bar actually implementing smooth curves, can get around.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Tazze

Shinkansen need not speed down at however big curve.
Recently, JR succeed to run at Max-speed on the big curve by its body bending.
Thanks of this evolution ,They announced to rising up max-speed of some Shinkansen from 270km/h to 285km/h since this spring.
http://news.tv-asahi.co.jp/sphone/news_society/articles/000022290.html


On the other hand, local train and fright train are limited by signal and End-of-limit-signal.
The figure is different from each kind of train.

However, the age that all train need not speed down at the curve will be come,I guess.

ӔO

btw, there are high speed rail switches that allow trains to cross them at full speed, unlike conventional ones which require reduced speed.

Conventional: http://upload.wikimedia.org/wikipedia/commons/6/64/Turnout_components.jpg
Note the gaps at the crossing which can cause the flange to jump the track.

High speed: http://blog-imgs-32.fc2.com/t/a/r/tarouroom/20100317014615ae3.jpg
http://en.wikipedia.org/wiki/Swingnose_crossing
Note the lack of gaps due to improved design.
My Sketchup open project sources
various projects rolled up: http://dl.dropbox.com/u/17111233/Roll_up.rar

Colour safe chart:

jamespetts

The trouble is that we cannot simulate these things in Simutrans because there is no way within the Simutrans geometary to have a curve gentle enough.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Schwabe

I have another idea for a solution, but I do not know if this is possible.
In real life, high-speed trains can run on normal tracks and normal trains on high speed tracks. However, high-speed trains can run on normal tracks only normal speed and normal trains not receive a speed bonus of high speed tracks.
In the same way, this problem can be solved. Normal trains may only be treated like normal tracks and, indeed, the curves corresponding to high-speed tracks too. Normal tracks get a speed limit at which all trains must stop. Thus, mixed routes where only the curves were laid with high-speed tracks no longer sufficient, since the high-speed trains will be slowed down on the straights and also normal trains just  driving normal through the corners.

jamespetts

Shcwabe - hello and welcome to the forums! It is always good to see posts from a new user.

If I understand correctly, I think what you are suggesting is that the reduction in speed on a curve be proportionate to the train's speed limit rather than the track's speed limit? The problem with this, I am afraid, is that this is not how it works in reality: some trains can take certain curves at their full speed, whereas others have to slow down to match the same speed limit, which is built into the track. One of the things that I am trying to achieve with the system of corner speed restrictions is to give players the same incentives as railway builders had in reality, where, in the days of steam locomotives, which were slow and not very powerful, it was better to build a meandering line to avoid hills, whereas, in the days of modern electric trains, which are fast and powerful, it is better to climb a steep hill, which can be overcome by power, than to negotiate curves, which limit speed at any power. This gives players a realistic incentive to upgrade their networks in the later part of the game.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Vladki

Hi. I have got another idea. What about forbidding 90 degree turns for highspeed track or road. Just like some ways can be limited to half height slopes. Thus if high speed track would need a sharp turn it would have to be a sequence of 45 degree turns with a few tiles of diaginal track between them.

Sent using recycled electrons.


ӔO

Maybe treating tracks between junctions or X distance as a single "section" would work?
The top speed inside the section is dictated by either the average of the tracks inside it, or the slowest, so this would negate the corner exploit.
My Sketchup open project sources
various projects rolled up: http://dl.dropbox.com/u/17111233/Roll_up.rar

Colour safe chart:

jamespetts

Vladki - the current system has a hard limit for 90 degree curves irrespective of track speed; thus prohibiting "high speed" track from having 90 degree turns would achieve nothing and frustrate the player.

AEO - this is similar in effect to the system that I have in fact implemented, if I understand you correctly (and bear in mind that trains must slow down for the next corner).

You do all realise, incidentally, that I have already found a solution to the corner exploit issue, as discussed a few posts ago...?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

ӔO

oh, I thought it was a temporary solution for now?
My Sketchup open project sources
various projects rolled up: http://dl.dropbox.com/u/17111233/Roll_up.rar

Colour safe chart:

jamespetts

It was specifically not intended to be temporary.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

jamespetts

I have been spending some time recently looking into this issue. I have managed to find a quick and efficient way of calculating both the radius of a corner and the correct speed limit that should apply to it (see here for the equation). This should allow accurate cornering speeds for rail (road I will have to research further, but in principle it should just involve altering the input numbers rather than changing the formula).

Important features of the system are that it calculates an actual curve radius taking into account the meters per tile setting. It does this by not calculating the radius at the first 45 degree corner that it finds in any given vehicle's route. If it finds another 45 degree corner within 64 tiles, it calculates the radius of the overall curve between the two 45 degree corners. If between them they produce a 90 degree angle, it takes the Manhattan distance between the two corners and multiplies this by the meters per tile value to get the radius of the curve in meters. If the two 45 degree corners between them produce no angle, it uses half the value of the 90 degree version (as this is a slalom type curve, with two curves in opposite directions of curvature of half the radius of the equivalent 90 degree curve in the same space). Tilting trains still benefit by a rounded 1/3rd (if anyone has any more detailed equations on this, I should be grateful). I have not found a way satisfactorily to simulate superelevation in track.

Testing this with default values and 125m/tile, the cornering speeds produced seem to be realistic, and are also less restrictive at lower speeds than those currently in 11.35: a 180 degree turn, for example, can be executed at 23km/h and a 90 degree turn at 33km/h. With lower meters per tile values, these numbers will get lower. Conversely, the fact that 192 tiles rather than only 16 as previously are taken into account in determining the curve's radius means that more care has to be taken when building high speed railway lines, as radii of many kilometres are necessary at very high speeds. The slightly less restrictive numbers for sharper corners should have the effect of making it easier to build rail networks in dense urban areas.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.