设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7407|回复: 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': W: y6 l" l; e0 {- s+ c
*/
% e' E; M- i. @# m9 {* S$ l+ l$ J' Z0 Zis
' d* [  U, X7 A3 b! `        part, GlobalDistObj, assignLObj:object;row,Lan:integer;. y/ }' C5 C" U1 X  S
do2 A, S) n/ b" A6 P
        Lan := rootfolder.Internal.Tools.AOLlanguage;
8 Y8 C  n7 Y  n" H; f8 _$ P        if current = @.Destination -- else return
: B/ j' v' u0 S5 c        then0 C& [0 g" l! y& m( y$ O8 u
                @.Destination := void;
& t8 t* X& f! a, Q# u9 U* x  v                if @.occupied then
. c( S: ~; R/ [" \: F* }* D- n6 h                        part := @.cont;; G0 J- l2 F- E$ f' K9 N2 Q$ K" M0 V6 T
                        @.transpOrder := void;
4 @' I" \9 c: P; {                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 b4 `) S/ c4 \. R
                                @,root.eventcontroller.simTime);
+ y% n, r# C# y) I- c7 d& S                        @.HasOrder := false;
* s( c! |) \5 n- {                        @.DrivingHome := true;1 S/ [$ M6 q# B7 r0 Y. o. H
                        rgManager.tryToStartTransOrder;
' Z" M) T) j7 y' Z; k/ \  x$ K9 y% b                        if @.Destination = void3 ]  f1 d0 ?8 e) q2 l( W
                        then -- no transport order for vehicle @
" E9 b( |& p0 T' F: R3 Z                                @.Destination :=, n: k6 m, \( i) L4 X; e: S: H! L
                                rgManager.nearestFreeStation(@,track.~);
# _7 G3 q0 v( Q0 X                                newDirection(@);   " ?- Z- r) G0 t7 ~4 j" r
                                if @.Destination /= void then% P" j: u  S. @4 F& n& W8 Q
                                        @.Destination.NumReservation :=# _8 N( o; V# D' g& m4 k# a
                                        @.Destination.NumReservation + 1;- ?& ?+ E( |+ ^9 h2 Y. q% m
                                end;
* F% X5 V. \7 X8 f2 E                                @.CurrIcon := "drivingHome";. [2 `0 q! t: p$ ~% R
                                @.DrivingHome := true;; m- U, n  a5 p# q' T* @
                        end;$ ]; p0 b6 \$ U0 s
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station) |7 f  t4 G# r1 q
                        part := @.transpOrder;
2 Z% z- k# a$ u3 j  O4 G" {                        part.move(@);-- load part
. `$ [' U9 K  F. Z. e* `                        @.CurrIcon := "load";  Y  Y" x- C! C# w# x
                        GlobalDistObj := part.globDestination;  |9 j9 S# }" @; I6 D
                        assignLObj := rgmanager.rgAssignL;
2 u6 H$ z/ g! j4 p; Z+ `3 e8 O                        row := assignLObj.getRowNo(GlobalDistObj);  O0 b8 Q8 r  _
                        if Row = -1 then -- since 705 v( M2 P$ b8 f9 G
                                if lan=1 then
( {# a8 f0 F3 O4 m5 y                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- k/ d6 R9 o1 E) k
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
! o- N" P& k& ]9 L5 n                                else$ e5 y, v* P( L- x* w) X
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
4 }7 ^4 `+ [  r( R/ @, E" G' v+ ~- Q; c                                                to_str("in docking station: \"",?.~.name,"\""));                               
+ O. ^. M9 K/ s/ Y( C- G: R                                end;' B8 g2 C9 _* Z& W
                        else9 B8 x6 L! u1 N1 w  I$ j8 B# Y' S# Q
                                @.Destination := assignLObj[1,row];2 E8 \, A! r" a2 l/ ^
                        end;                       
8 H* g$ w. w  @3 \2 Y                        newDirection(@);
2 t8 p- g' j. f                        @.HasOrder := true;# p( p  z) R; _* ]: L7 K7 E
                end;
% c; K2 Y& j# y  @) R! d* D        end;# I! S( U$ C8 q8 r
end;        -- of the method+ K- T; ^; d  g3 }6 x- i
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
/ p- `: G9 F$ x7 E$ {; ?
. g% [& x: b6 \: r, M1 g6 r4 k这是AGV_putin中arrive的method。8 r$ w1 m9 |0 @  h% h% d

' A  x+ K' g$ r5 p6 E当到达物料速度越高时,这个报警更多,
) g) ^& e+ F* \9 z) L8 V# d4 Z* M) m可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
; W% a2 Y% a0 [5 I9 H! o! V  S4 e程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
3 m! p6 h8 W" ?! E; m3 z
# {) I  R0 v8 I2 m7 i& t另外一个小建议,就是move,所有的move都可以这样
2 Z/ C. H  a0 S2 qif not move() then debug end
8 S( `$ i, }7 S8 V7 R这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。3 c, v1 H: |7 g) N( ~; }
plant simulation中的free libraries有AGV模板,. R: O) ~) x  j& ]( e4 T: V. h
里面也有案例。0 v7 ^7 O( p  V* W8 J
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。  `# z$ G! d& q! Z, o
, h& ^# F0 I2 V. F
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
( i$ A- {% Y, c; x2 v" W3 m6 ^/ m0 f7 r) L
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ) G0 G1 R3 B8 n8 ]
这是AGV_putin中arrive的method。
/ k- N" K+ S' t1 X8 h4 j
+ H( H8 l" V, B- B5 n2 X. J当到达物料速度越高时,这个报警更多,
% A2 x7 c% o; n( M% q1 }0 @
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-10 01:06 , Processed in 0.021210 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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