设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5410|回复: 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', M: J  [( h' W
*/, B3 L- ?  C$ ~4 x" V4 _  Q% _
is0 e% T& ]7 g1 n$ U
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 C& N8 V5 G+ P( k2 pdo% `, `  }: I- t: [. c1 S
        Lan := rootfolder.Internal.Tools.AOLlanguage;
# U$ G6 m$ d* J4 p/ F        if current = @.Destination -- else return
9 I2 _! W; A5 A# M        then/ J- G/ U- F7 t# b/ Z. O
                @.Destination := void;  d  H1 |* k* O% Z1 ~6 C; q6 I! Q
                if @.occupied then9 D( p! T& {4 A* j# p2 w, U1 n
                        part := @.cont;/ c, e3 M! h3 F. K' d+ i5 V
                        @.transpOrder := void;' }" H# b  l  L+ l
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! j: s) `( W* z* S0 G
                                @,root.eventcontroller.simTime);$ Y7 ^+ m( ~% C
                        @.HasOrder := false;
+ l. }) i. Y( m5 u' b                        @.DrivingHome := true;4 _' L7 J5 V. a
                        rgManager.tryToStartTransOrder;/ E9 g2 j6 B5 e, F
                        if @.Destination = void/ |7 z  O3 ]2 @* ?5 ]0 }7 q
                        then -- no transport order for vehicle @) O' R" W2 [! y
                                @.Destination :=
8 \1 B; u% ~- l5 J8 a( o                                rgManager.nearestFreeStation(@,track.~);& u  v+ `3 O- B% g! R7 J4 e4 t
                                newDirection(@);   & T$ v+ h$ p- G
                                if @.Destination /= void then
: A: X, D" B9 L; L; p3 ]                                        @.Destination.NumReservation :=7 b! D0 x  Z4 j3 G. M: _
                                        @.Destination.NumReservation + 1;$ x. M; ]! ?) L; Z. p3 p
                                end;, R; B! B+ n7 _: }$ _) B
                                @.CurrIcon := "drivingHome";8 w. G$ A6 R6 ]) ^) r# Z
                                @.DrivingHome := true;
* k# q3 ^5 C/ k3 `% U! ?; D                        end;, a* z! ?4 ?3 @: \0 ]# H0 `
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 q4 e& G- J. ~, m
                        part := @.transpOrder;. m* X* Q8 x0 d2 w
                        part.move(@);-- load part
$ c; w' v6 U9 E: o1 I                        @.CurrIcon := "load";
" n  C; D/ ~. R  D- ?* `9 [, |                        GlobalDistObj := part.globDestination;
1 ?" }/ n5 k, b/ R7 K                        assignLObj := rgmanager.rgAssignL;1 A6 u- Y( `" F6 e/ o
                        row := assignLObj.getRowNo(GlobalDistObj);/ W+ E9 e) d" R+ v- ]- p
                        if Row = -1 then -- since 70* z' m, }0 V5 |9 F3 s# z
                                if lan=1 then0 A) o7 H7 Z% Z7 j; |( p
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 @' O, E1 z0 n" j. L. g0 g& [
                                                to_str("in der Andockstation: \"",?.~.name,"\""));4 m( G  L; {; R" G9 I( ?
                                else9 j% L; J5 J% e( j3 |6 j
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 ~2 [. s" l4 N6 O8 e/ F7 M% K) \                                                to_str("in docking station: \"",?.~.name,"\""));                                : P: n1 T1 F+ ^! }) U# F9 R) F1 Z
                                end;
! a' A% s# o3 Y+ @4 t. \                        else
) W! i6 B0 c3 z5 |                                @.Destination := assignLObj[1,row];
9 c: U: e  ?0 J( y; y  V                        end;                       
6 n& B! k! V; }1 G; D3 D/ `0 i                        newDirection(@);4 N- N7 u% Z" a3 F2 G
                        @.HasOrder := true;7 v" t8 M( g, l+ ?/ x! D: N
                end;+ g/ \; z( |+ [9 G( @1 y
        end;. N& x. U9 A" s. H6 r3 b
end;        -- of the method+ o5 e  O- b4 @' f+ K9 ?& U
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 3 G  d- z+ i3 j8 }, y

# G+ n: {$ ^, E0 Y+ F这是AGV_putin中arrive的method。" W' Y* [% r) t) p1 N3 G. R

& C" @5 z- i9 z0 E) _- h- w当到达物料速度越高时,这个报警更多,
2 a: g- X% S+ p3 X  f可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。$ n2 c$ u% E6 N. X
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?6 j" r+ K! N6 v. D+ l
& A1 r! b+ o" z/ ?5 @
另外一个小建议,就是move,所有的move都可以这样
% v; X' {5 \# U3 L+ v1 D2 zif not move() then debug end4 W+ G: m5 \) W  ?. X' B# e
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。- Z; r3 N7 A% A' h6 O
plant simulation中的free libraries有AGV模板,# G- @4 ~% @3 l2 J/ q
里面也有案例。
5 d* ^- U2 Q% r我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。) G) v; k( D( j- m+ o7 `1 G
! n+ j6 J3 x  j8 Q
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
9 l* T- U( U2 N* B: w8 i$ c9 i8 k2 v
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 4 I  x5 t! K# B4 k9 g8 T
这是AGV_putin中arrive的method。5 j* |! d8 }+ `/ ]

# z% r1 y, X* f& a5 n当到达物料速度越高时,这个报警更多,
; @: Y& q8 @( o0 a
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-11-21 14:33 , Processed in 0.019849 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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