设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9948|回复: 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; `/ A, B/ Z+ K* j( Q8 x; m
*/, L. s4 \2 e/ z& \* S
is
" T) ~& u( \$ R# z5 [: a        part, GlobalDistObj, assignLObj:object;row,Lan:integer;: t6 A/ e( i  w& @3 B/ T
do1 @0 z7 R9 x# F% S2 \
        Lan := rootfolder.Internal.Tools.AOLlanguage;! @  y' F! F2 b" P; }$ f. l
        if current = @.Destination -- else return
- q( z( V, p0 _  x( x# _        then8 k& p) E5 ~( x
                @.Destination := void;- b0 s, h6 a$ U  ]1 Q4 b( d
                if @.occupied then) J! M) u, x( |9 R- R
                        part := @.cont;
7 I& L" H' o  A! l* @5 |8 r4 _                        @.transpOrder := void;0 N. L/ r4 N7 i) \7 e
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 \- ~) z0 F* C* _. D                                @,root.eventcontroller.simTime);7 Y( }8 i* o9 N1 S. A  H1 z5 [) E  A
                        @.HasOrder := false;" O4 \3 l& r% r& s4 p
                        @.DrivingHome := true;. l* ]' F! F! X
                        rgManager.tryToStartTransOrder;5 a) ^+ Z8 ~: u, t" w0 V& T3 Q
                        if @.Destination = void
/ Y4 w( x1 D! e  P' q; T                        then -- no transport order for vehicle @$ I$ H7 ]  \7 ~# S
                                @.Destination :=
8 B! Z* ]1 `: C                                rgManager.nearestFreeStation(@,track.~);6 _4 C0 [, B8 r
                                newDirection(@);   3 l8 o6 r/ |8 w" V
                                if @.Destination /= void then
5 z; X  b( v) o9 U; G                                        @.Destination.NumReservation :=
- g1 R  K/ b$ a" n' Z3 }- v& Z9 n                                        @.Destination.NumReservation + 1;2 y: F, \" |! q( k6 T% ~  G$ J
                                end;
( i3 M% z& \" W5 v3 d7 u+ E                                @.CurrIcon := "drivingHome";: f, |6 r  @# K3 n: U6 Z5 c4 Q6 }( y
                                @.DrivingHome := true;% G7 n0 X9 `# I9 C
                        end;% W* T! E; v8 F$ L& X* n
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 i0 b3 |  L* P" s- E
                        part := @.transpOrder;8 w' p& K. i1 N$ x9 x) \* |
                        part.move(@);-- load part
8 U9 ~4 R* y) ^8 @2 L                        @.CurrIcon := "load";
. f) i) r' x8 |' y# K: ?9 `                        GlobalDistObj := part.globDestination;2 l# D4 X$ v9 l0 f7 P
                        assignLObj := rgmanager.rgAssignL;: k2 _6 A# F, r7 q$ ]/ M2 r! [
                        row := assignLObj.getRowNo(GlobalDistObj);
0 v( k) Q4 o3 ~7 [8 Y                        if Row = -1 then -- since 70
: h/ `8 B: l+ |: l. b                                if lan=1 then& b/ b* C! s8 b2 N/ t1 Q" R5 _2 L  ]
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 D+ j# \6 o- i* o
                                                to_str("in der Andockstation: \"",?.~.name,"\""));4 }/ B% S+ V/ g; _. x- ]$ @2 H
                                else% u( L( B2 h8 L+ \( \1 ^3 Z) K
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
6 Z* y& M; r6 y2 D8 d) Q                                                to_str("in docking station: \"",?.~.name,"\""));                               
4 C' Y* [) E  {7 v  y0 t                                end;7 @; t5 q2 K$ r3 [1 ~
                        else
0 O" h- o2 K; M  T2 u7 p8 Y; m                                @.Destination := assignLObj[1,row];- \1 d6 |! U* C5 F8 l' H1 Y8 c
                        end;                       
* P# [: n! o$ S/ H                        newDirection(@);
/ h" m) d. C( W' T+ }% d- p9 h                        @.HasOrder := true;
. Z+ P8 h8 N. b$ C8 ?7 c6 E& m! i                end;; u) ~( [$ M' f
        end;
* q# p; ]9 f8 ]1 l7 F, M, ^end;        -- of the method) }  q- l) h- C8 [" U6 w4 m% D
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 2 I& L/ S5 t' D" Y0 S3 ^3 C
  m% L4 f# ~4 C! _% q
这是AGV_putin中arrive的method。
  @1 ]& W* j" J" f# j6 `2 Z' Y- G$ u( ]5 \
当到达物料速度越高时,这个报警更多,
, k! U2 Q" t2 A% w% f9 w* P3 U可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
# [( F3 S; j% p% r- j程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
  e, c; V* u' |- f4 u6 H( L! G' ]! g$ y7 D# k6 W! I, M
另外一个小建议,就是move,所有的move都可以这样+ A0 s- l# f! u; o% ]
if not move() then debug end
9 F2 g3 B. _( p% D' h& u. F& A这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
8 a+ J3 w& W3 {! q3 }9 K# o' aplant simulation中的free libraries有AGV模板,2 F4 t( L, J3 c3 K# J( n1 Z
里面也有案例。
% A6 j% ]4 Q& K( ?9 T. D/ b我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。: g  X# u/ b+ o' h5 b) ^2 d

) R# x6 w0 K# ~+ L. k+ F! M9 X我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 9 b3 k3 y% {0 M) s. h0 x3 `& W* R

  u8 m% j, D8 r: G$ ]) X: S# }$ ^那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 6 q, }! r9 Z. g3 \
这是AGV_putin中arrive的method。9 A5 L. N; j8 E0 f
! U, W6 @: V; Z" N% g
当到达物料速度越高时,这个报警更多,
/ S6 p# T7 c2 b" p; `
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-9-4 00:38 , Processed in 0.029718 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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