16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-22 12:49:18 +02:00

1. Poprawione asynchrony.

2. Możliwość zdefiniowania koloru tła ekranu ładowania w eu07.ini.
3. Dodanie logowania ruchu ramek WM_COPYDATA do oddzielnego pliku.
4. Dodana ramka skrócona aktywnych AI.
5. Dodana ramka sterowania uszkodzeniami pojazdów.
6. Dodanie kręciołka od świateł (w tym trakcja wielokrotna).
7. Rozbudowa asynchronów, m.in. tempomat, zadawanie siły (w kN), przeciwpoślizg, czyste ED itd.
8. Dodanie animacji drtzwi odskokowo-przesuwnych.
9. Dodanie możliwości uszkadzania pojazdów (EN57).
10. Uruchomienie sprzęgu WN, zwłaszcza w asynchronach - do przejrzenia logowanie braków napięcia.
11. Wyłączanie radiostopu przez wyłączanie radia, a nie przez ruch zaworem maszynisty.
12. Usunięcie wyłącznika ciśnieniowego w EN57 (proteza, trzeba zrobić wpis na to).
13. Wstępna wersja hamowania rekuperacyjnego wraz z przechodzeniem na hamowanie oporowe.
14. Cała masa nowych zmiennych stanu dostępna dla ekranu (Pythona).
15. Nowa stara smuga z dawnego SPKSu.
16. Inne, które mogłem zapomnieć lub nie uszczegółowić.
17. Poprawione wyświetlanie haslera
This commit is contained in:
firleju
2016-01-28 22:47:40 +01:00
parent 46ea2dde39
commit c84bf7319b
26 changed files with 1192 additions and 295 deletions

View File

