As some of you may know, in real life, on locomotive hauled trains, i.e, Amtrak, NJT, the brake system is set up as an Air Brake with Partial release, (equivalent of old AMUE system in the NYCS). And, in real life, the dynamic / regenerative brakes are actuated based on the the air pressure in the brake pipe.
However, in OpenBVE, if you set a train's brake system to the AB w/ PR setting (which is indicated by the value "2" in the "brake type" command in the train.dat file), the dynamic brakes do not operate. I have identified the source code file in the program that dictates how trains operate under certain settings. It is the "TrainManager" file, found in the "old code" -> "OpenBve" -> "openBVE" -> "SourceCode" -> "BVE" -> "Program Files" -> "C Drive" (or whatever drive you have the BVE directory installed.
But the problem is, I am having trouble deciphering which lines of code need to be changed, and how many need to be changed, at that. So far, the only specific section I have identified is the following:
// deceleration provided by brake
double pressureratio = Train.Cars[CarIndex].Specs.AirBrake.BrakeCylinderCurrentPressure / Train.Cars[CarIndex].Specs.AirBrake.BrakeCylinderServiceMaximumPressure;
DecelerationDueToBrake = pressureratio * Train.Cars[CarIndex].Specs.BrakeDecelerationAtServiceMaximumPressure;
// deceleration provided by motor
if (Train.Cars[CarIndex].Specs.BrakeType != CarBrakeType.AutomaticAirBrake && Math.Abs(Train.Cars[CarIndex].Specs.CurrentSpeed) >= Train.Cars[CarIndex].Specs.BrakeControlSpeed & Train.Specs.CurrentReverser.Actual != 0 & !Train.Specs.CurrentEmergencyBrake.Actual) {
double f = (double)Train.Specs.CurrentBrakeNotch.Actual / (double)Train.Specs.MaximumBrakeNotch;
double a = Train.Cars[CarIndex].Specs.MotorDeceleration;
DecelerationDueToMotor = f * a;
} else {
DecelerationDueToMotor = 0.0;
}
But regardless of any changes I make to it, the operation in openBVE does not change; the dynamics refuse to actuate when the train brake mode is set to Air Brake w/ Partial Release. If anyone here was involved in the development of the source code or knows anyone who was, I would be grateful to hear their input on my situation.