Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 AnyLogic 7 中是否有任何函数可用于将代理沿其面向的方向(角度)移动?有一些方法可以移动到特定的单元格、代理和特定的方向(东、西、北、南……),但是我怎样才能根据代理所面临的角度向前移动呢?
类似于fdNetLogo 的功能。
fd
据我所知,没有类似的方法: .moveforward()
您可以使用您当前的位置:.getXYZ() 和方向:getRotation() 来计算一个点距离:r,在您的代理前面,然后使用 .moveToStraight(x,y)
x = r * cos(方向) + x_0
y = r * sin(方向) + y_0