Page 1 of 8

The Massive Obvious BUG Thread

Posted: Tue Jun 16, 2009 9:27 pm
by Kromaatikse
Having played KRS, and now installed the initial version of RW and tinkered with it a bit, I'm afraid I'm going to have to be a bit scathing. Hopefully I can remain polite while doing so. This is the rant of a serious geek and an experienced software engineer.

I'm going to focus not on little glitches that can be ironed out piecemeal (by which I mean just about anything in the graphics or user interface), nor things that simply haven't been modelled (yet), or anything like that - but on things which are in the simulator, and are done wrong, and are so wrong that it interferes with the railway experience.

There are two major areas that are this wrong: the Physics and the Signalling. Both of these suffer from fundamental design flaws which, so far as I can tell, date back to MSTS1 and are therefore an entire decade old.

That's not to say that they haven't been improved since then, but that they are so badly flawed that incremental improvements will not be enough to win the respect of the community. I believe they have to be replaced, and so this post is a guide to RailWorks' developers on How To Do It Right.

Let's start with the easier part: The Signalling.

The job of any signalling system is to stop trains running into each other by accident. It accomplishes this enormously important task by communicating limits of movement authority to drivers. Signals are not merely points indicators, or repeaters for track circuits, or even under the exclusive control of a single signalman. Yet RailWorks often treats signals as any of these, and exhibits behaviour that would be fundamentally and dangerously impossible on a real railway.

The result is that signals are seen to fail, sticking on red permanently. They turn red against the player under normal traffic conditions. And yet they can let AI trains enter the player's path under fairly repeatable conditions. All because the signals are set up in a fundamentally backwards way.

Allow me to describe how real signalling is done.

The first step is the Working Timetable. This describes, often to halves or quarters of a minute, where trains are supposed to be, when they're supposed to get there, and when they are supposed to leave to get to the next place on time. It can be (and often is) amended on a daily basis, and extra trains can be inserted at rather short notice, but it means that each signalman has a pretty good idea of where each train should be sent, and when.

But the Working Timetable is only advisory. Signalmens' first priority is safety - timekeeping comes a distant second.

When a train approaches a signalman's section, at first it does not have authority to proceed through it. Therefore, the section signal (often called Outer Home in British practice) will be kept at Danger, and any preceding signals will be limited in their displayable aspects by that.

