设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6305|回复: 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'$ M1 `. r) V) z; B& ~7 q7 m
*/
# J' V' C. u' X7 Wis1 n  x6 {9 \3 d, U
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ N5 g. b' p" k+ V8 N5 fdo
0 _& w! [9 t' s% H/ `        Lan := rootfolder.Internal.Tools.AOLlanguage;
& D: j1 r9 s: S5 E        if current = @.Destination -- else return
. a9 u' L# Y5 E. o7 p: j        then9 U; I+ _' ^6 n2 C3 G0 H
                @.Destination := void;+ Z7 {; ~! Q( h+ ^# G% T
                if @.occupied then* J. `6 r; E$ P/ M+ B
                        part := @.cont;
2 z: `  {) K- {0 d9 r                        @.transpOrder := void;& g* ~+ l4 Z8 P9 ?7 T; j) M
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 U, Y; ~$ B$ r
                                @,root.eventcontroller.simTime);
3 Y' f: A# v, U; l8 G; V                        @.HasOrder := false;( y) \8 H1 \8 ]5 ~8 [) P
                        @.DrivingHome := true;
7 I6 Y$ Z; }8 a$ n& I4 I! F/ `. _                        rgManager.tryToStartTransOrder;
" F( s% `( |$ o! m7 x                        if @.Destination = void
( ?. o+ ]8 f) s6 E7 [                        then -- no transport order for vehicle @4 z; C2 g# m) E7 A; M4 n
                                @.Destination :=
+ I0 J( m( G1 Z& m" }' q                                rgManager.nearestFreeStation(@,track.~);' s( ]' F, m9 o! o# j9 |8 S- _! S
                                newDirection(@);   
7 k' ^: I" ]( I$ L7 m! Y4 |                                if @.Destination /= void then: r  f! b2 i/ t2 M5 O: {5 t
                                        @.Destination.NumReservation :=
3 G8 c8 }( I8 P% l) u* P                                        @.Destination.NumReservation + 1;
; _+ Y- l0 L& R4 c$ s$ }( K                                end;  m) y1 _/ x: S7 H( K% f; H( O' {. l
                                @.CurrIcon := "drivingHome";% o( F- Z& d! Z/ W
                                @.DrivingHome := true;
& ]) Y  |4 {* S                        end;% {7 D8 O& x9 N) c9 [) D
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ i  y" a2 E, `: \' \
                        part := @.transpOrder;0 }  \3 |' ^- H) p
                        part.move(@);-- load part; K& }, n4 P. p. F9 l; Q
                        @.CurrIcon := "load";
9 B& O2 V  E, \/ `                        GlobalDistObj := part.globDestination;* A. r6 Z' ?! P( ?* L+ H2 Q
                        assignLObj := rgmanager.rgAssignL;0 X# e. p0 Q& l1 O7 Y( Q5 K: |
                        row := assignLObj.getRowNo(GlobalDistObj);
. q3 ?, b; i& W- O1 ?9 s                        if Row = -1 then -- since 70
4 K1 A6 m$ q* D. m, X                                if lan=1 then
1 F$ V2 k+ Z& L( F8 ~                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ _2 y" H: q0 {. I3 J, r9 i  d
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
  V0 A  y" `8 i3 D6 B3 d6 `8 \* Y                                else
) M  g/ m! s1 T6 z/ H! _$ y                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ W$ w7 d) y8 V' A7 z6 z% o8 A
                                                to_str("in docking station: \"",?.~.name,"\""));                               
" A; z# F! j8 j1 ]7 A                                end;
' |( R+ l: S' ~0 h                        else) l- B! S6 L* W+ q
                                @.Destination := assignLObj[1,row];! r; c+ u* P4 r- X# J6 z0 z
                        end;                        5 c3 r% G# N/ u
                        newDirection(@);
; ~; \" o* V7 C' c# x                        @.HasOrder := true;3 ~1 ~9 }& G! A- w( Y) X3 b4 n
                end;) J; E6 }0 V; F% Z
        end;" v( j. H3 x8 O0 H$ B  @
end;        -- of the method2 X) b* r6 b& p9 `4 i
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 5 _1 P  ?" z8 u0 C7 U" ~0 c
/ S. S9 P& x& i- S6 {' J
这是AGV_putin中arrive的method。
8 l' d* ~( C7 F$ R
' J1 m+ w! Q7 x( j当到达物料速度越高时,这个报警更多,. @$ T$ P9 @" k; L! g( D' m( H9 {* g
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
& H" \' @$ @* o. u程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?- t  a# _  l/ ]4 a" O! q8 b
, B  Z0 v6 e9 F; X
另外一个小建议,就是move,所有的move都可以这样- s/ C( _8 I0 E
if not move() then debug end
5 s; j; g& v$ T6 L7 ^! |* x这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。* Y4 k' @3 j% y$ Z
plant simulation中的free libraries有AGV模板,% S6 o1 T* r# g
里面也有案例。; p2 J0 c% b) \: l
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。5 w7 e$ C/ b& w/ h" Q9 P" M

: U; [0 Z" I# ?2 ~- c我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 + f" a! ]$ C# q3 v/ i' E& ~. b

3 e  g: }. E3 R6 ?+ Q; g% F那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
, B& @$ `: {4 R" M' o- U这是AGV_putin中arrive的method。  k6 z, _/ I; _4 t6 X8 N
" A; R. z5 O* L0 X) p' ]
当到达物料速度越高时,这个报警更多,
' S; K! d* c/ \
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-1-29 21:34 , Processed in 0.017639 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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