全球FlexSim系统仿真中文论坛

搜索
查看: 4905|回复: 3
打印 上一主题 下一主题

任务执行器的加速、减速验证

[复制链接]
跳转到指定楼层
1#
zorsite 发表于 2016-5-9 14:29:48 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 zorsite 于 2016-5-9 21:38 编辑
5 L( T/ J# b) m1 c  y' O, G$ t% O9 x4 M4 Y) `
叉车的默认加速度为1,最大速度为2。如果移动20米的距离,需要多长时间?小车的运行过程:
: X' I; u: m$ b% j# J6 B& A3 K" H速度从0开始,加速到2,需要2秒时间,移动距离2米。& V" T8 g* y  I& ~5 m2 ]; [8 m
         然后匀速移动8秒,移动距离16米。
  R6 \/ J- l0 [' J+ y 减速过程同加速过程,需要2秒时间,移动距离2米。% b3 z3 A0 w5 E+ a0 c" D
整个过程需要12秒的时间,但是在模型中验证的时候耗时11秒。
. i" M: _9 Y9 T; A# d8 G2 ~2 a8 }5 M
& \. u7 X$ w# `注意:请剔除叉车的叉上下移动时间,可以尝试着将叉车的提升速度设置为100000.
) T* k( J' B4 w! T" q8 L1 D- f; B2 ]1 u3 U
问题出在哪儿呢?在执行任务的时候,叉车只有加速度,没有减速度。也就是说,叉车是以最大速度抵达目的地,而非减速至0抵达目的地。
( x! g( n; Q- {! G3 x: X4 s! t
2 U9 S- J+ t6 ~* t8 }' r" f3 F如何解决这一问题?在为叉车分配任务时,需要增加一个参数。默认任务代码如下:
  1. inserttask(ts,TASKTYPE_TRAVEL, destination,NULL);
复制代码
修改为:
  1. inserttask(ts,TASKTYPE_TRAVEL, destination,NULL,-1);
复制代码
具体参见用户手册关于该参数的说明:
: g, G# D8 T# k3 `" d) u7 o0 b$ t4 t% o
This specifies the desired end speed for the travel operation. If 0, then the desired end speed will be the maximum speed of the TaskExecuter. A positive value will use that value directly as the end speed. If the end speed is negative, then the functionality is dependent on the navigator's logic. The standard navigators, i.e. the default navigator and the network navigator will interpret negative end speeds as an end speed of 0. Other non-standard navigators may however use a negative end speed value to customize the logic for how to get the TaskExecuter to the destination, allowing the modeler to use different negative end speeds on travel tasks to effect customized travel logic.
8 X3 R4 z2 C; C3 V0 S3 m该参数默认为0,表示到达目的地时不减速。
4 T& A  m+ v' N如果为负数,通常(比如沿网络节点运行)表示到达目的地时减速为0.
+ i* }: [8 c3 M3 W9 R还可以是其他的正数值,表示减速至该速度到达目的地。
; _, l# U# N, R1 H) P% y

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
2#
慧娴亚伦 发表于 2016-5-9 16:11:58 | 只看该作者
哈哈,这个其实也没必要讨论了,用户手册明确写着这个注意事项呢。$ d5 E" e; _' }4 k
一些朋友可能没有注意到这个问题 。
3#
 楼主| zorsite 发表于 2016-5-9 21:40:10 | 只看该作者
2# 慧娴亚伦 3 ~& \+ ?5 `9 p! a6 m9 `" [
呵呵,翻看QQ聊天记录的时候发现了几个比较有意思的问题,就顺便记录一下,当作是记个笔记吧。
4#
lulu-luka 发表于 2017-4-12 05:40:37 | 只看该作者
这个还是挺有用的一个小tip~谢谢分享
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋|手机版|Archiver|全球FlexSim系统仿真中文论坛 ( 京ICP备14043114号-2 )

GMT+8, 2025-7-5 06:28 , Processed in 0.068497 second(s), 14 queries .

Powered by Discuz! X3.3© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表