Jump to content

Speed Limits and possible speeds at V7.


Empfohlene Beiträge

I'm trying think of a way to do something at V7. I'm sure there is an easy way that I'm just not seeing, so I thought I'd ask...

In real life, a railway line may have a speed limit of 120 mph (200 kph) but a locomotive towing a long and heavy goods train may well only be capable of 50 mph (80 kph). But then there might be a length of track on which the speed limit is 30 mph (50 kph).

What I'm trying to do is put a physical limit on how fast certain trains can go. Same would apply to road vehicles, where the Lambo is capable of 276 km/h (171 mph), while the Trabant can just about get up to 100 km/h (62 mph) downhill with a following wind and two people peddling in the back!

We can change the acceleration and break power, but on a straight length of track that's long enough with nothing in the way the heaviest of vehicles will unrealistically accelerate to the track speed.

(Incidentally, I'm still trying to decide whether the apparent limits of 80 kph and 50 kph are realistic for German railways and if so whether that says something about the quality of the track, or the quality of the drivers... Given that the French TGV has a top speed of 200 mph, 320 kph, I find it hard to believe that German trains are limited to the speed of a 50cc Moped!)

 

Anyway... What I've tried so far is putting a "Max Speed" integer variable on the locomotive and whenever any track contact triggers, check the vehicles absolute speed against that value and if it is higher set it back down. The problem with that is that as long as the train is on that track contact, the "Automatic Acceleration" property is active, so the speed gets set straight backup again if the contact is on a signal. So, I tried changing the acceleration value on the signal. That worked, it kept the long heavy freight pootling along at 30 kph (18 mph). But there's no way to set it back, because the signal is on a different setting when the train leaves the track contact, and the last thing you want is to set the "accelerate to" value to 120 when the signal is on HP0! About all I can think of is as the train leaves the track contact, set it to clear, change the value, set it to slow, change the value and set it back to off before anyone notices. The program should do it quickly enough that it would be visible as a mere flicker if that.

But what I really want is something more elegant: When the speed of the vehicle changes, if the speed is greater than the maximum set it to the maximum. But I cannot find a way of doing that first part. How do I detect that the property "Target Speed(Absolute)" has changed?

Bearbeitet von simonjackson1964
typo
Link zu diesem Kommentar
Auf anderen Seiten teilen

  • 2 Wochen später...

Hi @simonjackson1964

why don't you disable "automatic acceleration"? That's what I would do. Control the speed of each train via track contacts only. Just leave the automatic deceleration on to stop trains if the signal shows HP0. Also, you need to use the event "signal switching" to get the train going whenever it shows HP1. I'm sure it should work, however, no time to test it right now because I'm on my way to the bedroom.

Regards Timba

Link zu diesem Kommentar
Auf anderen Seiten teilen

Erstelle ein Benutzerkonto oder melde dich an, um zu kommentieren

Du musst ein Benutzerkonto besitzen, um einen Kommentar verfassen zu können

Benutzerkonto erstellen

Neues Benutzerkonto für unsere Community erstellen.

Neues Benutzerkonto erstellen

Anmelden

Du hast bereits ein Benutzerkonto? Melde dich hier an.

Jetzt anmelden
×
×
  • Neu erstellen...