在线性场景下的自行车辅助疏散算法研究
1. WiFi 模型下的疏散算法
在 WiFi 模型中,有三种不同的疏散算法,它们利用自行车这一资源,通过不同的策略来实现疏散,下面详细介绍这些算法及其性能。
1.1 反向最大速度算法(OppDirectionWithMaxSpeedWiFi)
该算法中,徒步者和骑行者朝相反方向移动。首先找到出口的一方会将信息传达给另一方。
- 若徒步者先找到出口,骑行者会全速前往出口。
- 若骑行者先找到出口,它会返回并将自行车放置在合适位置 x 与徒步者共享。
- 当双方都到达出口时,疏散结束。
算法代码如下:
Algorithm 1: (OppDirectionWithMaxSpeedWiFi)
The hiker and the biker move in opposite directions.The one that finds
the exit first communicates it to the other;
if the hiker found the exit first then
the biker moves to the exit at full speed;
end
else if the biker found the exit first then
it returns and drops the bike offto an appropriately chosen position x
and shares the bike with the hiker;
end
S
超级会员免费看
订阅专栏 解锁全文
1713

被折叠的 条评论
为什么被折叠?



