I want to know how to make cars wait in parking untill they are called by the next parking lot in anylogic software?

huangapple go评论55阅读模式
英文:

I want to know how to make cars wait in parking untill they are called by the next parking lot in anylogic software?

问题

在道路交通库中,我使用延迟块来使汽车在一个停车场等待。我想让它们从一个停车场移动到下一个停车场,并且希望它们在那个停车场等待,直到下一个停车场空闲。我应该使用哪个块,以及如何调用这些汽车?

我使用延迟块来使汽车在一个停车场等待。我使用了untilstopdelay()选项来暂停汽车,并尝试在延迟块的出口指定条件,如果第二个停车场空闲,就将汽车移动到那里。

英文:

I am working on anylogic software.In the road traffic library I used delay block to make the cars waiting in one parking lot.I want them to move from one parking to next parking lot and I want to make them wait in that parking lot until the next parking lot is free. Which block should I use and how to call the cars?

I used delay block to make the cars waiting in one parking lot.I used untilstopdelay() option to hold the cars and tried to specify the condition if 2nd parkinglot is free, move cars to it, at the exit of delay block.

答案1

得分: 2

这是你要执行的步骤以移除延迟中的汽车:

if(delay.size()>0){
   delay.stopDelay(delay.get(0));
}

你需要将这段代码放在你知道停车场已经腾出空间的地方……可能是在一辆车离开第二个停车场的区块内。

英文:

This is what you do to remove a car from the delay:

if(delay.size()>0){
   delay.stopDelay(delay.get(0));
}

You have to place this code somewhere in which you know space has been created in the parking lot... possibly in the block in which a car leaves the second parking lot.

huangapple
  • 本文由 发表于 2023年8月10日 18:47:05
  • 转载请务必保留本文链接:https://go.coder-hub.com/76875000.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定