Commit 68f55049 authored by Arne Graf's avatar Arne Graf

de-synchronise agents for ff_quickest

parent c132e6bd
Pipeline #4649 passed with stages
in 63 minutes and 39 seconds
......@@ -105,7 +105,7 @@ public:
_slow_down_distance = 0.2;
//ff router quickest
_recalc_interval = 5;
_recalc_interval = 3;
//ff router
_has_specific_goals = false;
......
......@@ -426,6 +426,14 @@ int FFRouter::FindExit(Pedestrian* p)
// }
// }
if (_mode == quickest) {
if (p->GetGlobalTime() > _recalc_interval && _building->GetRoom(p->GetRoomID())->GetSubRoom(p->GetSubRoomID())->IsInSubRoom(p)
&& _locffviafm[p->GetRoomID()]->getCostToDestination(p->GetExitIndex(), p->GetPos()) > 3.0
&& p->GetExitIndex() != -1) {
//delay possible
if ((int) p->GetGlobalTime() % 10 != p->GetID() % 10) {
return p->GetExitIndex(); //stay with old target
}
}
//new version: recalc densityspeed every x seconds
if ((p->GetGlobalTime() > _timeToRecalc) && (p->GetGlobalTime() > Pedestrian::GetMinPremovementTime() + _recalc_interval)) {
_plzReInit = true;
......
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