设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 10037|回复: 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'# Q. a! z9 M  I! N
*/
2 @  ]2 }7 ?7 x$ q' His
8 M) C. ?; f5 A1 ?- Y" c        part, GlobalDistObj, assignLObj:object;row,Lan:integer;; B& r% t/ O1 l1 U  b
do  p# }/ O  w' A0 _( q
        Lan := rootfolder.Internal.Tools.AOLlanguage;
. O  I9 W; P7 R        if current = @.Destination -- else return; ^: s2 w% w! |( `1 j( C+ k
        then
& \$ Q5 O* b, L* `3 m                @.Destination := void;! D- h+ m3 E  j+ e7 d
                if @.occupied then% A! V/ t4 h! X0 U
                        part := @.cont;; N/ m& b- A7 M
                        @.transpOrder := void;
, P! Y# C, T# b) F+ j                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 f) w0 H1 T" o6 z3 n  S* q
                                @,root.eventcontroller.simTime);+ x4 g5 |) B0 A& G; {6 B, s
                        @.HasOrder := false;( C2 P5 ]# y  [7 B
                        @.DrivingHome := true;& h. t/ ?; m) L
                        rgManager.tryToStartTransOrder;0 W6 T) F  [+ P! a* [& V
                        if @.Destination = void' l5 `* I) M4 L" w
                        then -- no transport order for vehicle @
3 ]. |) Z+ Y7 C& h                                @.Destination :=, \& R' D. i- R! P0 }5 p5 S
                                rgManager.nearestFreeStation(@,track.~);
9 q7 H, C' ]6 m3 M# U                                newDirection(@);   
0 I8 P6 ~# k+ |. d2 C8 T, w3 Y: X                                if @.Destination /= void then) T$ `* }, _  p' e7 Q( n
                                        @.Destination.NumReservation :=) h' F1 L1 A* \& b# l& \2 d9 e4 \
                                        @.Destination.NumReservation + 1;! g1 _( @% H; z' j, N
                                end;
8 Q' r0 L$ C5 k/ X6 x! u                                @.CurrIcon := "drivingHome";0 ?& `2 E' L$ V0 l8 i, L; j
                                @.DrivingHome := true;
8 q9 c4 H8 R' {. d' {  }7 @: \3 s                        end;
! T- H* `/ a6 n5 y- n+ W( Y7 P                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 g: Q" x: d! u6 f# I# z                        part := @.transpOrder;# i0 u* C; }$ w2 k6 I* `
                        part.move(@);-- load part
' Z* I/ ?" X2 n1 B" W8 c5 @                        @.CurrIcon := "load";
* O. z, |6 M0 I                        GlobalDistObj := part.globDestination;* I- k; A: D1 J; `
                        assignLObj := rgmanager.rgAssignL;2 L9 d! e3 b$ G- }5 M
                        row := assignLObj.getRowNo(GlobalDistObj);5 G/ {0 C0 A: V% [/ w
                        if Row = -1 then -- since 70
& g2 m0 A+ g8 }5 k( h( P5 N                                if lan=1 then% |0 j8 l% E* _! k
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
4 u0 r7 k9 V+ r: B% G" `8 u. U                                                to_str("in der Andockstation: \"",?.~.name,"\""));
. h. j" I$ S3 }# P0 N) P                                else5 R* R2 @8 d2 q- S5 [- T' b* C' @
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! \+ G+ C. A2 `$ e4 d$ J- q
                                                to_str("in docking station: \"",?.~.name,"\""));                                $ D" _: `2 H) A, d
                                end;
# ~  l  X7 x  R/ h! e                        else1 Y8 G( ^5 B& K7 |
                                @.Destination := assignLObj[1,row];
  I, a1 }! H" N  O                        end;                       
6 E# L- @$ R& s4 b                        newDirection(@);) E) u# G8 a. X( a
                        @.HasOrder := true;
+ d& t/ }) K7 W+ c$ f                end;6 ^$ \* ]& L2 x9 s7 @
        end;
6 U' i& Z" c. cend;        -- of the method
& c( _3 p2 F5 U* k7 F1 X# E& r
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑   j1 I+ G+ d# e3 l" Q

; ~0 e  p6 g' o! J( f) U这是AGV_putin中arrive的method。
; p& J4 @- B# h% h$ @1 a/ E7 x2 p& b8 S8 g; n
当到达物料速度越高时,这个报警更多,
- y, x1 d1 x% C可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。2 D3 ]& L: F, F: R$ c
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?" ?: b  S; S9 n- V' A8 C' A) b  a+ a
' v% V9 Q, H- c: N, r
另外一个小建议,就是move,所有的move都可以这样) ^& `& P6 K  E% J* \3 s
if not move() then debug end
5 M/ v  U. n) i5 }这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。3 |# b5 B' e7 t8 C* P- l0 |/ R
plant simulation中的free libraries有AGV模板,0 l* b: Z$ _. C6 d. u% y
里面也有案例。% I9 S/ P, r+ G2 [0 L
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。$ s7 E! k8 g  V! C; [% Y

  d/ H1 P/ x4 q+ B# p我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 * g* a9 x1 K# Q- l/ z( |, ~6 `! Z* `' Q

9 _3 i( ]/ j/ ^0 w/ K那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ' S0 Y# m  {6 i1 B! q3 \
这是AGV_putin中arrive的method。
! O! Y4 M% p' @! w% p5 M5 B# u9 ~/ H# m5 L- G
当到达物料速度越高时,这个报警更多,
7 c% K; R, b, k
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-9-9 03:55 , Processed in 0.021709 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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