Author Topic: Inconsistent train speeds on curves  (Read 672 times)

0 Members and 1 Guest are viewing this topic.

Offline JBridge

Inconsistent train speeds on curves
« on: April 12, 2017, 10:44:49 PM »
Not sure if this is intentional or a bug, so apologies if this is in the wrong section...

I've noticed that, on railway curves over a certain radius, an overspeed train (ie. travelling too fast for the curve) will slow to ~93km/h whatever radius the curve is. On small curves this is not a problem, but on +93km/h curves a kind of blanket restriction seems to apply until the curve is shallow enough to be taken at top speed.

The issue can be reproduced (I hope!). Lay an 8x8 90-degree curve as in the .png below and allow long approaches for the train to pick up speed.
Then run the two Class 172 variants from pak128.Britain-Ex through the curve (I chose these as they are identical save for their top speed). I used 113lb 200km/h track, by the way.

I found that the whilst the 172/0, which is limited to 120km/h, could run through the curve at top speed the faster 172/2, entering at 160 km/h, would slow to 93km/h, not 120+ as I would expect.

I've read the 2014/15 discussion about curve radii but found no clues. I imagine on straighter routes where a train can reach its top speed for reasonable periods this is less of an issue, but on winding routes with many curves using a ‘faster’ unit at present can actually make the journey significantly longer.

Any thoughts?

Jon

Ubuntu 16.04 ; Nightly r2149a8b ; pak128.Britain-Ex 0.9.2

Offline Junna

Re: Inconsistent train speeds on curves
« Reply #1 on: April 12, 2017, 10:51:20 PM »
The curve radius stuff was, I thought, abolished? But I noticed that this occurs (with the same numbers) in Ves's Pak.Sweden. I disabled all of the curve slowdowns long ago on my own pak by changing the settings in the config because it's rather daft to have, since there's no way to get smoother than 45 degree turns.

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 15425
  • Total likes: 376
  • Helpful: 171
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Inconsistent train speeds on curves
« Reply #2 on: April 12, 2017, 11:11:51 PM »
Thank you very much for reporting this. I am afraid that I cannot reproduce the issue that you describe, however: the Class 172/0 (with three carriages) will reduce its speed to 93km/h on an 8 tile corner such as this, which is the correct speed for a curve with a radius of 1,000 meters according to the formula here, and an 8 tile radius curve at 125m/tile is indeed 1,000 meters in radius.

The Class 172/0 travelling at 120km/h through the corner would be a bug, but note that it will only slow down when it reaches the second of a pair of 45 degree corners, as it cannot know the radius of the corner until it has passed two 45 degree turns.

Can you upload a saved game in which the issue of the Class 172/0 travelling at 120km/h around an 8 tile corner can reliably be reproduced?

Edit: I should note that curve radii based speeds have not been abolished: what was abolished was the old system of having a corner speed limit based on the speed of the underlying way. That there cannot be a shallower turn than 45 degrees is accounted for by the fact that the vehicles will only slow down on the next 45 degree turn, based on an inferred radius taking into account the two different turns and the space between them, which might be a radius so large that there is no reduction in speed at all.
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.

Offline Ves

Re: Inconsistent train speeds on curves
« Reply #3 on: April 13, 2017, 06:15:32 PM »
May i ask, where is this information stored in the game? It could be quite interesting to show the max curve speed of a given tile in the track info window.

Offline JBridge

Re: Inconsistent train speeds on curves
« Reply #4 on: April 13, 2017, 10:10:24 PM »
Hi,
I've attached a save of the map I used for testing the issue. It includes a loop of 113lb track which a 172/0 and 172/2 (both 3-car) are circuiting. When you open the save the 172/0 is approaching an 8-tile curve, which for me it will take at 120km/h. I've also included a 10-tile curve in the test loop, which from the equation in your link (R=1250, e=0 and f=0.1) should be taken at ~104kmh (R=1250, e=0 and f=0.1), but which the 172/0 takes at 120km/h and the 172/2 at 93km/h!

I haven't tried changing any of the config settings yet; I'll have a play and see what happens.

Cheers,

Jon

Edit @23:15: Apologies, I've just tried that .sve and for some reason it crashes. I'll try and upload a working one.

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 15425
  • Total likes: 376
  • Helpful: 171
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Inconsistent train speeds on curves
« Reply #5 on: April 13, 2017, 10:28:19 PM »
Jon,

thank you for that. The current nightly crashes in any event, which I have now fixed. Can you re-check it with to-morrow's nightly and see whether that works any better?

Ves - the convoys (I think in simconvoi.cc) calculate the speed limit ahead of them when they move, and infer the radius of a corner by counting the tiles between two 45 degree turns ahead of them on their route: this information is not, therefore, stored, but calculated dynamically.
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.

Offline JBridge

Re: Inconsistent train speeds on curves
« Reply #6 on: April 14, 2017, 04:00:01 PM »
Ok, let's try again.

https://1drv.ms/u/s!AvBfVFqFqKERgQBAJZU9_hTe-KFE

This .sve was saved under today's nightly.

Jon

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 15425
  • Total likes: 376
  • Helpful: 171
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Inconsistent train speeds on curves
« Reply #7 on: April 14, 2017, 04:27:18 PM »
Splendid, thank you for that. I should note that I am staying with my parents over Easter, so cannot do much in the way of debugging on the computer that I use here, but I will look into this when I get back home. Thank you again for the report.
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.

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 15425
  • Total likes: 376
  • Helpful: 171
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Inconsistent train speeds on curves
« Reply #8 on: April 19, 2017, 12:36:48 AM »
Thank you for that report: I think that I have now fixed this and improved the way that corner speed limit calculations work generally. Would you be able to re-test? I should be most grateful.
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.

Offline JBridge

Re: Inconsistent train speeds on curves
« Reply #9 on: April 19, 2017, 08:13:11 PM »
Thanks James, from the testing I've done so far that seems to have done the trick.

Jon

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 15425
  • Total likes: 376
  • Helpful: 171
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Inconsistent train speeds on curves
« Reply #10 on: April 19, 2017, 10:02:47 PM »
Excellent, thank you for confirming.
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.