I think I will look like the French guy who likes to complain... but anyway...
I will first put the private message I sent to Chris and James when asked about the change... there was no real discussion with me about this later on... so I am putting this in public.
Serana, on 28 December 2021 - 04:01 PM, said:
Hi,
I don't agree with the application of the "not-for-unstable" tag since the pull request doesn't break compilation and the run of the software. It doesn't provoke any crash or warnings.
To give you some backstory:
- The "DoesBrakeCutsPower" was implemented in the TCS interface in 2016 (
https://github.com/o...5956d782da886bd). This allows the customization of how the traction/braking interlocking works depending on the rules of the corresponding country. Also, the traction/braking interlock intervenes on the traction authorization which is also used by the signalling part of the TCS system so it makes sense including it in the TCS subsystem.
- The "ORTSDoesVacuumBrakeCutsPower" and other associated parameters were implemented in the MSTSLocomotive in 2020 by Peter Newell (
https://github.com/o.../pull/103/files). I did not participate to the review process of this pull request (I may not have been available at that time), but I think that the implementation made back then is wrong. Peter implemented the traction/braking interlock for vacuum brakes in the MSTSLocomotive class whereas it should have been implemented in the TCS interface.
On the principle behind this refactoring, to me, the traction/brake interlocking is part of the TCS system as much as the vigilance subsystem and the signalling onboard subsystem.
The existing code for air brakes only was able to check the brake cylinder pressure.
I first moved the code from the vacuum brakes traction/braking interlock (which is able to check the vacuum brake pipe pressure (with hysteresis).
I then added the code needed for air brake pipe pressure check (with a single limit or with hysteresis).
And finally, I added new parameters needed for the implementation of the traction/braking interlock specified in the european TSI LOC&PAS.
I also documented the parameters since they were not included in the manual modification of the pull request of Peter. By the way, if we made a big change in a part of the code for a functionnality that was not even documented in the manual,
is it really a problem ? Since it was not documented, It was not really made available to content creators.
About Darwins' TCS script, it's not technically his script: it's the AWS script written by Carlo. My change did not really break any code on his side (I mean that there was no compilation error for this particular script after my change) but the traction/braking interlock
for vacuum brakes only doesn't have an effect anymore since it was not implemented in the AWS script and is no longer inside the locomotive code. I provided a new version which adds the traction/braking interlocking (this is a two line change) and it may need to be added to the italian script if needed.
To go back to the origin of the occurence of this problem, I think this bad design happened also because of how we manage the review process. Currently, any developer can say that the code is right, but the coherency of the code in the different parts of the simulator may not have been checked. It needs to be checked by maintainers which are specialists of the part of the simulator which is modified. The review by only one (random) developer only provides code quality verification, not coherence with the design.
I already discussed a bit about the need for maintainers with Chris some months ago but we didn't start a topic about this on the forum yet. I think it's time we start a topic about this.
Also, i currently have a feeling that I want to share. Most of the members of the team only knows each other from the discussions on the forums. This impacts the team dynamics since each developer works in their own corner.
I think we should organize team talks in vocal (for example, on Discord every month) in order to know what other developers want to do, to discuss in vocal some designs, some feature requests or some pull requests... and to know the other developers beyond the discussions we have on the forums.
We really need to have a talk about this... this bad design also originates from how we manage the project.
I would really like for us to talk about it because I am starting getting fed up with how the project is managed and I am really starting thinking about creating an official fork and that's not something I would like to do.
It's not necessarily related to the current problem but :
- Blueprints are not validated for months. At least, tell us what is wrong.
- We wait for code reviews for months.
- Most code reviews do not look beyond the correctness of the code. Design must also be checked.
- Most developers don't really know each other since we only talk through the forums, there's no real team dynamics.
The corresponding solutions could be:
- We need people who are specialist of some main parts of the code to be maintainers, who can manage their part (blueprint validation, code review with emphasis on the design check, perhaps also with the maintaining of an UML model to represent how must be the class hierarchy)
- Yes, I know, we are all volunteers but if someone can't validate all of a pull request, at least, validate the parts that you can understand. That's by the way what I try to do... with varying results.
- We need to be able to talk in an easier way than a forum. When you want to debate, to discuss an idea, a topic in a forum is a very slow way and sometimes difficult way to talk about it. You sometimes need dozens of lines to convey the idea you have. A solution could be to create meetings on a voice server (for example, monthly) with developers and content creators.
About the previous answers:
James Ross, on 20 January 2022 - 01:57 PM, said:
Not really relevant to the problem, but this is a good example of why everyone should have a forum thread for their own new features - it'll help spot such conflicting functionality.
This is relevant because if there was a bad design, it makes no sense maintaining it. It's like saying "There was some (bad) design in MSTS, I will follow it blindly." You will never improve the simulator with that thinking.
James Ross, on 20 January 2022 - 01:57 PM, said:
Yup, this is a problem that needs fixing - we cannot release a new stable version without the TCS compatibility fixed.
The ruling from ORMT is that we need to keep this compatible. We must change the TCS scripting interface so that the original AWS TCS script works.
Public APIs are not everlasting. Even .Net or Qt have breaking changes once in a while. Then packages who are depending on them are upgraded to support the new version of the API and people then update their software.
As I said, updates are not really a problem when the community follows your project (just look at download stats on Carlo's website). And if it really is, the solution is simple: content updaters (we can, for example, distribute scripts directly with the simulator updater) or package managers (if we want each developer to manage the script distribution by themselves).
James Ross, on 20 January 2022 - 01:57 PM, said:
Yup, this is a problem that needs fixing - we cannot release a new stable version without the TCS compatibility fixed.
The ruling from ORMT is that we need to keep this compatible. We must change the TCS scripting interface so that the original AWS TCS script works.
The current method is to use a single "Update" method, but that has caused a problem here because it provides no way for a script to only partially implement the TCS interface, something which is needed for backwards compatibility.
Using virtual "UpdateXyz" methods would solve that, because the base class would have the default/built-in implementation of a feature and the TCS script can override it (if it is new enough) or not (if it is older) and it would work both ways.
I feel like the events are just a different way of writing the virtual "UpdateXyz" methods, but perhaps I am missing something you'd thought of?
However, I do not mind what we use going forwards, but we must maintain compatibility with existing scripts that work with Open Rails 1.4 (and earlier versions).
The problem is that we are talking about systems that are not managed the same for each country. Sometimes the traction braking interlock will disable traction, sometimes it will open the circuit breaker.
This functionnality must be able to work correctly with other subsystems, such as national TCS or ETCS. It is interdependent with the onboard signalling system.
For example, when the traction requires the circuit breaker to be open when the TCS wants it to be closed, how do you say which one has priority?
The current answer: you decide in the main Update function if the action of closing or the action of opening must be triggered.
So that's why you must have everything managed in the same place: to manage when different subsystems have antagonist commands.
So two solutions are possible:
- You modularize everything: each subsystem will have it own class/interface and there is a unifying layer which goal is to merge what each subsystems wants (a bit like what is done with the PowerSupply classes). This unifying layer needs to be customizable to correspond to how it works in each country or even in each locomotive. That would be great design-wise, but, at first, it will completely break the compatibility since we will have to move code from the TCS interface to new interfaces.
- You put everything in the same place: that's what is proposed currently for the traction braking interlock with reduced compatibility issue (the traction braking interlock will not work temporarily for trains with vacuum brake and TCS script at the same time) but that can be re-added when the script is updated. As I said, it's not a blocking problem.