mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-20 16:14:52 +02:00
fix: review findings of PR 217
- the pressures of the mover are in bar (MinCP=7.0 in the vehicle definitions), so the 0.2 the pneumatic horns needed was 0.2 bar; it's 2 bar now, and the tests take their pressures in bar too, - the lamps of the ground relay and of the motor overload relays follow the pressure switch as the line contactors one does, TMoverParameters::MainCircuitLampsEnabled(), so the lamps of one cab go out together, - the joint oil and fuel pump switch leaves out a pump started automatically, which ignores the switching: with one, it couldn't turn the other off, and showed off with both running (OilFuelPumpsEnabled()), - the kind of the train heating switch comes from the occupied vehicle on entering the cab too, as in the switch commands; in a multiple unit these are different vehicles, - CouplerForce() put the force taken back by the other vehicle on its far coupler when the vehicles faced each other (Couplers[1 - End] rather than the coupler it's coupled with), - the velocity difference along the coupler axis computed once, CouplerVelocityDifference(), for CouplerForce() and CollisionVelocity(), - the attachcoupler flag added without the SetFlag() call with 0, the index of the mirror moves noted as by side. Tests: the coupler force of vehicles facing each other, the joint switch with an automatic pump, the lamps of the main circuit, the horn and compressor pressures in bar.
This commit is contained in:
@@ -14,9 +14,9 @@ double const step{0.01};
|
||||
|
||||
// a compressor which starts on its own, fed from the main circuit unless given another Power, its pressure
|
||||
// switch between MinCP and MaxCP, and an empty main reservoir for it to fill
|
||||
vehicle compressor_vehicle(double const Delay, std::string const &Power = "Main", double const MinCP = 0.65) {
|
||||
vehicle compressor_vehicle(double const Delay, std::string const &Power = "Main", double const MinCP = 6.5) {
|
||||
auto definition{definition::load("wagon")};
|
||||
definition.set("Brake", "Vv", 1.0).set("Brake", "MinCP", MinCP).set("Brake", "MaxCP", 0.8);
|
||||
definition.set("Brake", "Vv", 1.0).set("Brake", "MinCP", MinCP).set("Brake", "MaxCP", 8.0);
|
||||
definition.set("Brake", "CompressorSpeed", 0.01);
|
||||
if (false == Power.empty()) {
|
||||
definition.set("Brake", "CompressorPower", Power);
|
||||
@@ -99,17 +99,17 @@ TEST_CASE("compressor: a compressor fed from the low voltage waits from the low
|
||||
TEST_CASE("compressor: the pressure switch stops the compressor above the cut-out pressure") {
|
||||
auto vehicle{compressor_vehicle(0.0)};
|
||||
vehicle->Mains = true;
|
||||
vehicle->CompressedVolume = 0.85; // over MaxCP, in the reservoir of 1 m3
|
||||
vehicle->CompressedVolume = 8.5; // over MaxCP, in the reservoir of 1 m3
|
||||
run_compressor(vehicle, step);
|
||||
CHECK(vehicle->CompressorGovernorLock);
|
||||
CHECK_FALSE(vehicle->CompressorFlag);
|
||||
}
|
||||
|
||||
TEST_CASE("compressor: without a pressure switch the air over the cut-out pressure is vented") {
|
||||
auto vehicle{compressor_vehicle(0.0, "Main", 0.8)}; // MinCP the same as MaxCP: no pressure switch
|
||||
auto vehicle{compressor_vehicle(0.0, "Main", 8.0)}; // MinCP the same as MaxCP: no pressure switch
|
||||
vehicle->Mains = true;
|
||||
vehicle->CompressedVolume = 0.85;
|
||||
vehicle->CompressedVolume = 8.5;
|
||||
run_compressor(vehicle, step);
|
||||
REQUIRE(vehicle->CompressorFlag); // nothing stops it
|
||||
CHECK(vehicle->CompressedVolume < 0.85 * 0.81); // a fifth of the air let out
|
||||
CHECK(vehicle->CompressedVolume < 8.5 * 0.81); // a fifth of the air let out
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user