设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6440|回复: 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'
! z; ]% P0 Q" O6 Q*/- h' d" S& `) L. S6 @3 d7 i
is
7 F( J% i' x6 D. l+ c# Z        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 o# r5 _0 B% ~" M- H! bdo# S5 O! h7 N! F$ r; G) r# j, b# H
        Lan := rootfolder.Internal.Tools.AOLlanguage;  W) B6 O* K8 S) Y8 P0 n4 T0 f
        if current = @.Destination -- else return& x2 }' f. g3 L, L6 ?! V3 Z) [  ^* F8 A
        then0 Y4 v* U! b  G2 r- ^7 \
                @.Destination := void;
/ E# ?0 J& q4 ?2 C* s5 i5 y1 S* Z                if @.occupied then# t- B" O# X' n, P
                        part := @.cont;! X) A  K; u8 R; |# H
                        @.transpOrder := void;
! f! Y  Z/ i4 p9 k                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ C/ ?! j/ Y6 W; D6 x. I' i
                                @,root.eventcontroller.simTime);2 D* ^( b- r/ K
                        @.HasOrder := false;
$ T0 b! B, T7 Y$ [! w! ^# L                        @.DrivingHome := true;
; n! [. {; ]/ u                        rgManager.tryToStartTransOrder;7 J% r: a) U0 Z4 T
                        if @.Destination = void
0 Z* q* {/ C5 U" o; X: d                        then -- no transport order for vehicle @
0 a2 Y* _- E- P0 w" X4 n$ l                                @.Destination :=
9 i: Z  A1 ]" j+ o6 h! w                                rgManager.nearestFreeStation(@,track.~);
" ^: h' I/ C( \8 n* r% r$ h                                newDirection(@);   
- w; Y- J& E2 C' c4 U% l- U4 b                                if @.Destination /= void then" R' z" T# `# M$ x: l3 ^
                                        @.Destination.NumReservation :=
! f* i+ ]3 h% a% C2 Q, I% k                                        @.Destination.NumReservation + 1;) h  A, q$ Q% s; Q) v( e. w6 ], j$ k
                                end;, h0 D; w$ z9 z" S! l
                                @.CurrIcon := "drivingHome";
2 \8 g3 Z( n& V) D0 o  |                                @.DrivingHome := true;
4 S6 T0 M" C, d                        end;2 s6 _  q6 x$ b& t3 {5 b% z! @
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 |/ Q. w2 k3 e& E6 u5 `, D6 c
                        part := @.transpOrder;
& i3 }$ E6 U- y% l7 P) q$ d                        part.move(@);-- load part& Z# Q- S* M% g" c1 _) _% a
                        @.CurrIcon := "load";
7 u' s+ M! u" D. `: [                        GlobalDistObj := part.globDestination;
" K* N& e* v4 _8 K' e/ ^8 s) O                        assignLObj := rgmanager.rgAssignL;
  @$ F9 t3 C8 y8 C' n1 b- }; N                        row := assignLObj.getRowNo(GlobalDistObj);! L8 D6 W7 w, R/ Y3 h& \
                        if Row = -1 then -- since 70
: z9 p$ P6 O7 o. W                                if lan=1 then
( P5 ]. o9 X5 Y: x3 D9 A                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 B8 d7 O( L. b/ z; `/ |
                                                to_str("in der Andockstation: \"",?.~.name,"\""));7 J% H, x  k( }7 N7 p( _
                                else
! j. K& {  P9 `                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' \* v& U: r2 R2 H9 T! }; ~: s0 [                                                to_str("in docking station: \"",?.~.name,"\""));                                  F( r$ I& P6 F& G& ]* j
                                end;7 U/ H. z) V* y& M" [1 [
                        else" i2 j4 U4 h+ s8 l6 s
                                @.Destination := assignLObj[1,row];
9 S1 w1 I4 n) L! s5 t, w0 Y% o" w" I                        end;                        . C& b% G9 A) i4 a
                        newDirection(@);
, }# J: x7 M. J5 c9 e                        @.HasOrder := true;, O# ~9 x& P( W0 m2 \6 z) ^! c/ @
                end;8 J; S. [9 n, ~, z4 x/ j, G% U7 g. E
        end;7 y" g" s- r9 t5 m0 r- ?, Y4 l
end;        -- of the method
3 V) H  C1 Q' V
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ( ^- Y. R6 j% z9 I
6 B9 O# T  w; e/ I+ A) s3 L8 l
这是AGV_putin中arrive的method。" s( c& D7 E, I+ p/ V

" @( i6 K* W; e' E当到达物料速度越高时,这个报警更多,
- z1 x/ y0 v  ]' [$ a8 S9 [可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
# M# M  J0 N4 e' P) E# @程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
! M2 Q8 I' J. o- A0 q" l, |4 I1 Y$ a9 p3 Q  ]' ^
另外一个小建议,就是move,所有的move都可以这样; u3 C$ d  |" c! x
if not move() then debug end
/ U' C2 ?$ s# T7 }4 o这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
$ l; _# P4 ]6 t: c: O+ o/ dplant simulation中的free libraries有AGV模板,
) y8 [/ N# ~3 M# p- I8 |: J里面也有案例。
; z% ~% i: q* }. P/ a/ H; R( y7 b我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。* }9 z+ z  C) v

; |  m7 S% _, H( m; B; _我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 4 f6 N* q$ S$ y

- a6 @" u# t  n) P那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 2 C7 Z5 }( J6 j, A6 B
这是AGV_putin中arrive的method。' w7 w% m* h' C8 C, L- x; C
- m& I; @& s; K, W1 Q: ?, G
当到达物料速度越高时,这个报警更多,

+ s! \1 y& N' d, F0 I$ _$ ?另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-6 22:22 , Processed in 0.019468 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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