设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9046|回复: 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'
9 z' B6 j- x% H. N% y& x" P. @*/: I0 Y& S1 n2 h; k0 }
is- W- S( K7 r( a: h; a) c3 K3 F
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 Z3 s1 K( a' X5 e( H! o- Z( hdo( @7 R# I6 N  m8 K& L) d0 x
        Lan := rootfolder.Internal.Tools.AOLlanguage;
( q$ I. t& V2 [6 C1 X& L        if current = @.Destination -- else return
5 P, _' p) P2 ]        then' r# z9 T. ]( t! g2 X9 m
                @.Destination := void;) q7 m. q/ v7 S: x
                if @.occupied then9 Y5 ?; P$ ~% L
                        part := @.cont;1 q, v- K0 m5 f/ T
                        @.transpOrder := void;+ T* }& ]1 `" ?: L) I
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
3 Y- M, ]& R/ L# h- c( b+ e( J                                @,root.eventcontroller.simTime);
, _" T, ^" I0 M/ a                        @.HasOrder := false;+ }* j% s  c- `7 u2 w+ R, O7 n/ n
                        @.DrivingHome := true;4 \/ `8 ^+ a  o9 S- h
                        rgManager.tryToStartTransOrder;& S; k1 A6 z9 T$ Y4 U1 T! G3 }- D
                        if @.Destination = void
! X& _1 s* @9 z- [. I                        then -- no transport order for vehicle @
: F+ _1 ^4 B- g' u/ _% E7 O4 B                                @.Destination :=
2 }1 s, r; B  R4 P                                rgManager.nearestFreeStation(@,track.~);
1 z7 i5 R' m5 T- {. z4 G                                newDirection(@);   $ K& \# z1 f0 X" @* T
                                if @.Destination /= void then
- s$ o# g3 J3 @4 F) z                                        @.Destination.NumReservation :=5 d9 @$ v; k  R3 h/ c
                                        @.Destination.NumReservation + 1;& ?1 y% B" N+ ~  D5 [
                                end;- Q0 b- h3 @7 x
                                @.CurrIcon := "drivingHome";
' b7 K6 F% ~6 ]" P& [                                @.DrivingHome := true;
+ S, p9 v* F' h& V                        end;
  `6 X6 r" p6 [                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ k' {$ ?9 D- M2 `5 U                        part := @.transpOrder;* a0 p* d# G( X3 k7 b# @: l/ l
                        part.move(@);-- load part& v5 I+ _& y/ L' s2 ?) f
                        @.CurrIcon := "load";
- s- a" M1 u$ ?6 i1 d0 f                        GlobalDistObj := part.globDestination;; W/ J2 j- i/ Q8 _
                        assignLObj := rgmanager.rgAssignL;6 N% _9 J' c6 e3 }
                        row := assignLObj.getRowNo(GlobalDistObj);
9 K: J. t1 x" N                        if Row = -1 then -- since 70" T( M6 a3 M4 l! I" B
                                if lan=1 then9 n: f1 s5 o$ L. L  ?! [& V
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 \' _" K0 G; p  x  F8 A6 p6 X
                                                to_str("in der Andockstation: \"",?.~.name,"\""));4 v& [. Z* g& N0 C( b8 Z5 S
                                else+ {: m3 C2 D9 e1 i1 V
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 R0 g/ ~/ E  ]8 M+ h' Z. I
                                                to_str("in docking station: \"",?.~.name,"\""));                                / c; Y, a4 H' s5 q( J2 j
                                end;
& g4 g# e; J2 Z# f. N4 R                        else
! A& ^% c! z# i# w% z                                @.Destination := assignLObj[1,row];
( d8 }1 R7 }+ `, r) D; {                        end;                        2 Y+ G) s: {( E% \$ \
                        newDirection(@);* J; S" V9 ~  O) _! U
                        @.HasOrder := true;0 P: ?  U. x% `9 w7 N6 Q; \& i
                end;4 g6 H# s0 ?- x- Q6 g6 f
        end;
# x/ B' H! i! N* m- E; aend;        -- of the method
# {7 ]& S  m& Z' R' O# Y
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
+ {: Q: h8 b) d+ a# H7 P. u3 [: }
这是AGV_putin中arrive的method。" C9 V( O+ P7 |" q: D% |

5 X( I4 ^- u6 F+ w* b/ [+ M当到达物料速度越高时,这个报警更多,
: X3 j# @1 `( s$ I2 W) H! Z可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。5 F+ |# S$ f% }! \1 i# l, ]& D- o: i
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?  d; G7 |  Y4 X" v

4 E& }) C+ ]+ u& c: m" ]另外一个小建议,就是move,所有的move都可以这样
8 O6 S8 v( \/ q5 M2 sif not move() then debug end( ]3 m8 q5 Y; B; x* I$ U
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。( u' e9 o7 }2 ~! ]: ~/ d- t+ S
plant simulation中的free libraries有AGV模板,) k  M+ d" k1 M0 K' s
里面也有案例。0 v: Q* b9 P: {$ m: {8 ?4 L
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。3 A1 [5 O8 }4 l3 B

0 N% O  e" Y- D' t! S, ]我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
' K+ E2 ?5 c) X+ p$ [( l! `8 p" Y+ J  ^$ l/ i
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 * a6 i% m- J- n4 e
这是AGV_putin中arrive的method。6 L# s$ k+ F7 M6 o" P$ C# B

* ?% P. S( a$ p, m/ }7 V当到达物料速度越高时,这个报警更多,

; `# t; `" s( B9 D: K$ s& c另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-10 10:33 , Processed in 0.016940 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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