@@ -93,8 +93,9 @@ enum TBrakeValve { NoValve, W, W_Lu_VI, W_Lu_L, W_Lu_XR, K, Kg, Kp, Kss, Kkg, Kk
#pragma option pop
#pragma option push -b-
enum TBrakeHandle { NoHandle, West, FV4a, M394, M254, FVel1, FVel6, D2, Knorr, FD1, BS2, testH, St113
};
enum TBrakeHandle {
NoHandle, West, FV4a, M394, M254, FVel1, FVel6, D2, Knorr, FD1, BS2, testH, St113,
MHZ_P, MHZ_T, MHZ_EN57 };
#pragma option pop
#pragma option push -b-
@@ -425,6 +426,10 @@ public:
Byte BrakeCtrlPosNo;
Byte MainCtrlPosNo;
Byte ScndCtrlPosNo;
Byte LightsPosNo;
Byte LightsDefPos;
bool LightsWrap;
Byte Lights[2][16];
bool ScndInMain;
bool MBrake;
TSecuritySystem SecuritySystem;
@@ -454,6 +459,7 @@ public:
double RVentCutOff;
int CompressorPower;
int SmallCompressorPower;
bool Trafo;
double dizel_Mmax;
double dizel_nMmax;
double dizel_Mnmax;
@@ -481,7 +487,7 @@ public:
TShuntScheme SST[33];
double PowerCorRatio;
double Ftmax;
double eimc[21];
double eimc[26];
int MaxLoad;
AnsiString LoadAccepted;
AnsiString LoadQuantity;
@@ -496,7 +502,11 @@ public:
double DoorCloseSpeed;
double DoorMaxShiftL;
double DoorMaxShiftR;
double DoorMaxPlugShift;
Byte DoorOpenMethod;
double PlatformSpeed;
double PlatformMaxShift;
Byte PlatformOpenMethod;
bool ScndS;
TLocation Loc;
TRotation Rot;
@@ -559,6 +569,7 @@ public:
double LimPipePress;
double ActFlowSpeed;
Byte DamageFlag;
Byte EngDmgFlag;
Byte DerailReason;
TCommand CommandIn;
AnsiString CommandOut;
@@ -571,6 +582,7 @@ public:
bool Mains;
Byte MainCtrlPos;
Byte ScndCtrlPos;
Byte LightsPos;
int ActiveDir;
int CabNo;
int DirAbsolute;
@@ -763,6 +775,7 @@ static const Shortint maxcc = 0x4;
static const Shortint LocalBrakePosNo = 0xa;
static const Shortint MainBrakeMaxPos = 0xa;
static const Shortint ManualBrakePosNo = 0x14;
static const Shortint LightsSwitchPosNo = 0x10;
static const Shortint dtrack_railwear = 0x2;
static const Shortint dtrack_freerail = 0x4;
static const Shortint dtrack_thinrail = 0x8;
@@ -847,6 +860,8 @@ static const Shortint eimc_p_Ph = 0x11;
static const Shortint eimc_p_Vh0 = 0x12;
static const Shortint eimc_p_Vh1 = 0x13;
static const Shortint eimc_p_Imax = 0x14;
static const Shortint eimc_p_abed = 0x15;
static const Shortint eimc_p_eped = 0x16;
static const Shortint eimv_FMAXMAX = 0x0;
static const Shortint eimv_Fmax = 0x1;
static const Shortint eimv_ks = 0x2;

View File

@@ -92,8 +92,8 @@ enum TBrakeValve { NoValve, W, W_Lu_VI, W_Lu_L, W_Lu_XR, K, Kg, Kp, Kss, Kkg, Kk
#pragma option pop
#pragma option push -b-
enum TBrakeHandle { NoHandle, West, FV4a, M394, M254, FVel1, FVel6, D2, Knorr, FD1, BS2, testH, St113
};
enum TBrakeHandle { NoHandle, West, FV4a, M394, M254, FVel1, FVel6, D2, Knorr, FD1, BS2, testH, St113,
MHZ_P, MHZ_T, MHZ_EN57 };
#pragma option pop
#pragma option push -b-
@@ -404,6 +404,10 @@ public:
Byte BrakeCtrlPosNo;
Byte MainCtrlPosNo;
Byte ScndCtrlPosNo;
Byte LightsPosNo;
Byte LightsDefPos;
bool LightsWrap;
Byte Lights[2][16];
bool ScndInMain;
bool MBrake;
TSecuritySystem SecuritySystem;
@@ -433,6 +437,7 @@ public:
double RVentCutOff;
int CompressorPower;
int SmallCompressorPower;
bool Trafo;
double dizel_Mmax;
double dizel_nMmax;
double dizel_Mnmax;
@@ -460,7 +465,7 @@ public:
TShuntScheme SST[33];
double PowerCorRatio;
double Ftmax;
double eimc[21];
double eimc[26];
int MaxLoad;
AnsiString LoadAccepted;
AnsiString LoadQuantity;
@@ -475,7 +480,11 @@ public:
double DoorCloseSpeed;
double DoorMaxShiftL;
double DoorMaxShiftR;
double DoorMaxPlugShift;
Byte DoorOpenMethod;
double PlatformSpeed;
double PlatformMaxShift;
Byte PlatformOpenMethod;
bool ScndS;
TLocation Loc;
TRotation Rot;
@@ -538,6 +547,7 @@ public:
double LimPipePress;
double ActFlowSpeed;
Byte DamageFlag;
Byte EngDmgFlag;
Byte DerailReason;
TCommand CommandIn;
AnsiString CommandOut;
@@ -550,6 +560,7 @@ public:
bool Mains;
Byte MainCtrlPos;
Byte ScndCtrlPos;
Byte LightsPos;
int ActiveDir;
int CabNo;
int DirAbsolute;
@@ -761,6 +772,7 @@ static const Shortint maxcc = 0x4;
static const Shortint LocalBrakePosNo = 0xa;
static const Shortint MainBrakeMaxPos = 0xa;
static const Shortint ManualBrakePosNo = 0x14;
static const Shortint LightsSwitchPosNo = 0x10;
static const Shortint dtrack_railwear = 0x2;
static const Shortint dtrack_freerail = 0x4;
static const Shortint dtrack_thinrail = 0x8;
@@ -845,6 +857,8 @@ static const Shortint eimc_p_Ph = 0x11;
static const Shortint eimc_p_Vh0 = 0x12;
static const Shortint eimc_p_Vh1 = 0x13;
static const Shortint eimc_p_Imax = 0x14;
static const Shortint eimc_p_abed = 0x15;
static const Shortint eimc_p_eped = 0x16;
static const Shortint eimv_FMAXMAX = 0x0;
static const Shortint eimv_Fmax = 0x1;
static const Shortint eimv_ks = 0x2;

View File

@@ -77,6 +77,7 @@ CONST
LocalBrakePosNo=10; {ilosc nastaw hamulca pomocniczego}
MainBrakeMaxPos=10; {max. ilosc nastaw hamulca zasadniczego}
ManualBrakePosNo=20; {ilosc nastaw hamulca recznego}
LightsSwitchPosNo=16;
{uszkodzenia toru}
dtrack_railwear=2;
@@ -182,6 +183,8 @@ CONST
eimc_p_Vh0=18;
eimc_p_Vh1=19;
eimc_p_Imax=20;
eimc_p_abed=21;
eimc_p_eped=22;
//zmienne dla asynchronów
eimv_FMAXMAX=0;
@@ -248,7 +251,7 @@ TYPE
{podtypy hamulcow zespolonych}
TBrakeSubSystem = (ss_None, ss_W, ss_K, ss_KK, ss_Hik, ss_ESt, ss_KE, ss_LSt, ss_MT, ss_Dako);
TBrakeValve = (NoValve, W, W_Lu_VI, W_Lu_L, W_Lu_XR, K, Kg, Kp, Kss, Kkg, Kkp, Kks, Hikg1, Hikss, Hikp1, KE, SW, EStED, NESt3, ESt3, LSt, ESt4, ESt3AL2, EP1, EP2, M483, CV1_L_TR, CV1, CV1_R, Other);
TBrakeHandle = (NoHandle, West, FV4a, M394, M254, FVel1, FVel6, D2, Knorr, FD1, BS2, testH, St113);
TBrakeHandle = (NoHandle, West, FV4a, M394, M254, FVel1, FVel6, D2, Knorr, FD1, BS2, testH, St113, MHZ_P, MHZ_T, MHZ_EN57);
{typy hamulcow indywidualnych}
TLocalBrake = (NoBrake, ManualBrake, PneumaticBrake, HydraulicBrake);
@@ -472,7 +475,7 @@ TYPE
{promien cylindra, skok cylindra, przekladnia hamulcowa}
BrakeCylSpring: real; {suma nacisku sprezyn powrotnych, kN}
BrakeSlckAdj: real; {opor nastawiacza skoku tloka, kN}
BrakeRigEff: real; {sprawnosc przekladni dzwigniowej}
BrakeRigEff: real; {sprawnosc przekladni dzwigniowej}
RapidMult: real; {przelozenie rapidu}
BrakeValveSize: integer;
BrakeValveParams: string;
@@ -484,6 +487,9 @@ TYPE
{nastawniki:}
MainCtrlPosNo: byte; {ilosc pozycji nastawnika}
ScndCtrlPosNo: byte;
LightsPosNo, LightsDefPos: byte;
LightsWrap: boolean;
Lights: array [0..1] of array [1..16] of byte;
ScndInMain: boolean; {zaleznosc bocznika od nastawnika}
MBrake: boolean; {Czy jest hamulec reczny}
SecuritySystem: TSecuritySystem;
@@ -520,6 +526,7 @@ TYPE
RVentCutOff: real; {rezystancja wylaczania wentylatorow dla RVentType=2}
CompressorPower: integer; {0: bezp. z obwodow silnika, 1: z przetwornicy, reczne, 2: w przetwornicy, stale, 5: z silnikowego}
SmallCompressorPower: integer; {Winger ZROBIC}
Trafo: boolean; {pojazd wyposażony w transformator}
{-sekcja parametrow dla lokomotywy spalinowej z przekladnia mechaniczna}
dizel_Mmax, dizel_nMmax, dizel_Mnmax, dizel_nmax, dizel_nominalfill: real;
@@ -553,7 +560,7 @@ TYPE
Ftmax:real;
{- dla lokomotyw z silnikami indukcyjnymi -}
eimc: array [0..20] of real;
eimc: array [0..25] of real;
{-dla wagonow}
MaxLoad: longint; {masa w T lub ilosc w sztukach - ladownosc}
@@ -564,8 +571,11 @@ TYPE
DoorStayOpen: real; {jak dlugo otwarte w przypadku DoorCloseCtrl=2}
DoorClosureWarning: boolean; {czy jest ostrzeganie przed zamknieciem}
DoorOpenSpeed, DoorCloseSpeed: real; {predkosc otwierania i zamykania w j.u. }
DoorMaxShiftL,DoorMaxShiftR: real;{szerokosc otwarcia lub kat}
DoorMaxShiftL,DoorMaxShiftR,DoorMaxPlugShift: real;{szerokosc otwarcia lub kat}
DoorOpenMethod: byte; {sposob otwarcia - 1: przesuwne, 2: obrotowe, 3: trójelementowe}
PlatformSpeed: real; {szybkosc stopnia}
PlatformMaxShift: real; {wysuniecie stopnia}
PlatformOpenMethod: byte; {sposob animacji stopnia}
ScndS: boolean; {Czy jest bocznikowanie na szeregowej}
{--sekcja zmiennych}
@@ -629,6 +639,7 @@ TYPE
DamageFlag: byte; //kombinacja bitowa stalych dtrain_* }
EngDmgFlag: byte; //kombinacja bitowa stalych usterek}
DerailReason: byte; //przyczyna wykolejenia
//EndSignalsFlag: byte; {ABu 060205: zmiany - koncowki: 1/16 - swiatla prz/tyl, 2/31 - blachy prz/tyl}
@@ -648,6 +659,7 @@ TYPE
Mains: boolean; {polozenie glownego wylacznika}
MainCtrlPos: byte; {polozenie glownego nastawnika}
ScndCtrlPos: byte; {polozenie dodatkowego nastawnika}
LightsPos: byte;
ActiveDir: integer; //czy lok. jest wlaczona i w ktorym kierunku:
//względem wybranej kabiny: -1 - do tylu, +1 - do przodu, 0 - wylaczona
CabNo: integer; //numer kabiny, z której jest sterowanie: 1 lub -1; w przeciwnym razie brak sterowania - rozrzad
@@ -1048,6 +1060,7 @@ end;
{---------rozwiniecie deklaracji metod obiektu T_MoverParameters--------}
(*
function T_MoverParameters.GetTrainsetVoltage: real;
//ABu: funkcja zwracajaca napiecie dla calego skladu, przydatna dla EZT
var volt: real;
@@ -1074,6 +1087,14 @@ begin
end;
GetTrainsetVoltage:=volt;
end;
*)
function T_MoverParameters.GetTrainsetVoltage: real;
//ABu: funkcja zwracajaca napiecie dla calego skladu, przydatna dla EZT
//var volt: real;
begin
GetTrainsetVoltage:=Max0R(HVCouplers[1][1],HVCouplers[0][1]);
end;
@@ -1554,6 +1575,12 @@ begin
if (LastRelayTime>CtrlDelay) then
LastRelayTime:=0;
if (OK) and (EngineType=ElectricInductionMotor) then
if (Vmax<250) then
ScndCtrlActualPos:=Round(Vel+0.5)
else
ScndCtrlActualPos:=Round(Vel/2+0.5);
IncScndCtrl:=OK;
end;
@@ -1597,6 +1624,10 @@ begin
if OK then
if (LastRelayTime>CtrlDownDelay) then
LastRelayTime:=0;
if (OK) and (EngineType=ElectricInductionMotor) then
ScndCtrlActualPos:=0;
DecScndCtrl:=OK;
end;
@@ -1631,7 +1662,7 @@ begin
MainSwitch:=false; //Ra: przeniesione z końca
if ((Mains<>State) and (MainCtrlPosNo>0)) then
begin
if (State=false) or ({(MainCtrlPos=0) and} (ScndCtrlPos=0) and (ConvOvldFlag=false) and (LastSwitchingTime>CtrlDelay) and not TestFlag(DamageFlag,dtrain_out)) then
if (State=false) or ({(MainCtrlPos=0) and} (ScndCtrlPos=0) and ((ConvOvldFlag=false)or(TrainType=dt_EZT)) and (LastSwitchingTime>CtrlDelay) and not TestFlag(DamageFlag,dtrain_out) and not TestFlag(EngDmgFlag,1)) then
begin
if Mains then //jeśli był załączony
SendCtrlToNext('MainSwitch',ord(State),CabNo); //wysłanie wyłączenia do pozostałych?
@@ -1644,6 +1675,8 @@ begin
begin
dizel_enginestart:=State;
end;
if ((TrainType=dt_EZT)and(not State)) then
ConvOvldFlag:=true;
//if (State=false) then //jeśli wyłączony
// begin
//SetFlag(SoundFlag,sound_relay); //hunter-091012: przeniesione do Train.cpp, zeby sie nie zapetlal
@@ -1939,6 +1972,8 @@ begin
//poza tym jest zdefiniowany we wszystkich 3 członach EN57
with SecuritySystem do
begin
if (not Radio) then
EmergencyBrakeSwitch(false);
if (SystemType>0) and (Status>0) and (Battery) then //Ra: EZT ma teraz czuwak w rozrządczym
begin
//CA
@@ -1988,6 +2023,7 @@ begin
end
else if not (Battery) then
begin //wyłączenie baterii deaktywuje sprzęt
EmergencyBrakeSwitch(false);
//SecuritySystem.Status:=0; //deaktywacja czuwaka
end;
end;
@@ -2061,11 +2097,11 @@ begin
begin
dec(BrakeCtrlPos);
// BrakeCtrlPosR:=BrakeCtrlPos;
if EmergencyBrakeFlag then
begin
EmergencyBrakeFlag:=false; {!!!}
SendCtrlToNext('Emergency_brake',0,CabNo);
end;
//// if EmergencyBrakeFlag then //yB: czy to jest potrzebne?
//// begin
//// EmergencyBrakeFlag:=false; {!!!}
//// SendCtrlToNext('Emergency_brake',0,CabNo);
//// end;
//youBy: wywalilem to, jak jest EP, to sa przenoszone sygnaly nt. co ma robic, a nie poszczegolne pozycje;
// wystarczy spojrzec na Knorra i Oerlikona EP w EN57; mogly ze soba wspolapracowac
@@ -2443,7 +2479,7 @@ with BrakePressureTable[BrakeCtrlPos] do
end;
// if(EmergencyBrakeFlag)and(BrakeCtrlPosNo=0)then {ulepszony hamulec bezp.}
if(EmergencyBrakeFlag)or TestFlag(SecuritySystem.Status,s_SHPebrake) or TestFlag(SecuritySystem.Status,s_CAebrake) or (s_CAtestebrake=true)then {ulepszony hamulec bezp.}
if(EmergencyBrakeFlag)or TestFlag(SecuritySystem.Status,s_SHPebrake) or TestFlag(SecuritySystem.Status,s_CAebrake) or (s_CAtestebrake=true) or (TestFlag(EngDmgFlag,32)){ or (not Battery)}then {ulepszony hamulec bezp.}
dpMainValve:=dpMainValve/1+PF(0,PipePress,0.15)*dt;
//0.2*Spg
Pipe.Flow(-dpMainValve);
@@ -2479,12 +2515,18 @@ end;
if(DynamicBrakeFlag)and(EngineType=ElectricInductionMotor)then
begin
(Hamulec as TLSt).SetLBP(LocBrakePress);
(Hamulec as TLSt).SetLBP(LocBrakePress);
// if(Vel>10)then LocBrakePress:=0 else
// if(Vel>5)then LocBrakePress:=(10-Vel)/5*LocBrakePress
end
else
(Hamulec as TLSt).SetLBP(LocBrakePress);
if (BrakeValve = EStED) then
if MBPM<2 then
(Hamulec as TEStED).PLC(MaxBrakePress[LoadFlag])
else
(Hamulec as TEStED).PLC(TotalMass);
end;
CV1_L_TR:
begin
@@ -2496,7 +2538,7 @@ end;
begin
if MBPM<2 then
(Hamulec as TNESt3).PLC(MaxBrakePress[LoadFlag])
else
else
(Hamulec as TNESt3).PLC(TotalMass);
LocBrakePress:=LocHandle.GetCP;
(Hamulec as TNESt3).SetLBP(LocBrakePress);
@@ -2570,7 +2612,7 @@ begin
else
begin
CompressedVolume:=CompressedVolume+dt*CompressorSpeed*(2*MaxCompressor-Compressor)/MaxCompressor;
TotalCurrent:=0.0015*Voltage; //tymczasowo tylko obciążenie sprężarki, tak z 5A na sprężarkę
TotalCurrent:=TotalCurrent+0.0015*Voltage; //tymczasowo tylko obciążenie sprężarki, tak z 5A na sprężarkę
end
else
begin
@@ -2636,11 +2678,11 @@ begin
begin
CompressedVolume:=CompressedVolume+dt*CompressorSpeed*(2*MaxCompressor-Compressor)/MaxCompressor;
if (CompressorPower=5)and(Couplers[1].Connected<>NIL) then
Couplers[1].Connected.TotalCurrent:=0.0015*Couplers[1].Connected.Voltage //tymczasowo tylko obciążenie sprężarki, tak z 5A na sprężarkę
Couplers[1].Connected.TotalCurrent:=Couplers[1].Connected.TotalCurrent+0.0015*Couplers[1].Connected.Voltage //tymczasowo tylko obciążenie sprężarki, tak z 5A na sprężarkę
else if (CompressorPower=4)and(Couplers[0].Connected<>NIL) then
Couplers[0].Connected.TotalCurrent:=0.0015*Couplers[0].Connected.Voltage //tymczasowo tylko obciążenie sprężarki, tak z 5A na sprężarkę
Couplers[0].Connected.TotalCurrent:=Couplers[0].Connected.TotalCurrent+0.0015*Couplers[0].Connected.Voltage //tymczasowo tylko obciążenie sprężarki, tak z 5A na sprężarkę
else
TotalCurrent:=0.0015*Voltage; //tymczasowo tylko obciążenie sprężarki, tak z 5A na sprężarkę
TotalCurrent:=TotalCurrent+0.0015*Voltage; //tymczasowo tylko obciążenie sprężarki, tak z 5A na sprężarkę
end
end;
end;
@@ -2748,7 +2790,7 @@ end;
function T_MoverParameters.FuseOn: boolean;
begin
FuseOn:=false;
if (MainCtrlPos=0) and (ScndCtrlPos=0) and (TrainType<>dt_ET40) and Mains then
if (MainCtrlPos=0) and (ScndCtrlPos=0) and (TrainType<>dt_ET40) and ((Mains) or (TrainType<>dt_EZT)) and (not TestFlag(EngDmgFlag,1)) then
begin //w ET40 jest blokada nastawnika, ale czy działa dobrze?
SendCtrlToNext('FuseSwitch',1,CabNo);
if ((EngineType=ElectricSeriesMotor)or((EngineType=DieselElectric))) and FuseFlag then
@@ -3517,7 +3559,7 @@ var OK:boolean; //b:byte;
begin
//Ra 2014-06: dla SN61 nie działa prawidłowo
//rozlaczanie stycznikow liniowych
if (not Mains) or (FuseFlag) or (MainCtrlPos=0) or (BrakePress>2.1) or (ActiveDir=0) then //hunter-111211: wylacznik cisnieniowy
if (not Mains) or (FuseFlag) or (MainCtrlPos=0) or ((BrakePress>2.1)and(TrainType<>dt_EZT)) or (ActiveDir=0) then //hunter-111211: wylacznik cisnieniowy
begin
StLinFlag:=false; //yBARC - rozlaczenie stycznikow liniowych
AutoRelayCheck:=false;
@@ -3534,6 +3576,9 @@ begin
//brak PSR na tej pozycji działa PSR i prąd poniżej progu na tej pozycji nie działa PSR i pozycja walu ponizej
// chodzi w tym wszystkim o to, żeby można było zatrzymać rozruch na jakiejś pozycji wpisując Autoswitch=0 i wymuszać
// przejście dalej przez danie nastawnika na dalszą pozycję - tak to do tej pory działało i na tym się opiera fizyka ET22-2k
////// LocalBrakePos:=byte(ARFASI)+2*byte(ARFASI2);
begin
if (StLinFlag) then
begin
@@ -3652,7 +3697,7 @@ begin
begin
OK:=false;
//ybARC - tutaj sa wszystkie warunki, jakie musza byc spelnione, zeby mozna byla zalaczyc styczniki liniowe
if ((MainCtrlPos=1)or((TrainType=dt_EZT)and(MainCtrlPos>0)))and(not FuseFlag)and(Mains)and(BrakePress<1.0)and(MainCtrlActualPos=0)and(ActiveDir<>0) then
if ((MainCtrlPos=1)or((TrainType=dt_EZT)and(MainCtrlPos>0)))and(not FuseFlag)and(Mains)and((BrakePress<1.0)or(TrainType=dt_EZT))and(MainCtrlActualPos=0)and(ActiveDir<>0) then
begin
DelayCtrlFlag:=true;
if (LastRelayTime>=InitialCtrlDelay) then
@@ -3675,7 +3720,7 @@ begin
MainCtrlActualPos:=0;
OK:=true;
end
else
else
if(LastRelayTime>CtrlDownDelay)then
begin
if(MainCtrlActualPos<RListSize)then
@@ -3962,6 +4007,7 @@ end;
{SILY}
function T_MoverParameters.TractionForce(dt:real):real;
const kv=0.2; ksum=0.05;
var PosRatio,dmoment,dtrans,tmp,tmpV: real;
i: byte;
{oblicza sile trakcyjna lokomotywy (dla elektrowozu tez calkowity prad)}
@@ -4291,41 +4337,63 @@ begin
ElectricInductionMotor:
begin
if (Mains) then //nie wchodzić w funkcję bez potrzeby
if (Abs(Voltage)<EnginePowerSource.CollectorParameters.MinV) or (Abs(Voltage)>EnginePowerSource.CollectorParameters.MaxV) then
if (Abs(Voltage)<EnginePowerSource.CollectorParameters.MinV) or (Abs(Voltage)>EnginePowerSource.CollectorParameters.MaxV+100) then
begin
MainSwitch(false);
// tmpV:=V/(Pi*WheelDiameter)*Transmision.Ratio;//*DirAbsolute*eimc[eimc_s_p]; - do przemyslenia dzialanie pp
end;
tmpV:=abs(nrot)*(Pi*WheelDiameter)*3.6;//*DirAbsolute*eimc[eimc_s_p]; - do przemyslenia dzialanie pp
if (MainS) then
begin
if ((Hamulec as TLSt).GetEDBCP<0.25) and (LocHandle.GetCP<0.25) and (AnPos<0.01) then
dtrans:=(Hamulec as TLSt).GetEDBCP;
if ((dtrans<0.25) and (LocHandle.GetCP<0.25) and (AnPos<0.01)) or ((ShuntModeAllow) and (LocalBrakePos=0)) then
DynamicBrakeFlag:=false
else if (((BrakePress>0.25) and ((Hamulec as TLSt).GetEDBCP>0.25) or (LocHandle.GetCP>0.25))) or (AnPos>0.02) then
else if (((BrakePress>0.25) and (dtrans>0.25) or (LocHandle.GetCP>0.25))) or (AnPos>0.02) then
DynamicBrakeFlag:=true;
dtrans:=(Hamulec as TLSt).GetEDBCP*eimc[eimc_p_abed]; //stala napedu
if(DynamicBrakeFlag)then
begin
if eimv[eimv_Fmax]*sign(V)*DirAbsolute<-1 then
PosRatio:=-sign(V)*DirAbsolute*eimv[eimv_Fr]/(eimc[eimc_p_Fh]*Max0R((Hamulec as TLSt).GetEDBCP/MaxBrakePress[0],AnPos){dizel_fill})
begin
PosRatio:=-sign(V)*DirAbsolute*eimv[eimv_Fr]/(eimc[eimc_p_Fh]*Max0R(dtrans/MaxBrakePress[0],AnPos){dizel_fill});
end
else
PosRatio:=0;
PosRatio:=round(20*Posratio)/20;
if PosRatio<19.5/20 then PosRatio:=PosRatio*0.9;
(Hamulec as TLSt).SetED(PosRatio);
// if PosRatio<0 then
// PosRatio:=2+PosRatio-2;
(Hamulec as TLSt).SetED(Max0R(0.0,Min0R(PosRatio,1)));
// (Hamulec as TLSt).SetLBP(LocBrakePress*(1-PosRatio));
PosRatio:=-Max0R(Min0R((Hamulec as TLSt).GetEDBCP/MaxBrakePress[0],1),AnPos)*Max0R(0,Min0R(1,(Vel-eimc[eimc_p_Vh0])/(eimc[eimc_p_Vh1]-eimc[eimc_p_Vh0])));
eimv[eimv_Fzad]:=-Max0R(LocalBrakeRatio,(Hamulec as TLSt).GetEDBCP/MaxBrakePress[0]);
PosRatio:=-Max0R(Min0R(dtrans/MaxBrakePress[0],1),AnPos)*Max0R(0,Min0R(1,(Vel-eimc[eimc_p_Vh0])/(eimc[eimc_p_Vh1]-eimc[eimc_p_Vh0])));
eimv[eimv_Fzad]:=-Max0R(LocalBrakeRatio,dtrans/MaxBrakePress[0]);
tmp:=5;
end
else
begin
PosRatio:=(MainCtrlPos/MainCtrlPosNo);
eimv[eimv_Fzad]:=PosRatio;
if(Flat)and(eimc[eimc_p_F0]*eimv[eimv_Fful]>0)then
PosRatio:=Min0R(PosRatio*eimc[eimc_p_F0]/eimv[eimv_Fful],1);
if ScndCtrlActualPos>0 then
if (Vmax<250) then
PosRatio:=Min0R(PosRatio,Max0R(-1,0.5*(ScndCtrlActualPos-Vel)))
else
PosRatio:=Min0R(PosRatio,Max0R(-1,0.5*(ScndCtrlActualPos*2-Vel)));
PosRatio:=1.0*(PosRatio*0+1)*PosRatio;
(Hamulec as TLSt).SetED(0);
// (Hamulec as TLSt).SetLBP(LocBrakePress);
if (PosRatio>dizel_fill) then tmp:=1 else tmp:=4; //szybkie malenie, powolne wzrastanie
end;
if SlippingWheels then begin PosRatio:=0; tmp:=10; SandDoseOn; end;//przeciwposlizg
// if SlippingWheels then begin PosRatio:=0; tmp:=10; SandDoseOn; end;//przeciwposlizg
// if(Flat)then //PRZECIWPOŚLIZG
dmoment:=eimv[eimv_Fful];
// else
// dmoment:=eimc[eimc_p_F0]*0.99;
if (abs((PosRatio+9.66*dizel_fill)*dmoment*100)>Adhesive(RunningTrack.friction)*TotalMassxg) then begin PosRatio:=0; tmp:=4; SandDoseOn; end;//przeciwposlizg
if (abs((PosRatio+9.80*dizel_fill)*dmoment*100)>Adhesive(RunningTrack.friction)*TotalMassxg) then begin PosRatio:=0; tmp:=9; SandDoseOn; end;//przeciwposlizg
if (SlippingWheels) then begin PosRatio:=-PosRatio*0; tmp:=9; SandDoseOn; end;//przeciwposlizg
dizel_fill:=dizel_fill+Max0R(Min0R(PosRatio-dizel_fill,0.1),-0.1)*2*(tmp{2{+4*byte(PosRatio<dizel_fill)})*dt; //wartość zadana/procent czegoś
@@ -4333,12 +4401,12 @@ begin
eimv[eimv_Uzsmax]:=Min0R(Voltage-eimc[eimc_f_DU],tmp);
eimv[eimv_fkr]:=eimv[eimv_Uzsmax]/eimc[eimc_f_cfu];
if(DynamicBrakeFlag)then
if(dizel_fill<0)then
eimv[eimv_Pmax]:=eimc[eimc_p_Ph]
else
eimv[eimv_Pmax]:=Min0R(eimc[eimc_p_Pmax],0.001*Voltage*(eimc[eimc_p_Imax]-eimc[eimc_f_I0])*Pirazy2*eimc[eimc_s_cim]/eimc[eimc_s_p]/eimc[eimc_s_cfu]);
eimv[eimv_FMAXMAX]:=0.001*SQR(Min0R(eimv[eimv_fkr]/Max0R(abs(enrot)*eimc[eimc_s_p]+eimc[eimc_s_dfmax]*eimv[eimv_ks],eimc[eimc_s_dfmax]),1)*eimc[eimc_f_cfu]/eimc[eimc_s_cfu])*(eimc[eimc_s_dfmax]*eimc[eimc_s_dfic]*eimc[eimc_s_cim])*Transmision.Ratio*NPoweredAxles*2/WheelDiameter;
if(DynamicBrakeFlag)then
if(dizel_fill<0)then
begin
eimv[eimv_Fful]:=Min0R(eimc[eimc_p_Ph]*3.6/Vel,Min0R(eimc[eimc_p_Fh],eimv[eimv_FMAXMAX]));
eimv[eimv_Fmax]:=-sign(V)*(DirAbsolute)*Min0R(eimc[eimc_p_Ph]*3.6/Vel,Min0R(-eimc[eimc_p_Fh]*dizel_fill,eimv[eimv_FMAXMAX]));//*Min0R(1,(Vel-eimc[eimc_p_Vh0])/(eimc[eimc_p_Vh1]-eimc[eimc_p_Vh0]))
@@ -4346,7 +4414,10 @@ begin
else
begin
eimv[eimv_Fful]:=Min0R(Min0R(3.6*eimv[eimv_Pmax]/Max0R(Vel,1),eimc[eimc_p_F0]-Vel*eimc[eimc_p_a1]),eimv[eimv_FMAXMAX]);
eimv[eimv_Fmax]:=eimv[eimv_Fful]*dizel_fill;
// if(not Flat)then
eimv[eimv_Fmax]:=eimv[eimv_Fful]*dizel_fill
// else
// eimv[eimv_Fmax]:=Min0R(eimc[eimc_p_F0]*dizel_fill,eimv[eimv_Fful]);
end;
@@ -4369,7 +4440,13 @@ begin
eimv[eimv_eta]:=eimv[eimv_Pm]/eimv[eimv_Pe];
Im:=eimv[eimv_If];
Itot:=eimv[eimv_Ipoj];
if (eimv[eimv_Ipoj]>=0) then
Vadd:=Vadd*(1-2*dt)
else if (Voltage<EnginePowerSource.CollectorParameters.MaxV) then
Vadd:=Vadd*(1-dt)
else
Vadd:=Max0R(Vadd*(1-0.2*dt),0.02*(Voltage-EnginePowerSource.CollectorParameters.MaxV));
Itot:=eimv[eimv_Ipoj]*(0.01+Min0R(0.99,0.99-Vadd));
EnginePower:=Abs(eimv[eimv_Ic]*eimv[eimv_U]*NPoweredAxles)/1000;
@@ -4392,11 +4469,20 @@ begin
else
begin
Im:=0;Mm:=0;Mw:=0;Fw:=0;Ft:=0;Itot:=0;dizel_fill:=0;EnginePower:=0;
for i:=1 to 20 do
eimv[i]:=0;
(Hamulec as TLSt).SetED(0);RventRot:=0.0;//(Hamulec as TLSt).SetLBP(LocBrakePress);
end;
end;
None: begin end;
end; {case EngineType}
end {case EngineType}
else if EngineType=ElectricInductionMotor then
begin
Im:=0;Mm:=0;Mw:=0;Fw:=0;Ft:=0;Itot:=0;dizel_fill:=0;EnginePower:=0;
for i:=1 to 20 do
eimv[i]:=0;
(Hamulec as TLSt).SetED(0);RventRot:=0.0;//(Hamulec as TLSt).SetLBP(LocBrakePress);
end;
TractionForce:=Ft
end;
@@ -4792,11 +4878,11 @@ begin
else
Voltage:=RunningTraction.TractionVoltage*DirAbsolute; //ActiveDir*CabNo;
end {bo nie dzialalo}
else if (EngineType=ElectricInductionMotor) or (((Couplers[0].CouplingFlag and ctrain_power)=ctrain_power) or ((Couplers[1].CouplingFlag and ctrain_power)=ctrain_power)) then //potem ulepszyc! pantogtrafy!
Voltage:=Max0R(Max0R(RunningTraction.TractionVoltage,HVCouplers[0][1]),HVCouplers[1][1])
else
Voltage:=0;
if Mains and {(Abs(CabNo)<2) and} (EngineType=ElectricInductionMotor) then //potem ulepszyc! pantogtrafy!
Voltage:=Max0R(Max0R(RunningTraction.TractionVoltage,HVCouplers[0][1]),HVCouplers[1][1]);
//end;
//end;
if Power>0 then
FTrain:=TractionForce(dt)
@@ -4864,17 +4950,19 @@ var b:byte;
const Vepsilon=1e-5; Aepsilon=1e-3; //ASBSpeed=0.8;
begin
TotalCurrent:=0;
hvc:=Max0R(PantFrontVolt,PantRearVolt);
for b:=0 to 1 do //przekazywanie napiec
if ((Couplers[b].CouplingFlag and ctrain_power) = ctrain_power)or(((Couplers[b].CouplingFlag and ctrain_heating) = ctrain_heating)and(Heating)) then
begin
HVCouplers[1-b][1]:=Max0R(Abs(ElectricTraction.TractionVoltage),Couplers[b].Connected.HVCouplers[Couplers[b].ConnectedNr][1]*0.99);
HVCouplers[1-b][1]:=Max0R(Abs(hvc),Couplers[b].Connected.HVCouplers[Couplers[b].ConnectedNr][1]-HVCouplers[b][0]*0.02);
end
else
HVCouplers[1-b][1]:=Abs(ElectricTraction.TractionVoltage);//Max0R(Abs(Voltage),0);
HVCouplers[1-b][1]:=Abs(hvc)-HVCouplers[b][0]*0.02;//Max0R(Abs(Voltage),0);
// end;
hvc:=HVCouplers[0][1]+HVCouplers[1][1];
if (Abs(ElectricTraction.TractionVoltage)<1) and (hvc>1)then //bez napiecia, ale jest cos na sprzegach:
if (Abs(PantFrontVolt)+Abs(PantRearVolt)<1) and (hvc>1)then //bez napiecia, ale jest cos na sprzegach:
begin
for b:=0 to 1 do //przekazywanie pradow
if ((Couplers[b].CouplingFlag and ctrain_power) = ctrain_power)or(((Couplers[b].CouplingFlag and ctrain_heating) = ctrain_heating)and(Heating)) then //jesli spiety
@@ -4888,11 +4976,13 @@ begin
end
else
begin
TotalCurrent:=HVCouplers[0][0]+HVCouplers[1][0];
if ((Couplers[0].CouplingFlag and ctrain_power) = ctrain_power)or(((Couplers[0].CouplingFlag and ctrain_heating) = ctrain_heating)and(Heating)) then
TotalCurrent:=TotalCurrent+Couplers[0].Connected.HVCouplers[1-Couplers[0].ConnectedNr][0];
if ((Couplers[1].CouplingFlag and ctrain_power) = ctrain_power)or(((Couplers[1].CouplingFlag and ctrain_heating) = ctrain_heating)and(Heating)) then
TotalCurrent:=TotalCurrent+Couplers[1].Connected.HVCouplers[1-Couplers[1].ConnectedNr][0];
HVCouplers[0][0]:=0;
HVCouplers[1][0]:=0;
end;
end;
ClearPendingExceptions;
if not TestFlag(DamageFlag,dtrain_out) then
@@ -5188,6 +5278,14 @@ Begin
end
else if command='ScndCtrl' then
begin
if (EngineType=ElectricInductionMotor) then
if (ScndCtrlPos=0) and (Trunc(CValue1)>0) then
if (Vmax<250) then
ScndCtrlActualPos:=Round(Vel+0.5)
else
ScndCtrlActualPos:=Round(Vel/2+0.5)
else if (Trunc(CValue1)=0) then
ScndCtrlActualPos:=0;
if ScndCtrlPosNo>=Trunc(CValue1) then
ScndCtrlPos:=Trunc(CValue1);
OK:=SendCtrlToNext(command,CValue1,CValue2);
@@ -5431,7 +5529,7 @@ Begin
end
else if command='Emergency_brake' then
begin
if EmergencyBrakeSwitch(Trunc(CValue1)=1) then
if EmergencyBrakeSwitch(Trunc(CValue1)=1) then //YB: czy to jest potrzebne?
OK:=true
else OK:=false;
end
@@ -5558,6 +5656,8 @@ begin
end;
WheelDiameter:=1.0;
BrakeCtrlPosNo:=0;
LightsPosNo:=0;
LightsDefPos:=1;
for k:=-1 to MainBrakeMaxPos do
with BrakePressureTable[k] do
begin
@@ -5637,6 +5737,9 @@ begin
InsideConsist:=false;
CompressorPower:=1;
SmallCompressorPower:=0;
for b:=0 to 25 do
eimc[b]:=0;
eimc[eimc_p_eped]:=1.5;
ScndInMain:=false;
@@ -5668,6 +5771,7 @@ begin
ScndCtrlPos:=0;
MainCtrlActualPos:=0;
ScndCtrlActualPos:=0;
LightsPos:=0;
Heating:=false;
Mains:=false;
ActiveDir:=0; //kierunek nie ustawiony
@@ -5731,6 +5835,8 @@ begin
dizel_enginestart:=false;
dizel_engagedeltaomega:=0;
PhysicActivation:=true;
for b:=1 to 20 do
eimv[b]:=0;
with RunningShape do
begin
@@ -5911,6 +6017,10 @@ case BrakeValve of
EStED :begin
Hamulec := TEStED.Create(MaxBrakePress[3], BrakeCylRadius, BrakeCylDist, BrakeVVolume, BrakeCylNo, BrakeDelays, BrakeMethod, NAxles, NBpA);
(Hamulec as TEStED).SetRM(RapidMult);
if(MBPM<2)then //jesli przystawka wazaca
(Hamulec as TEStED).SetLP(0,MaxBrakePress[3],0)
else
(Hamulec as TEStED).SetLP(Mass, MBPM, MaxBrakePress[1]);
end;
EP2:begin
Hamulec :=TEStEP2.Create(MaxBrakePress[3], BrakeCylRadius, BrakeCylDist, BrakeVVolume, BrakeCylNo, BrakeDelays, BrakeMethod, NAxles, NBpA);
@@ -5943,6 +6053,8 @@ case BrakeLocHandle of
begin
LocHandle := TFD1.Create;
LocHandle.Init(MaxBrakePress[0]);
if(TrainType=dt_EZT)then
(LocHandle as TFD1).SetSpeed(3.5);
end;
Knorr:
begin
@@ -5964,7 +6076,9 @@ end;
Pipe.CreateCap((Max0R(Dim.L,14)+0.5)*Spg*1); //dlugosc x przekroj x odejscia i takie tam
Pipe2.CreateCap((Max0R(Dim.L,14)+0.5)*Spg*1);
{to dac potem do init}
if LightsPosNo>0 then LightsPos:=LightsDefPos;
{to dac potem do init}
if ReadyFlag then {gotowy do drogi}
begin
CompressedVolume:=VeselVolume*MinCompressor*(9.8+Random)/10;
@@ -5992,8 +6106,8 @@ end;
CompressedVolume:=VeselVolume*MinCompressor*0.55;
ScndPipePress:=5.1;
PipePress:=LowPipePress;
PipeBrakePress:=MaxBrakePress[3];
BrakePress:=MaxBrakePress[3];
PipeBrakePress:=MaxBrakePress[3]*0.5;
BrakePress:=MaxBrakePress[3]*0.5;
LocalBrakePos:=0;
// if (BrakeSystem=Pneumatic) and (BrakeCtrlPosNo>0) then
// BrakeCtrlPos:=-2; //Ra: hamulec jest poprawiany w DynObj.cpp
@@ -6578,6 +6692,7 @@ begin
if s='P10-Bg' then BrakeMethod:=bp_P10Bg else
if s='P10-Bgu' then BrakeMethod:=bp_P10Bgu else
if s='FR513' then BrakeMethod:=bp_FR513 else
if s='FR510' then BrakeMethod:=bp_FR510 else
if s='Cosid' then BrakeMethod:=bp_Cosid else
if s='P10yBg' then BrakeMethod:=bp_P10yBg else
if s='P10yBgu' then BrakeMethod:=bp_P10yBgu else
@@ -6656,6 +6771,7 @@ begin
s:=DUE(ExtractKeyWord(lines,'DoorOpenMethod='));
if s='Shift' then DoorOpenMethod:=1 //przesuw
else if s='Fold' then DoorOpenMethod:=3 //3 submodele się obracają
else if s='Plug' then DoorOpenMethod:=4 //odskokowo-przesuwne
else
DoorOpenMethod:=2; //obrót
s:=DUE(ExtractKeyWord(lines,'DoorClosureWarning='));
@@ -6667,6 +6783,16 @@ begin
if s='Yes' then DoorBlocked:=true
else
DoorBlocked:=false;
s:=ExtractKeyWord(lines,'DoorMaxShiftPlug=');
DoorMaxPlugShift:=s2r(DUE(s));
s:=ExtractKeyWord(lines,'PlatformSpeed=');
PlatformSpeed:=s2r(DUE(s));
s:=ExtractKeyWord(lines,'PlatformMaxSpeed=');
PlatformMaxShift:=s2r(DUE(s));
s:=DUE(ExtractKeyWord(lines,'PlatformOpenMethod='));
if s='Shift' then PlatformOpenMethod:=1 //przesuw
else
PlatformOpenMethod:=2; //obrót
end
else if (Pos('BuffCoupl.',lines)>0) or (Pos('BuffCoupl1.',lines)>0) then {zderzaki i sprzegi}
begin
@@ -7183,7 +7309,9 @@ begin
s:=ExtractKeyWord(lines,'Vh0='); eimc[eimc_p_Vh0]:=s2r(DUE(s));
s:=ExtractKeyWord(lines,'Vh1='); eimc[eimc_p_Vh1]:=s2r(DUE(s));
s:=ExtractKeyWord(lines,'Imax='); eimc[eimc_p_Imax]:=s2r(DUE(s));
s:=ExtractKeyWord(lines,'abed='); if DUE(s)<>'' then eimc[eimc_p_abed]:=s2r(DUE(s));
s:=ExtractKeyWord(lines,'edep='); if DUE(s)<>'' then eimc[eimc_p_eped]:=s2r(DUE(s));
s:=ExtractKeyWord(lines,'Flat='); if DUE(s)='Yes' then Flat:=true else Flat:=false;
end;
else ConversionError:=-13; {not implemented yet!}
@@ -7377,6 +7505,14 @@ begin
RListSize:=s2b(DUE(ExtractKeyWord(lines,'Size=')));
for k:=0 to RListSize do
readln(fin, DEList[k].rpm, DEList[k].genpower)
end
else if (Pos('LightsList:',lines)>0) then {dla asynchronow}
begin
LightsPosNo:=s2b(DUE(ExtractKeyWord(lines,'Size=')));
LightsWrap:=('Yes')=(DUE(ExtractKeyWord(lines,'Wrap=')));
LightsDefPos:=s2b(DUE(ExtractKeyWord(lines,'Default=')));
for k:=1 to LightsPosNo do
readln(fin, Lights[0][k], Lights[1][k])
end;
end;

View File

@@ -322,11 +322,17 @@ private:
bool Zamykajacy;
bool Przys_blok;
TReservoir* Miedzypoj;
double TareM;
double LoadM;
double TareBP;
double LoadC;
public:
virtual void __fastcall Init(double PP, double HPP, double LPP, double BP, Byte BDF);
virtual double __fastcall GetPF(double PP, double dt, double Vel);
virtual double __fastcall GetEDBCP(void);
void __fastcall PLC(double mass);
void __fastcall SetLP(double TM, double LM, double TBP);
public:
#pragma option push -w-inl
/* TBrake.Create */ inline __fastcall TEStED(double i_mbp, double i_bcr, double i_bcd, double i_brc
@@ -692,9 +698,11 @@ private:
double BP;
public:
double Speed;
virtual double __fastcall GetPF(double i_bcp, double pp, double hp, double dt, double ep);
virtual void __fastcall Init(double press);
virtual double __fastcall GetCP(void);
void __fastcall SetSpeed(double nSpeed);
public:
#pragma option push -w-inl
/* TObject.Create */ inline __fastcall TFD1(void) : THandle() { }
@@ -802,6 +810,7 @@ static const Shortint bp_PKPBgu = 0xe;
static const Byte bp_MHS = 0x80;
static const Shortint bp_P10yBg = 0xf;
static const Shortint bp_P10yBgu = 0x10;
static const Shortint bp_FR510 = 0x11;
static const Shortint sf_Acc = 0x1;
static const Shortint sf_BR = 0x2;
static const Shortint sf_CylB = 0x4;

View File

@@ -95,6 +95,7 @@ CONST
bp_MHS = 128; //magnetyczny hamulec szynowy
bp_P10yBg = 15; //żeliwo fosforowe P10
bp_P10yBgu= 16;
bp_FR510 = 17; //Frenoplast FR510
sf_Acc = 1; //przyspieszacz
sf_BR = 2; //przekladnia
@@ -289,10 +290,15 @@ TYPE
Zamykajacy: boolean; //pamiec zaworka zamykajacego
Przys_blok: boolean; //blokada przyspieszacza
Miedzypoj: TReservoir; //pojemnosc posrednia (urojona) do napelniania ZP i ZS
TareM, LoadM: real; //masa proznego i pelnego
TareBP: real; //cisnienie dla proznego
LoadC: real;
public
procedure Init(PP, HPP, LPP, BP: real; BDF: byte); override;
function GetPF(PP, dt, Vel: real): real; override; //przeplyw miedzy komora wstepna i PG
function GetEDBCP: real; override; //cisnienie tylko z hamulca zasadniczego, uzywane do hamulca ED w EP09
procedure PLC(mass: real); //wspolczynnik cisnienia przystawki wazacej
procedure SetLP(TM, LM, TBP: real); //parametry przystawki wazacej
end;
TEStEP2= class(TLSt)
@@ -489,9 +495,11 @@ TYPE
MaxBP: real; //najwyzsze cisnienie
BP: real; //aktualne cisnienie
public
Speed: real; //szybkosc dzialania
function GetPF(i_bcp:real; pp, hp, dt, ep: real): real; override;
procedure Init(press: real); override;
function GetCP(): real; override;
procedure SetSpeed(nSpeed: real);
// procedure Init(press: real; MaxBP: real); overload;
end;
@@ -771,6 +779,7 @@ begin
bp_P10Bg: FM:=TP10Bg.Create;
bp_P10Bgu: FM:=TP10Bgu.Create;
bp_FR513: FM:=TFR513.Create;
bp_FR510: FM:=TFR510.Create;
bp_Cosid: FM:=TCosid.Create;
bp_P10yBg: FM:=TP10yBg.Create;
bp_P10yBgu: FM:=TP10yBgu.Create;
@@ -1815,18 +1824,18 @@ begin
RapidTemp:=RapidTemp+(RM*Byte((Vel>55)and(BrakeDelayFlag=bdelay_R))-RapidTemp)*dt/2;
temp:=1-RapidTemp;
temp:=Max0R(1-RapidTemp,0.001);
// if EDFlag then temp:=1000;
// temp:=temp/(1-);
//powtarzacz <20> podwojny zawor zwrotny
temp:=Max0R(BCP/temp*Min0R(Max0R(1-EDFlag,0),1),LBP);
temp:=Max0R(LoadC*BCP/temp*Min0R(Max0R(1-EDFlag,0),1),LBP);
if(BrakeCyl.P>temp)then
dV:=-PFVd(BrakeCyl.P,0,0.02,temp)*dt
dV:=-PFVd(BrakeCyl.P,0,0.02*sizeBC,temp)*dt
else
if(BrakeCyl.P<temp)then
dV:=PFVa(BVP,BrakeCyl.P,0.02,temp)*dt
dV:=PFVa(BVP,BrakeCyl.P,0.02*sizeBC,temp)*dt
else dV:=0;
BrakeCyl.Flow(dV);
@@ -1915,9 +1924,20 @@ end;
function TEStED.GetEDBCP: real;
begin
GetEDBCP:=ImplsRes.P;
GetEDBCP:=ImplsRes.P*LoadC;
end;
procedure TEStED.PLC(mass: real);
begin
LoadC:=1+Byte(Mass<LoadM)*((TareBP+(MaxBP-TareBP)*(mass-TareM)/(LoadM-TareM))/MaxBP-1);
end;
procedure TEStED.SetLP(TM, LM, TBP: real);
begin
TareM:=TM;
LoadM:=LM;
TareBP:=TBP;
end;
//---DAKO CV1---
@@ -2898,7 +2918,7 @@ begin
// MaxBP:=4;
// temp:=Min0R(i_bcp*MaxBP,Min0R(5.0,HP));
temp:=Min0R(i_bcp*MaxBP,HP); //0011
dp:=10*Min0R(abs(temp-BP),0.1)*PF(temp,BP,0.0006*(2+Byte(temp>BP)))*dt;
dp:=10*Min0R(abs(temp-BP),0.1)*PF(temp,BP,0.0006*(2+Byte(temp>BP)))*dt*Speed;
BP:=BP-dp;
GetPF:=-dp;
end;
@@ -2909,6 +2929,7 @@ begin
MaxBP:=press;
Time:=false;
TimeEP:=false;
Speed:=1;
end;
function TFD1.GetCP: real;
@@ -2916,6 +2937,11 @@ begin
GetCP:=BP;
end;
procedure TFD1.SetSpeed(nSpeed: real);
begin
Speed:=nSpeed;
end;
//---KNORR---