设为首页收藏本站

最大的系统仿真与系统优化公益交流社区

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9724|回复: 9

[求助] 用AGV模板发生了以下错误,请解!

  [复制链接]
发表于 2011-11-5 16:38:28 | 显示全部楼层 |阅读模式
问题在哪里?

本帖子中包含更多资源

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

x
 楼主| 发表于 2011-11-14 10:37:54 | 显示全部楼层
没有解决,再顶一下。
 楼主| 发表于 2011-11-17 11:03:27 | 显示全部楼层
/* called by:        entrance ctrl of the object 'track'* G( t3 \6 ~4 ?4 I$ o# @5 o
*/; y$ e2 P$ }0 b
is% q$ o9 e: E1 n0 e- k
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;% }9 |7 E6 W$ G
do' z" `* ^1 K5 m2 w/ D/ J5 q$ L' J
        Lan := rootfolder.Internal.Tools.AOLlanguage;
! F3 T0 M: l+ A  V        if current = @.Destination -- else return6 p2 v& |- O/ ?. ~8 [) i( e3 q! y
        then
- I6 i' o. r8 _# D6 z# ^                @.Destination := void;' V: m5 \2 V. ^
                if @.occupied then
$ X  {' b. ]9 ~3 [3 B2 |                        part := @.cont;
* d2 j9 q6 m* \                        @.transpOrder := void;0 L, Q; B/ t% F( h/ O) T
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,( E5 y+ I5 ~1 M2 m$ |
                                @,root.eventcontroller.simTime);
+ G! h- L2 ~6 K, Q, N7 u, @: z! b                        @.HasOrder := false;
) O' [6 Z/ `5 Q( y                        @.DrivingHome := true;  K4 i* `: ]- S& \6 Q! B( ?" I
                        rgManager.tryToStartTransOrder;( H5 U( d& y/ w, `8 F( a: p
                        if @.Destination = void, P; b2 S. r+ `. a2 c' q% v
                        then -- no transport order for vehicle @
& G1 E) Y( t7 S( k: r                                @.Destination :=
: P3 Z/ Y$ B% C' a7 X0 ~8 o                                rgManager.nearestFreeStation(@,track.~);" \  Y6 S3 D$ \, z2 ~/ u
                                newDirection(@);   
  N$ K' `5 L. ]; v' l4 ~# M                                if @.Destination /= void then
! w9 u6 q, ^6 E" T+ Q: _! Q                                        @.Destination.NumReservation :=
: D) M1 v8 j+ N% D                                        @.Destination.NumReservation + 1;1 O. a6 J7 _. b
                                end;+ g) {& r3 h+ I
                                @.CurrIcon := "drivingHome";) Q7 _) `) B' Y0 n" ?. u; l
                                @.DrivingHome := true;% F9 D% I6 c/ B0 J7 Q% s
                        end;/ l0 d" X/ ]( _! ]' n
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 X  y$ n& P5 B; v- f                        part := @.transpOrder;
( u" P& k3 h, i+ {+ U$ f                        part.move(@);-- load part
- j3 Q$ t  p5 @/ K                        @.CurrIcon := "load";2 r$ h" d& o& p" V
                        GlobalDistObj := part.globDestination;1 ]8 J5 f# n" A3 H% W6 S6 h
                        assignLObj := rgmanager.rgAssignL;% \$ u( x$ X# s" E3 b; m
                        row := assignLObj.getRowNo(GlobalDistObj);
! b) @1 h6 y$ Y0 `, ^/ ?. ?                        if Row = -1 then -- since 705 d5 ^( S; D/ v0 v5 |+ ?
                                if lan=1 then
" X6 e9 }: x8 N. M- j1 h3 |                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- Q0 R7 R+ V+ K5 a! b
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
, |; ^' U; {( g7 S7 g, v                                else/ X2 ]# ?' ~7 l4 y0 m) T5 a
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 v+ V0 b  z8 ^' Z8 w. b8 H; S/ W                                                to_str("in docking station: \"",?.~.name,"\""));                                7 B! `2 n+ T/ m2 S6 V( w
                                end;, g  |6 ]7 X/ f8 C- D" ]
                        else9 c; h% t8 G" D  W* c
                                @.Destination := assignLObj[1,row];. h( S$ H3 P9 i0 z( X) H" y
                        end;                        9 D' W) N0 V& E8 ~2 t: f6 a. f
                        newDirection(@);8 \8 i7 L; p# v; |
                        @.HasOrder := true;0 I1 }/ ^, G9 I$ {* E3 c
                end;* K) f. i5 H4 f4 f( ~+ Y
        end;+ w1 _6 M6 C% ]3 r3 h$ l% M7 @5 ?% k
end;        -- of the method* e" q2 q2 m* B$ D4 F
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ! B  k4 D; k1 G8 x4 l5 f
- @% S' T& X& D  o7 R1 B- \6 [
这是AGV_putin中arrive的method。
( L/ d/ H2 z- K& a
, N: K6 Y8 G, x7 }8 ]5 ^1 M: d; ^7 d当到达物料速度越高时,这个报警更多,
8 H  S* [) W# p& u, q" v可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。: r, g" w" B/ {, P' C7 H" o( `* ~
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
( y( G6 e4 K* Q  G) }  L8 C5 F' q8 k
另外一个小建议,就是move,所有的move都可以这样
0 t4 I! C5 B9 I$ N0 T, xif not move() then debug end, @: Q$ U5 E, C0 |' I+ [
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。3 ^. X6 u4 @8 N( M
plant simulation中的free libraries有AGV模板,, C* o2 f/ f: p# X3 Z7 f0 e
里面也有案例。, \6 F1 o+ R2 Y7 e
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
6 \2 l8 h* J% ?* J2 z- M/ C/ x* e7 f9 e" g7 I  d
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
7 I1 q0 M! j: b; l; m
- z2 ?2 _" ~, M9 @: B' E. ]3 D. [4 \那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
5 N# m6 f! L, v+ e) _! ?# \3 L这是AGV_putin中arrive的method。
, u- A! y! l2 P+ [2 o/ b( x8 ^7 x" W' j; L, {: [5 S7 V
当到达物料速度越高时,这个报警更多,

! Y( Y* N0 p+ P0 U( Z# h( W% N另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|手机版|SimulWay 道于仿真   

GMT+8, 2026-8-20 13:57 , Processed in 0.018530 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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