修复了SCAN策略中遇到公交车停下后本来前进方向丢失的问题

This commit is contained in:
2022-06-05 20:30:47 +08:00
parent 96961c91c9
commit 6e79af8b06
4 changed files with 36 additions and 14 deletions

View File

@@ -176,13 +176,13 @@ int main()
direction = SCANDirection(target_query, direction);
// 处理下一个需要处理的请求就在脚底下的情况
if(target_query != NULL && direction == BUS_STOP && target_query->node == the_bus->rail_node_pos)
if(target_query != NULL && target_query->node == the_bus->rail_node_pos)
{
while (target_query != NULL && direction == BUS_STOP && target_query->node == the_bus->rail_node_pos)
while (target_query != NULL && target_query->node == the_bus->rail_node_pos)
{
DeleteQuery(target_query);
target_query = SCANGetQuery(direction);
direction = SCANDirection(target_query, direction);
target_query = SSTFGetQuery();
direction = SSTFDirection(target_query);
}
}
RunBus(direction);