Closed k4kfh closed 8 years ago
The primary problem with this arises in implementation. Adding a constraint to the final speed would skew the number if and only if there was an outside force (namely grade) "helping" motive force out. Downhill is the only instance I can think of in which the motors would rightfully spin faster than they can turn themselves. This seems like a small issue, however a runaway train due to improper braking is an important part of the simulation and I think it needs to be addressed.
I believe the best way to handle this is to create a system to set tractive effort to zero (quietly, without notifying the user) once the speed passes the limit. One of two things would consistently happen:
Not going downhill:
Going downhill:
This seems the best, most realistic way to handle the issue. It also solves the problem of differing max speeds in an MU consist. If one locomotive has a higher max speed than another, the inferior locomotive simply becomes useless above its maximum speed.
A locomotive cannot keep accelerating forever regardless of how much power it has. The traction motors will only spin so fast with a certain voltage, so at some point there is a defined limit to speed. For an EMD F7 I believe this to be around 60mph in notch 8, so I can assume that it is linear (meaning 7.5mph per notch). This is simple in logical principle, but will require careful implementation for efficient operation in software. In the UDT project,
constraint()
was used, but JavaScript doesn't natively have that, so a solution will need to be cobbled together.