Next, the signalman decides what route to send the incoming train on within his section. This might be into a station platform, across a junction, to the edge of a yard, or straight through. It must not occupy the same space as another set route - and the signalman must take crossings, points, and any other fouling considerations into account. (In UK practice, this also means leaving an "overlap" beyond the limiting signal clear of traffic until the train has been brought to a stand at that signal - but that's a detail.) Once determined, the route is set using points. It is then possible to give a train authority to use it, which is done by setting signals.

But once decided, this decision can be changed - unless it has been committed by giving the train authority to proceed along it. The only way to retract that authority is to reset the signal, wait for the train to stop, and then wait a further two minutes to ensure the driver has not internalised the previous aspect. Only then can the route be unset.

Modern signalboxes contain interlocks which enforce the above rules quite strictly - indeed, the signalman might only normally need to input routes and keep an eye out for emergencies, with a computer actually setting points and signals. Older boxes may only enforce some of the rules, but interlocks between routes and signals have been standard practice since the mid-to-late 19th century, and may lack only the timer on the release. Train presence detection and interlocking is a newer technology, only becoming properly robust and widespread in the mid-20th century. With these older boxes, the signalman was responsible for enforcing the rules himself - rules which had been developed through long and bitter experience.

Note that an "authority of movement" is given implicitly for "automatic" signals. Automatic signals are only used on "plain line" sections - with no points or junctions. The implication is that if a train has entered the section (always under control of a signalman), it has authority to proceed to the other end of it, provided only that other trains have cleared the line ahead. This is the major difference between automatic and controlled signals. A "semi-automatic" signal is one that is normally automatic, but to cope with unusual situations is capable of being controlled - in this case it is given a "standing authority", which can be revoked by the signalman using a procedure and a control line.

Main signals convey authority of movement towards the next main signal or buffer stop (which counts as a permanent Danger signal), along the set route (which, remember, never changes while the signal is showing "proceed" or the train is still in section). Some types of signal are capable of indicating which route is set, while others only indicate if a restricted speed is required. Most are capable of showing whether more than one of the sections ahead are clear - and unless an emergency arises, this authority is never reduced.

Distant signals are simply main signals which cannot show a Stop aspect. But in British practice they have a subtlety - they indicate whether any of the signals between itself and the next Distant signal are at Danger. In modern practice, Distant signals (or main signals capable of showing a Caution aspect) are placed frequently enough that this situation never arises.

By the way, the two-aspect colour light signals in British practice are only used as direct replacements for semaphore installations, due to the limited information they can convey. They have absolutely no place on the approaches to Paddington!

Finally, shunting signals operate on the same principles as main signals, with two major differences: they do not guarantee that the track is unoccupied, and they provide movement authority only to the next shunting signal, the next main signal, the next obstacle, or the limit of shunt, whichever comes first. They are not point indicators, though they are usually interlocked with the points to guarantee that a route has been set. The fact that they may be operated from a ground-frame by a shunter (who may be the train's guard or fireman in practice), instead of from a signalbox by a signalman, does not change their fundamental function as movement authority indicators.

At this point I would like to point out that a UK-pattern shunting signal shows either a red/white aspect or a red/red when at Danger (depending on it's age). The type which extinguishes when not giving authority is only found attached to main signals, and is called a "calling on" signal, with the same semantics as a shunting signal.

At any given time, a train is either under main-signal authority or shunting-signal authority. It is not allowed to change from one to the other without first exhausting the existing authority. This may be done by bringing the train (nearly?) to a stand at a main signal at Danger, then using the calling-on signal on the main signal post to transfer to shunting authority. Alternatively, a train at a stand may be signalled to reverse by a normal shunting signal. A transfer back to main-signal authority is simpler - the previous shunting signal gives authority to the main signal but no further.

Approach-Release signals are a bit special. They effectively withhold movement authority until the train has been shown to be travelling sufficiently slowly to traverse the junction safely. They are only used when the speed limit for a diverging line is substantially lower than for the straight line - the classic example is a 90mph main line with a 25mph crossover. For less severe examples, such as if the line speed is 50 or 60mph, the Caution aspect would be used instead of the Stop aspect - this is simply witholding the authority from the signal after the junction, and is rather preferable from the driver's point of view as it is more predictable.

The non-obvious point is that the authority is released by a timer (assuming the signalman has given his authority) which is triggered by the train entering the section. A good driver knows this, and will brake early so that he is travelling at the correct speed when the signal clears, but still with enough braking distance to come to a complete stop if required. A poor driver who only brakes to stop at the signal would have traversed the early part of the section too quickly, and will have to come nearly to a stop before being able to restart. The real point is that the position of the train is not always the same when the signal is released.

Fundamental principles:

A signal gives authority of movement over one or more sections of track beyond it. Until that authority is given, the signal displays Danger, or the nearest available to it.

The aspects any signal can display depend on the aspect actually displayed by the signal immediately after it on the set route. This is of course recursive.

Whenever a signal is showing a proceed aspect, the set route as far as the authority of movement that it conveys is locked down and cannot be removed or interfered with.

Main, distant and shunting signals are fundamentally the same. They differ only in the quantity and quality of authority given.

Approach-Release signals (of both Stop and Caution types) are implemented with a timer, not a position sensor.

My Physics rant follows in a separate post. Please leave the thread clear for it... :fadein:

Re: The Massive Obvious BUG Thread

Posted: Tue Jun 16, 2009 10:00 pm
by Acorncomputer
Hi

Very good, and I feel educated rather than ranted at.

Re: The Massive Obvious BUG Thread

Posted: Tue Jun 16, 2009 10:19 pm
by SuperTux
Its all good, hopefully they can make the necessary changes.

Re: The Massive Obvious BUG Thread

Posted: Tue Jun 16, 2009 10:31 pm
by Kromaatikse
The Physics.

When the average train enthusiast sits down with a "railway simulator", probably the most important thing they expect to experience is the train performance and behaviour. The more nerdy ones will have read all sorts of books that describe how things work and how they are driven, and they will certainly have ridden behind and watched enough real trains to have a pretty good "feel" for what drivers usually do.

As such, it is incredibly frustrating to load virtually every drivable train in RW, only to find physically impossible or at least implausible things going on behind the controls.

Let me illustrate this with a few examples, some of which have been mentioned by forum regulars in the KRS section - they apply equally to RW, and in some cases, more so.

Diesel-Electrics don't normally allow continuous operation at the maximum current available at a standstill. But in RW, the second half of the throttle travel might as well not be there, because you can set the throttle to somewhere near 50% and get no less power at high speeds, yet the needle is just in the yellow on the ammeter. The notched power controller on the HST combines with this weirdness to make it very difficult to control accurately at it's designed speeds.

Diesel-Hydraulics - and this includes the Class 166 DMU - normally have torque converters on the lower gears and a fluid coupling on the highest gear. Indeed the real 166 (and the 15x and 14x series) has just one of each with the same gear ratio. This Voith V211r transmission is extremely popular with DMU manufacturers, so there must be a huge difference between the transfer characteristics of the two hydraulic mechanisms. Yet the simulated 166 behaves as though it has a dual fluid coupling transmission with two different gear ratios and a far-too-big engine, controlled by a conventional diesel-electric's governor - and it can be driven up the SCJR's 1:50 gradients on Notch 1 without deviating in the slightest from it's set speed. The simulated German diesels behave similarly, though they do have the decency to stall if hauling a heavy train uphill on a low throttle.

Steam - oh, where do I begin? Given a level track, the simulated steam locos will start off reliably from cold at any non-zero cutoff ratio and wheel position, demonstrating that the stochastic nature of the cylinders is not correctly simulated at low speed or stall. There's an utterly bizarre transition in the steam usage (and generation) at the 50% mark on the regulator, with no corresponding change in power. Both of these misfeatures are carried over from MSTS1. And - in a regression from MSTS1 - the cutoffs go all the way to 100%! No real steam loco does that - an exceptionally good engine might go to 75%, but 55-65% was far more common (this much being necessary to start a two-cylinder engine reliably).

Couplings are another fun topic. I actually like the "slack and buffing" feature introduced with RW - except that it isn't accurate, especially for passenger trains. Passenger coaches are not loose-coupled, as this would cause massive discomfort to passengers. Instead, special techniques - such as using the corridor bellows as part of the buffing arrangement - are used to close-couple coaches together. But even "loose coupled" wagons are not simply a chain and a hard buffer beam - the coupling is still tightened so that at least one sprung buffer is always in contact with it's partner (for old UK wagons), and American-style buckeye couplings are sprung in both directions to transmit the force as smoothly as is cheaply practical. So the distance between wagons can change, but the forces between wagons do not change as abruptly as presently simulated (unless a shunter was really ham-handed with the coupling job).

Brakes - oh boy oh boy is this a royal mess. But then, it is in the real world too, so it is at least somewhat understandable. The main point I need to make here is to understand exactly which type of braking system(s) is attached to a given vehicle, and exactly how they operate. I think all of the current braking problems stem from this point, rather than a fundamental problem with braking per se.

I think I'll defer detailed descriptions of how-things-should-work for this section for later posts in this thread, as otherwise it would be an even bigger wall-o'-text than my signalling rant. :o

Re: The Massive Obvious BUG Thread

Posted: Tue Jun 16, 2009 10:39 pm
by paulz6
A lot of these points have been made in the RS Signalling thread and have been around since the RS epoch. I'm assuming that where a true calling-on signal is lit up, the main aspect should be red? Try entering the fictional Hedborough depot.
The work put in to RW appears mainly to have been in assets rather than underlying programming developments. The programming effort appears to have mainly been about steam integration. They could have just released expansion packs for RS along with a minor patch.
Signalling and operational aspects of the sim is what lets it down. They need to start assigning some resources to this ASAP. Just eye candy is not good enough.
Or may be it really is the case that they just don't get it. :snipersmile:

Re: The Massive Obvious BUG Thread

Posted: Tue Jun 16, 2009 10:57 pm
by Sly401
Hi

Some good points in the post, some way off the mark.. like developed from MSTS.

A good case let down by a sensationalistic thread title, now you may want to get noticed here (fair enough) but how about letting your point of view do the talking ? :D

Although we would all like real world fidelity, the truth is it has not been done yet and are some years off,
Although there are bugs. most of your subject is by design (rightly or wrongly)...
Decisions were made long ago about how to portray the best compromise of railway operations and no-one is hiding any secrets..

Just reading your simulataneous post on physics.. same thing we are not yet in 12 inch to foot scale :D
What I can tell you is that the platform has most of the capabilities for the physics you seek, ( few not activated yet ).
Again not bugs... just not implemented, possibly as yet .

BTW tell me the difference between a fluid coupling and a torque converter ?

We all have our own pet area that we wish to see improved... :D

You could always set up your own loco, or reset one of the default ones......... expert help always appreciated.
If that is too much trouble how about providing all the operating parameters you wish to see in a particular locomotive, then maybe some developer will use it to produce your dream model.


Welcome to the forums BTW

Sly

Re: The Massive Obvious BUG Thread

Posted: Tue Jun 16, 2009 11:19 pm
by Kromaatikse
Yes, I'm pretty sure that a calling-on signal is only illuminated below a main signal at Danger. It gives movement authority that the main signal does not (and often on a different route, such as into a turnback siding), and requires the driver to think twice before proceeding. This actually made even more sense in semaphore days, when a different arm was raised for each route anyway, and the calling-on signal was just a miniature arm or disc.

I don't think RW actually uses code from MSTS, but it seems to have been designed by the same set of people who have made the same basic decisions. Indeed, looking through the asset-developer documentation, a very suspicious number of parameters are explicitly and directly related to MSTS ones, with at least similar names and very similar function. This also confirmed my impression of the simulation as behaviour-driven (like MSFS) rather than physics-driven (like X-Plane). I believe a decade of experience and computer horsepower advancements should do better than that.

And it is the design that I'm ranting against - I'm fully aware that things can be improved incrementally, but this is supposedly a state-of-the-art "railway simulator platform". As a software engineer, I know full well that it's far easier to fix the design early on, before people have got too used to "exploiting the quirks" to get things almost the way they want them. People have managed to get surprisingly good things out of MSTS1, but in each case it has been through sheer brute force and ingenuity, and often with some severe compromises. A "railway simulator platform" should make things easier than that, not provide more of the same.

Re: The Massive Obvious BUG Thread

Posted: Tue Jun 16, 2009 11:19 pm
by ghawk2005
ohhhh dear, yet another massive ego-head has joined. if you're so experienced and clever, you write a better train/rail simulator.

Re: The Massive Obvious BUG Thread

Posted: Wed Jun 17, 2009 12:08 am
by 007MJB007
AlexanderMeerkat wrote:Good posts Kromaatikse and don't be put off by the "know it all know nothing" brigade.
I have to agree too, after all it is Railworks "RailWorks: a new concept in train and rail simulation" as the software is promoted
and not Railworks the arcade game...! With such features as "Advanced mode creates a challengingly realistic engine driving experience"
So keep your issues coming i say, if any of the RW crew read your comments i'm sure they would take it on board... :D

Cheers Mick.

Re: The Massive Obvious BUG Thread

Posted: Wed Jun 17, 2009 12:35 am
by Kromaatikse
By request, let's start with the Diesel-Hydraulic.

Ironically, this is the system on which I have the least detailed information. However, I've ridden in enough Class 158s and 142s to know how the T211r works with typical DMU operations. I can back this up with documents from Voith themselves, and a little extrapolation from Class 101 DMUs (which have only a fluid coupling) and automotive practice (which use only a torque converter in automatic transmissions). Perhaps some German-speaking railfans can dig up more detailed information on the V200 et al. I'm pretty sure that the transmissions for full locomotives usually had more than two gears.

Let's start with a basic description of the Voith T211r transmission http://www.voithturbo.com/sys/php/docdb ... hp?pk=2387, which is used in the 142, 15x, and the 166. It has two "gears", but both are at the same gear ratio, which is slightly below unity. The difference between the two "gears" is that the "low" one has a torque converter, and the "high" one has a fluid coupling. Switching between gears is performed by pumping the hydraulic fluid out of one and into the other, and switching to neutral is performed by pumping the fluid out of both and into a storage tank. Obviously, this pumping action takes a few seconds to complete fully, but useful torque is transmitted within a second of the low gear engaging. Switching between high and low gears is performed automatically at or near the point where the output torque from each gear is equal. The transmission has a simple electronic command interface suitable for multiple-unit operation, and incorporates a governor for the attached engine.

Notice that in this instance, the transmission controls the engine! Quite the reverse of automotive practice.

The obvious question is what makes the fluid coupling and the torque converter so different that Voith, a well-respected hydraulic transmission manufacturer, would include both in the same unit but not different gear ratios?

The Torque Converter

Every modern car with an automatic gearbox uses a torque converter in front of it. Simply put, this is because it allows for very rapid acceleration from a standing start. The torque converter essentially takes the difference between the input (engine) and output (driveshaft) speeds, and produces a torque related to that difference. In particular, the torque on the driveshaft can be several times greater than the torque on the engine, if the difference is large enough.

Another way to look at the torque converter is as a power-conserving device. While some power is always lost due to internal friction and so on, the rest is transmitted faithfully to the wheels.

The disadvantage of the torque converter is that it slips quite badly, due to the inherent power losses, even when the driveshaft has spun up to a speed that the engine can comfortably match. This makes it inefficient for cruising, as owners of many old cars will attest. Newer cars have a "lockup" device to counter this, but this is too fragile for railway use.

The Fluid Coupling

It's worth examining the Class 101 DMU http://locodocs.co.uk/brmanuals/126general4.htm for an example of a fluid coupling in railway service. The 101 used a similar 150hp engine as in later DMUs, but mated to a conventional four-speed transmission (similar to that found in "automatic" cars, but heavier-duty and manually-operated) via a fluid coupling. The throttle was also manually operated, there being no governor.

The problem with the fluid coupling is that it does not transmit torque well at low speeds. In particular, it completely lacks the torque-multiplying characteristics of the torque converter. This is why the 101's 1st gear is of such a low ratio that it is only usable up to 15mph. To avoid overheating the coupling, drivers had to use the 1st gear whever starting, unless perhaps they were able to make a gravity start. These early DMUs were no competition for the well-established 4MT-based rush-hour commuter services in the London area, since they simply could not accelerate quickly enough.

But it does have an advantage when both the driveshaft and the engine are turning quickly, because then it tightly couples the two together with very little wasted energy. This is why it finds a place in the top ratio of most hydraulic transmissions - for efficiency when cruising. At about 50mph, a modern DMU will change to the fluid coupling, and the engine note will fall quite characteristically to match the road speed, after having spent all it's time until then on the limiter. (This engine note change is another thing not simulated for the 166.)

So another way to look at the fluid coupling is as a torque-conserving device. It wastes power when slipping, as it must at low driveshaft speeds, but is the most effective type at high speeds.

Putting it together

Listening to any modern DMU starting from rest, you will probably notice that the engine revs wildly, reaching a obvious limiter speed for a second or so, and then comes down slightly as the transmission takes the load. This is a direct result of the relatively slow fluid pumping required to engage the torque converter and thus the "low" gear. Once you know about this little quirk, simulating it accurately becomes much easier.

As for the rule the governor operates on... I don't actually know. I'm fairly sure it isn't a hard RPM setting per throttle position, though. It's more likely to be a fuel-flow setting (fuel flow being a very good proxy for power output in diesels), with an RPM limit only for safety. Remember of course that power is a multiple of both torque and speed, a topic I'll come back to in earnest for Diesel-Electrics.

Re: The Massive Obvious BUG Thread

Posted: Wed Jun 17, 2009 12:41 am
by AndyM77
ghawk2005 wrote:ohhhh dear, yet another massive ego-head has joined. if you're so experienced and clever, you write a better train/rail simulator.

Kromaatikse has raised valid points in regards to all aspects of this thread, the signalling in particular has never really been properly fixed, even though it was claimed to be sorted out in Railsim Mk2. Railworks was supposed to have improved AI, which would encompass the signalling along with the despatcher being sensible.

Sadly I'm willing to bet that all of the points that Kromaatikse made will as usual be totally overlooked by the Railsimulator.com team, or thrown into the "yes, we can do it but would rather release addons instead" pile..

Re: The Massive Obvious BUG Thread

Posted: Wed Jun 17, 2009 1:17 am
by Sly401
Well best way to show that you know something is to do it... not show your ignorance by making incorrect statements as if they are fact under some sensationalist headline.

Yes it does get my goat and I will keep on, taking to task those that seek to be a big noise, by virtue of nothing more than being controversial.

If you are a software engineer... you quite obviously aren't a transmission expert, (despite name droppining in a few technical model names....) should be no problem for you to make this platform do whatever you want it to.

Yes I think the mods should be discouraging this practice of disinformation.

Critisism is absolutely fine by me and you won't find any post on here by me to the contrary, but you are misleading people for gain in your own personal standing, nothing more.



Sly

Barking up the wrong tree

Posted: Wed Jun 17, 2009 3:54 am
by sniper297
Sly, gotta disagree with you here, he DOES have valid points. Unfortunately, Kromaatikse, as you say the foundation is all wrong, and it looks to me and Rich Garber (another MSTS route developer from the rebel colonies most of you never heard of) as if the same people were indeed involved. First clue was the automatic VS manual switches, in MSTS those couldn't be thrown by the player. Reason: to lock out the Murphy factor. That carried over into railsim, same type of coding. In MSTS the trains didn't react at all to the signals - the trains followed the PATH, the path was what either advanced or stopped advancing based on signal state, and to further muddy the waters certain types of signals are inactive by default, and have to be triggered into an active state by the path to show anything other than red. I DID find a clumsy workaround;

http://forums.flightsim.com/vbts/showth ... p?t=239517

If you have MSTS you can check out how that works by downloading Port Ogden & Northern version 11 from the MSTS section of this file library, or over at the US train-sim.com. They don't look or act like prototype signals, but the paths react to the whole Rube Goldberg contraption in such a way that the AI traffic behaves the way it's supposed to.

When KRS was first announced, I made the prediction that they couldn't possibly screw it up worse than MSTS, because the laws of nature would make that impossible. I was dead wrong there, in RS they use the exact same train follows path subroutine, but left out the Signal Number Clear Ahead that in MSTS allowed at least the appearance of artificial intelligence. In MSTS the AI path set all the switches for its route WHEN IT SPAWNED, not two hours ahead of time at the beginning of the activity, and if you didn't want it to set the entire route you added signals so it would only set the switches X number of signals ahead as defined in the signal scripts. Same trouble with the player path given automatic priority over the AI path, requiring a lot of screwing around with double reverse points to get an AI train to pass you, or just do it the way I did it in PO&N by making the player run off the path and set his own routing. Someone will pop in now and say in RS you can set the priority for the trains - yeah, I know, I read the manual too, but that has absolutely no effect. The player tries to cross the path of an AI train not due to spawn for two hours, and finds the manual switches locked so he can't get off the mainline. Using clumsy workarounds like driving only a single engine and getting really close to the switch you CAN throw it long enough to get off, but then when the AI train spawns two hours later and 100 miles away, it has a spaz attack from the memory of you having crossed the path. Reports I'm getting show that "further enhanced" hasn't actually FIXED the blasted thing;

http://forums.flightsim.com/vbts/showth ... p?t=282577

Give these guys a rusty old Hudson with no engine, they would "Further enhance" it by spraying a new coat of paint on it. I'm with you, Kromaatikse, but the signals themselves are not the problem, the AI pathing is the problem. And I'm predicting here and now that it will never get fixed because they don't think of it as broken, after all you can run AI trains on parallel tracks, what more do you want? The AI trains are animated background scenery like the vehicles on the road and the boats on the water, were never designed for and never will be any more sophisticated than that. Therefore how the signals work is irrelevant since they're only animated scenery too. RS is a good scenery simulator, but it's a poor excuse for a rail simulator.

Re: The Massive Obvious BUG Thread

Posted: Wed Jun 17, 2009 4:23 am
by paulz6
I will never take the dispatcher seriously until it can pass this simple test.

http://forums.uktrainsim.com/viewtopic. ... 06&t=95346

The scenario failed to load !!! result indicates just how fundamentally bad it is.

Re: The Massive Obvious BUG Thread

Posted: Wed Jun 17, 2009 4:25 am
by SuperTux
Lets take a positive thought and lets say they decide to agree and change the behaviour of the AI, what would it take and what would the repercussions likely to be?