mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 16:19:19 +02:00
merge remote-tracking branch 'refs/remotes/youby/mover_in_c++'
This commit is contained in:
@@ -779,6 +779,7 @@ public:
|
||||
double Ftmax = 0.0;
|
||||
/*- dla lokomotyw z silnikami indukcyjnymi -*/
|
||||
double eimc[26];
|
||||
bool EIMCLogForce; //
|
||||
static std::vector<std::string> const eimc_labels;
|
||||
/*-dla wagonow*/
|
||||
double MaxLoad = 0.0; /*masa w T lub ilosc w sztukach - ladownosc*/
|
||||
@@ -821,6 +822,7 @@ public:
|
||||
double AccN = 0.0; //przyspieszenie normalne w [m/s^2]
|
||||
double AccV = 0.0;
|
||||
double nrot = 0.0;
|
||||
double WheelFlat = 0.0;
|
||||
/*! rotacja kol [obr/s]*/
|
||||
double EnginePower = 0.0; /*! chwilowa moc silnikow*/
|
||||
double dL = 0.0; double Fb = 0.0; double Ff = 0.0; /*przesuniecie, sila hamowania i tarcia*/
|
||||
|
||||
@@ -3752,14 +3752,23 @@ void TMoverParameters::ComputeTotalForce(double dt, double dt1, bool FullVer)
|
||||
Sign(nrot * M_PI * WheelDiameter - V) *
|
||||
Adhesive(RunningTrack.friction) * TotalMassxg,
|
||||
dt, nrot);
|
||||
Fwheels = Sign(nrot * M_PI * WheelDiameter - V) * TotalMassxg * Adhesive(RunningTrack.friction);
|
||||
Fwheels = Sign(temp_nrot * M_PI * WheelDiameter - V) * TotalMassxg * Adhesive(RunningTrack.friction);
|
||||
if (Fwheels*Sign(V)>0)
|
||||
{
|
||||
FTrain = Fwheels - Fb;
|
||||
FTrain = Fwheels + Fb*Sign(V);
|
||||
}
|
||||
else if (FTrain*Sign(V)>0)
|
||||
{
|
||||
Fb = FTrain*Sign(V) - Fwheels*Sign(V);
|
||||
}
|
||||
else
|
||||
{
|
||||
Fb = FTrain - Fwheels;
|
||||
Fb = -Fwheels*Sign(V);
|
||||
FTrain = 0;
|
||||
}
|
||||
if (nrot < 0.1)
|
||||
{
|
||||
WheelFlat = sqrt(sqr(WheelFlat) + abs(Fwheels) / NAxles*Vel*0.000002);
|
||||
}
|
||||
if (Sign(nrot * M_PI * WheelDiameter - V)*Sign(temp_nrot * M_PI * WheelDiameter - V) < 0)
|
||||
{
|
||||
@@ -4649,7 +4658,7 @@ double TMoverParameters::TractionForce(double dt)
|
||||
{
|
||||
PosRatio = -Sign(V) * DirAbsolute * eimv[eimv_Fr] /
|
||||
(eimc[eimc_p_Fh] *
|
||||
Max0R(dtrans / MaxBrakePress[0], AnPos) /*dizel_fill*/);
|
||||
Max0R(Max0R(dtrans,0.01) / MaxBrakePress[0], AnPos) /*dizel_fill*/);
|
||||
}
|
||||
else
|
||||
PosRatio = 0;
|
||||
@@ -4700,11 +4709,11 @@ double TMoverParameters::TractionForce(double dt)
|
||||
if( ( SlippingWheels ) ) {
|
||||
PosRatio = 0;
|
||||
tmp = 9;
|
||||
Sandbox( true, range::local );
|
||||
Sandbox( true, range::unit );
|
||||
} // przeciwposlizg
|
||||
else {
|
||||
// switch sandbox off
|
||||
Sandbox( false, range::local );
|
||||
Sandbox( false, range::unit );
|
||||
}
|
||||
|
||||
dizel_fill += Max0R(Min0R(PosRatio - dizel_fill, 0.1), -0.1) * 2 *
|
||||
@@ -4741,6 +4750,13 @@ double TMoverParameters::TractionForce(double dt)
|
||||
-Sign(V) * (DirAbsolute)*std::min(
|
||||
eimc[eimc_p_Ph] * 3.6 / (Vel != 0.0 ? Vel : 0.001),
|
||||
std::min(-eimc[eimc_p_Fh] * dizel_fill, eimv[eimv_FMAXMAX]));
|
||||
double pr = dizel_fill;
|
||||
if (EIMCLogForce)
|
||||
pr = -log(1 - 4 * pr) / log(5);
|
||||
eimv[eimv_Fr] =
|
||||
-Sign(V) * (DirAbsolute)*std::min(
|
||||
eimc[eimc_p_Ph] * 3.6 / (Vel != 0.0 ? Vel : 0.001),
|
||||
std::min(-eimc[eimc_p_Fh] * pr, eimv[eimv_FMAXMAX]));
|
||||
//*Min0R(1,(Vel-eimc[eimc_p_Vh0])/(eimc[eimc_p_Vh1]-eimc[eimc_p_Vh0]))
|
||||
}
|
||||
else
|
||||
@@ -4752,9 +4768,13 @@ double TMoverParameters::TractionForce(double dt)
|
||||
eimv[eimv_Fmax] = eimv[eimv_Fful] * dizel_fill;
|
||||
// else
|
||||
// eimv[eimv_Fmax]:=Min0R(eimc[eimc_p_F0]*dizel_fill,eimv[eimv_Fful]);
|
||||
double pr = dizel_fill;
|
||||
if (EIMCLogForce)
|
||||
pr = log(1 + 4 * pr) / log(5);
|
||||
eimv[eimv_Fr] = eimv[eimv_Fful] * pr;
|
||||
}
|
||||
|
||||
eimv[eimv_ks] = eimv[eimv_Fmax] / eimv[eimv_FMAXMAX];
|
||||
eimv[eimv_ks] = eimv[eimv_Fr] / eimv[eimv_FMAXMAX];
|
||||
eimv[eimv_df] = eimv[eimv_ks] * eimc[eimc_s_dfmax];
|
||||
eimv[eimv_fp] = DirAbsolute * enrot * eimc[eimc_s_p] +
|
||||
eimv[eimv_df]; // do przemyslenia dzialanie pp z tmpV
|
||||
@@ -4925,7 +4945,7 @@ double TMoverParameters::v2n(void)
|
||||
n = V / (M_PI * WheelDiameter); // predkosc obrotowa wynikajaca z liniowej [obr/s]
|
||||
deltan = n - nrot; //"pochodna" prędkości obrotowej
|
||||
if (SlippingWheels)
|
||||
if (std::abs(deltan) < 0.01)
|
||||
if (std::abs(deltan) < 0.001)
|
||||
SlippingWheels = false; // wygaszenie poslizgu
|
||||
if (SlippingWheels) // nie ma zwiazku z predkoscia liniowa V
|
||||
{ // McZapkie-221103: uszkodzenia kol podczas poslizgu
|
||||
@@ -7149,6 +7169,7 @@ void TMoverParameters::LoadFIZ_Cntrl( std::string const &line ) {
|
||||
|
||||
if( asb == "Manual" ) { ASBType = 1; }
|
||||
else if( asb == "Automatic" ) { ASBType = 2; }
|
||||
else if (asb == "Yes") { ASBType = 128; }
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -7397,6 +7418,7 @@ void TMoverParameters::LoadFIZ_Engine( std::string const &Input ) {
|
||||
extract_value( eimc[ eimc_p_Imax ], "Imax", Input, "" );
|
||||
extract_value( eimc[ eimc_p_abed ], "abed", Input, "" );
|
||||
extract_value( eimc[ eimc_p_eped ], "edep", Input, "" );
|
||||
EIMCLogForce = ( extract_value( "eimclf", Input ) == "Yes" );
|
||||
|
||||
Flat = ( extract_value( "Flat", Input ) == "1" );
|
||||
|
||||
|
||||
@@ -1474,9 +1474,15 @@ double TEStED::GetPF( double const PP, double const dt, double const Vel )
|
||||
|
||||
// powtarzacz — podwojny zawor zwrotny
|
||||
temp = Max0R(LoadC * BCP / temp * Min0R(Max0R(1 - EDFlag, 0), 1), LBP);
|
||||
double speed = 1;
|
||||
if ((ASBP < 0.1) && ((BrakeStatus & b_asb) == b_asb))
|
||||
{
|
||||
temp = 0;
|
||||
speed = 3;
|
||||
}
|
||||
|
||||
if ((BrakeCyl->P() > temp))
|
||||
dv = -PFVd(BrakeCyl->P(), 0, 0.02 * SizeBC, temp) * dt;
|
||||
dv = -PFVd(BrakeCyl->P(), 0, 0.02 * SizeBC * speed, temp) * dt;
|
||||
else if ((BrakeCyl->P() < temp))
|
||||
dv = PFVa(BVP, BrakeCyl->P(), 0.02 * SizeBC, temp) * dt;
|
||||
else
|
||||
@@ -2018,7 +2024,8 @@ double TKE::GetPF( double const PP, double const dt, double const Vel )
|
||||
// luzowanie CH
|
||||
// temp:=Max0R(BCP,LBP);
|
||||
IMP = Max0R(IMP / temp, Max0R(LBP, ASBP * int((BrakeStatus & b_asb) == b_asb)));
|
||||
|
||||
if ((ASBP < 0.1) && ((BrakeStatus & b_asb) == b_asb))
|
||||
IMP = 0;
|
||||
// luzowanie CH
|
||||
if ((BCP > IMP + 0.005) || (Max0R(ImplsRes->P(), 8 * LBP) < 0.25))
|
||||
dv = PFVd(BCP, 0, 0.05, IMP) * dt;
|
||||
|
||||
Reference in New Issue
Block a user