设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7330|回复: 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'' l$ R& j4 D7 u+ Z6 s
*/3 S5 Y( V& L2 G% f5 O! }. z! ?* G
is9 c; |3 j# R0 r/ S) l$ \; i
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% j7 n& V# U+ [* H0 m: Wdo8 ~8 ^9 X3 o, f1 ^1 q5 P. n
        Lan := rootfolder.Internal.Tools.AOLlanguage;
" N  Y. ?& l+ L3 _        if current = @.Destination -- else return
& _6 L/ R1 H- I- ]' i, U        then
% |$ R" X3 h# J" r7 l                @.Destination := void;
$ z- P6 E  O2 g9 q0 o3 H& S2 S                if @.occupied then
/ ]# ~+ O5 t# q$ I. ~  E                        part := @.cont;
7 E7 ]4 k! y) q( m" O0 Q4 `                        @.transpOrder := void;" L6 L6 Y  \; l# N0 |1 u* W
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," `, Y* T; b- C' A
                                @,root.eventcontroller.simTime);- N& Y; Y- a# e
                        @.HasOrder := false;" {5 |$ u; E! Y
                        @.DrivingHome := true;
) R, l0 h, `+ C                        rgManager.tryToStartTransOrder;
/ X  y5 N; N2 F9 ?. h& K# s                        if @.Destination = void
/ i$ _7 t3 X4 d9 v0 A9 j  q                        then -- no transport order for vehicle @
* _: w0 H! ~; l$ I5 @                                @.Destination :=' {# j' ~' ?0 U: [# ]8 t, [* t2 H
                                rgManager.nearestFreeStation(@,track.~);$ P# c( k+ g' F3 Q! p
                                newDirection(@);   
' R3 p" X+ j' K% N                                if @.Destination /= void then
  [* a( k* l8 e: W0 U/ |& }& y2 p                                        @.Destination.NumReservation :=) a2 f6 V+ J4 m
                                        @.Destination.NumReservation + 1;
" ^4 g6 _3 t# g7 m% I                                end;
* u  R' V  `) V) A                                @.CurrIcon := "drivingHome";# H; i7 E$ I+ o9 [/ L0 e
                                @.DrivingHome := true;6 z: C; _3 K# `- k: D5 }6 q
                        end;$ [5 ]- w4 t; V6 t' K
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: Q# c& U9 c+ h  L                        part := @.transpOrder;- J9 ]/ F7 E* h
                        part.move(@);-- load part/ e3 U) u& y. \
                        @.CurrIcon := "load";; G" w  p1 ^, I2 T2 r" K9 Y
                        GlobalDistObj := part.globDestination;
: O7 v" @+ N- s                        assignLObj := rgmanager.rgAssignL;
/ ]$ ]8 T5 Q( f                        row := assignLObj.getRowNo(GlobalDistObj);& z( g% n6 Q, K( g7 X
                        if Row = -1 then -- since 70
9 O; u4 j% y( J$ G8 ~2 l                                if lan=1 then
/ T& R$ s( u! a( R: C                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," u" M3 B6 J. y2 ~
                                                to_str("in der Andockstation: \"",?.~.name,"\""));9 p* m2 o: U3 ^  ~8 s; W1 G
                                else/ A3 W& |& N/ P; p! U
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' l8 Z2 H% t0 \5 r( P/ Y) s                                                to_str("in docking station: \"",?.~.name,"\""));                                # k! C& r5 a4 `/ i5 _- w- W
                                end;% b& p9 I3 @; S$ N2 S
                        else. u4 r3 k% b6 S9 ~  P5 K6 u
                                @.Destination := assignLObj[1,row];0 a% P+ L+ O) I% e
                        end;                        3 w3 J! L; r0 ~+ M
                        newDirection(@);0 b' F  z. {- ?3 L) X; ~9 k9 T
                        @.HasOrder := true;
; q. @% @2 @7 `- ^& @0 {                end;$ |' q& Y0 E  W1 P
        end;
& c- R% T/ n9 t7 ~7 @) ^8 mend;        -- of the method/ _# X2 {. L& l, p0 \- x
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
! Q5 X8 x; S/ e7 ?( {8 ?% i' L; B3 M. n1 c6 C8 f7 F
这是AGV_putin中arrive的method。
$ R  L+ j9 X7 @* X/ o: g
/ `3 [8 N! s" q/ @当到达物料速度越高时,这个报警更多,3 D8 K% }5 L0 ?7 ]- U
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。3 {) x; h7 P6 X
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
$ o6 i9 k3 X7 L- G9 O) P* Q9 Z4 l1 x; E+ s; g
另外一个小建议,就是move,所有的move都可以这样( _) m7 f9 ^- l. u8 B- N
if not move() then debug end
6 c6 S% j! v# L6 _0 `" _这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
7 V; ]6 n: R' o0 Z& S* o% w, J: pplant simulation中的free libraries有AGV模板,
5 c- [3 d+ D1 K里面也有案例。
" U% R: P7 [/ e, u. A' t( u; H我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。9 \4 J/ v! r; v2 H; C1 h  ~: L
4 k: f8 J0 F' f# u' Q5 s2 n+ W
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
8 ]9 h' M  _, q3 F* v1 g
7 p. g' R& k5 K8 L. Q那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ) Z+ x- o7 x, y8 p
这是AGV_putin中arrive的method。4 Q7 p9 v2 J6 y4 R9 B! y% M

; ~* Q1 D9 x- D/ a当到达物料速度越高时,这个报警更多,
$ M, d3 H5 J2 f
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-4 14:18 , Processed in 5.765228 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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