设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7967|回复: 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- L6 J, B8 P! Z5 B+ a
*/
3 _  A+ L- H& b9 {) w7 Q: fis
% V, ?$ S  `, [  ?  [        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' c2 z) S/ P" ~" L% P. Xdo5 B( n1 c! M1 a5 N) R7 q
        Lan := rootfolder.Internal.Tools.AOLlanguage;4 y% n! q( F- v" v$ |: M% @" G
        if current = @.Destination -- else return
) K. `% n: f" d# f7 y        then
  D" r( T) u* ^                @.Destination := void;
% G' y5 k/ w8 [8 P                if @.occupied then# X6 G( y6 r' n2 \+ W
                        part := @.cont;
8 j- o; `  j8 g  H                        @.transpOrder := void;
) R# p4 f1 Q% @7 q" `1 u- w) ?9 d! B5 M                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" ^% R# }+ w& ?                                @,root.eventcontroller.simTime);; `* z6 G3 b! t1 ?; T1 d9 d
                        @.HasOrder := false;
& V0 M0 @8 M! w) h  r+ V. y+ B( V& |! Y                        @.DrivingHome := true;
/ Z! {4 r  ~3 z( J1 I8 T                        rgManager.tryToStartTransOrder;; q8 Q! a" J) E1 Z$ @
                        if @.Destination = void) ]. t8 g( M1 |8 L0 n) E- T" d
                        then -- no transport order for vehicle @
9 }& T6 L* M4 L) a* \2 W" H' A                                @.Destination :=
: ~3 O- C4 c& _6 t; L                                rgManager.nearestFreeStation(@,track.~);- l1 o8 H( p. R
                                newDirection(@);   ' B/ r/ Q9 ?9 s/ E' ]6 b
                                if @.Destination /= void then2 W! b* l! t: c8 e' F4 H% |5 z% E
                                        @.Destination.NumReservation :=
$ K+ T9 U! ^. |& c" p8 o2 U9 H9 @                                        @.Destination.NumReservation + 1;, V" g! C( S6 e/ }6 H9 D4 t
                                end;! x5 X& |3 q! @- |5 p5 N( G: E. g
                                @.CurrIcon := "drivingHome";/ A5 @3 e9 {1 Y
                                @.DrivingHome := true;
7 m4 n! H' [6 o! H7 F                        end;# o; e, @4 W0 ]4 x; X, u" X
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 Y/ r9 U) S9 |, D- h+ n
                        part := @.transpOrder;
+ |% E( T) D; `+ p& W  w                        part.move(@);-- load part9 ~- _/ Y3 z% P2 \. {7 }& a
                        @.CurrIcon := "load";
7 X6 e# S$ |6 }                        GlobalDistObj := part.globDestination;0 d& G2 A6 Q7 ~  v9 L
                        assignLObj := rgmanager.rgAssignL;
5 x3 I2 b' C- T                        row := assignLObj.getRowNo(GlobalDistObj);1 q5 V2 N" `- r! S2 D
                        if Row = -1 then -- since 70
6 f7 N' ?( n6 O& Y2 V: {                                if lan=1 then
8 H2 m' y; r( E# R                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 X* i7 A8 f6 ?9 d7 ?                                                to_str("in der Andockstation: \"",?.~.name,"\""));$ |, ]- G5 l5 r8 j& @0 l
                                else
( m* T7 E* C  m$ E; X) z                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
/ }+ o+ i7 H8 P- G0 A8 \9 o5 J; A* m6 S                                                to_str("in docking station: \"",?.~.name,"\""));                               
3 [! I3 x' G; N% g" b                                end;
, a! s% t/ H) w3 q7 @                        else1 _9 V  Y- R7 P7 z0 B
                                @.Destination := assignLObj[1,row];$ a" q7 w% c: O' m- f$ I
                        end;                        9 D+ j# X) w0 j/ o5 [2 s
                        newDirection(@);  s+ b/ |/ n1 u# Y4 M0 \. P/ `
                        @.HasOrder := true;& J+ `1 N; d6 p* c- _& t' a
                end;
; k  W/ I  x& w7 q* ~1 a0 l        end;3 p) y7 T' k. V4 F
end;        -- of the method% q# G' j1 ?" D; D1 }2 C
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
2 Q# N# ^8 I! V5 C' }) t' R) [9 r& X: r( s! i
这是AGV_putin中arrive的method。
* k, I* F2 V/ _! y: o. X+ X4 j5 ]4 O3 b' b: t' Z
当到达物料速度越高时,这个报警更多,
5 G5 y, @) t1 w$ ]. \+ `可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
/ H" H1 m2 J9 L. a  u程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
, Y- B$ p$ n: Q8 T, t' o3 j+ o8 q0 c8 i, j( J; t
另外一个小建议,就是move,所有的move都可以这样" L1 u" G8 h9 p8 A$ ~/ n" I6 D8 y0 E
if not move() then debug end3 Z0 Y  M/ D' _
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。; O) q! {  h3 C  L) i# ~" u6 j
plant simulation中的free libraries有AGV模板,: F4 ^2 I" [( _) ^0 ^
里面也有案例。/ y% }, ?5 N9 Q( w; ~1 a6 ]( @
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
" g& a- \/ h! R7 z, R6 Q6 Z( I$ X! ~& n) F  ]3 n( w" B+ p3 Y( X
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 / `* k1 u/ y3 B! w2 }

: @4 C4 [3 K% |+ v9 e& @  x那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 1 `/ @2 U9 a) a1 i" a
这是AGV_putin中arrive的method。
$ @9 O# c  D6 n  V1 N7 S9 {) ]+ V3 U5 W3 z8 T" J
当到达物料速度越高时,这个报警更多,

/ A1 R) p3 n& `$ x8 }$ N0 H. r% N另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-8 02:15 , Processed in 0.024658 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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