Start flow regulating only when flowrate is given

.. in the inifile.
parent 499d57c1
Pipeline #18804 passed with stages
in 18 minutes and 43 seconds
......@@ -740,15 +740,21 @@ void Simulation::UpdateFlowAtDoors(const Pedestrian& ped) const
}
}
//#pragma omp critical
bool regulateFlow = trans->GetOutflowRate() < (std::numeric_limits<double>::max)();
trans->IncreaseDoorUsage(1, ped.GetGlobalTime());
trans->IncreasePartialDoorUsage(1);
// when <dn> agents pass <trans>, we start evaluating the flow
// .. and maybe close the <trans>
if( trans->GetPartialDoorUsage() == trans->GetDN() ) {
trans->regulateFlow(Pedestrian::GetGlobalTime());
trans->ResetPartialDoorUsage();
if(regulateFlow)
{
trans->IncreaseDoorUsage(1, ped.GetGlobalTime());
trans->IncreasePartialDoorUsage(1);
// when <dn> agents pass <trans>, we start evaluating the flow
// .. and maybe close the <trans>
if( trans->GetPartialDoorUsage() == trans->GetDN() ) {
trans->regulateFlow(Pedestrian::GetGlobalTime());
trans->ResetPartialDoorUsage();
}
}
}
Crossing* cross = _building->GetCrossingByUID(ped.GetExitIndex());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment