You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

求助:如何准确计算AnyLogic中AGV的目标点到达时间

求助:准确计算AnyLogic中AGV路径移动时间的方法

任务与问题

我需要计算AGV(自动导引车)从当前位置到目标点位(特定ID货架)的移动时间,要求计算结果与模型实际时间匹配。但遇到以下问题:

  • AnyLogic的AGV路径移动采用不可解析的内部算法,无法直接获取行驶时间、速度、加减速的计算逻辑;
  • 在TransporterFleet中输入参数也无法改变移动模式;
  • 查阅官方文档、AnyLogic API规范及Stack Overflow后未找到解决方案。

计算所需参数

计算需用到最大速度、加减速、行驶距离:

  • 最大速度、加减速可从AGV单元获取(已在TransporterFleet中配置);
  • 尝试获取路线长度的代码如下,但调用unit.getDistanceTravelled(METER)得到的值与实际不符:
LocationNode unitLocation = (LocationNode)unit.getCurrentLocation();
length = network.getPlainDistance(unitLocation.getPoint(), (Point)target)

自行编写的时间计算方法

我编写了以下计算时间的方法,但结果与模型实际耗时不匹配:

public double getTimeOfPass (double length, AGV unit){
    double maxSpeed = unit.getMaximumSpeed(SpeedUnits.MPS);
    double accelerate = unit.getDeceleration(AccelerationUnits.MPS_SQ);
    double reduce = unit.getAcceleration(AccelerationUnits.MPS_SQ);

    double timePart1 = maxSpeed/accelerate;
    double distanceOfAcceleration = (Math.pow(maxSpeed, 2.0) / (2 * accelerate));

    double timePart2 = maxSpeed/reduce;
    double distanceOfReduce = (Math.pow(maxSpeed, 2.0) / (2 * reduce));

    double distanceOfMovement = length - (distanceOfAcceleration + distanceOfReduce);
    double timePart3 = distanceOfMovement/maxSpeed;

    return (timePart1 + timePart2 + timePart3);
}

验证与实验结果

通过unit.timeInState(state.GOING_TO_AGENT);获取模型中AGV的实际行驶耗时,并开展实验记录数据,包括:

  • AGV行驶时间测量表
  • 时间差值随距离变化图
  • 时间偏差图
  • 相关性图
  • 扩展移动值数据表

但实验结果无明确规律,即使路线长度、组成(PointNodes、Path等)完全相同,计算值与模型时间仍存在差异,无法推导匹配逻辑。

恳请社区协助,告知如何准确计算AGV到达目标点的时间。


内容的提问来源于stack exchange,提问作者Artem Charykov

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.23 02:40:14