设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9661|回复: 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'
) X: q' f8 N! y, Z4 R9 P9 C*// R4 c& \# a, ~1 N
is
- c& y- z. \, ^, ~$ Q7 X$ `, i3 M        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
* w2 x: j, g9 a' Fdo& I' Z, ?1 p) @2 _8 s- U
        Lan := rootfolder.Internal.Tools.AOLlanguage;& I0 }# J" _& `: o4 R! ?+ g
        if current = @.Destination -- else return
1 C9 z- ?; V8 d; H7 f        then) t6 |: v* D: c  u
                @.Destination := void;  i) v3 V% L( j0 C# t; C
                if @.occupied then4 M( d. |/ J" v8 B* C
                        part := @.cont;( h7 M/ U( |6 G. R$ ?; u! n
                        @.transpOrder := void;2 ]$ s. |. t4 z# z
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,/ f$ i& S6 ^5 ]& L2 s
                                @,root.eventcontroller.simTime);
5 c" ]" M5 ?; \6 r9 e+ v8 Y. \# E- J                        @.HasOrder := false;" m/ s+ ~1 h% |: P* q4 L- ]: o# H
                        @.DrivingHome := true;
; e" {/ j  T' C. M: I1 @& }& Y                        rgManager.tryToStartTransOrder;/ p: I5 f  S- u. P$ R/ _2 d2 X* N
                        if @.Destination = void
# I& J! @, G7 A                        then -- no transport order for vehicle @
( L  X) o2 K# o& P- Y  i                                @.Destination :=" o0 _7 g" Q2 _  p3 Z
                                rgManager.nearestFreeStation(@,track.~);
  c6 r: Y; v$ P$ B0 S                                newDirection(@);   
% n4 E. Y2 g% j2 ?7 P  h& ]$ H                                if @.Destination /= void then
1 s" P$ Z. N- G                                        @.Destination.NumReservation :=
1 K7 ]' h9 t" g, s8 d                                        @.Destination.NumReservation + 1;
# [/ u" i" ?! A/ v! g3 V                                end;3 R* k5 p8 o1 `# L
                                @.CurrIcon := "drivingHome";0 X, n% L1 {$ E! b% L! [/ k
                                @.DrivingHome := true;
, n# P1 L  `/ V/ E, d                        end;" N, g( @* `/ L8 q+ U4 A+ h
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station+ e% J- M! M6 m. o% ~  r: t
                        part := @.transpOrder;
7 P) k' T4 [$ ~  r7 G                        part.move(@);-- load part
0 S0 N2 g- G) I! T& w& `                        @.CurrIcon := "load";: ?' ]4 A: M8 x* S; n! B$ i0 _) P
                        GlobalDistObj := part.globDestination;7 P7 ~- F) j" v' Z5 l- {8 F
                        assignLObj := rgmanager.rgAssignL;/ t8 C0 ^, f, o8 `" e) k# g7 [
                        row := assignLObj.getRowNo(GlobalDistObj);
* a/ b1 _7 x! N9 o: u: ~9 E                        if Row = -1 then -- since 70: F: _- \* r- k2 |% ]$ p6 `
                                if lan=1 then
$ a/ s9 M6 W, j% R! R( Z1 X# L+ C                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! e% q  \: h& i8 p
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
- E. o* S9 K1 E" o                                else
/ I8 o" h) T4 D0 Y  E, t- D, S9 S. W1 X                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ U# C! V- y2 R
                                                to_str("in docking station: \"",?.~.name,"\""));                                1 A+ b8 A1 D2 K  `. \+ \, k/ s: J" b- m: a
                                end;
! y4 s2 k1 z% R% p                        else2 V. J/ z# A# C  m
                                @.Destination := assignLObj[1,row];$ u- X& j  z( F. Q8 {, ?, q. V
                        end;                       
% h" R$ n" l. Z, |+ b                        newDirection(@);
( [" q" G( C% I0 _! q                        @.HasOrder := true;
; ~6 @! c" o5 p* ~6 x                end;; K5 e4 Q. w- u) k& i) v
        end;
+ ~$ y- k5 m7 N# H* d5 i0 ?/ k7 A( Eend;        -- of the method4 Q- _+ ?9 Z7 c, ]6 z& ^/ t8 O8 `
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 $ k7 z8 I+ J( ^# X7 g- q9 Y' \4 B
' V8 x# h) t6 E( Q  c, \1 p. E5 p8 |
这是AGV_putin中arrive的method。1 N+ f+ u0 {9 B

+ C* G3 P8 s1 ^% C% `当到达物料速度越高时,这个报警更多,  O! f* Z; ^% G& b8 c
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
# w& j" z5 a' @/ f. A* r7 \# \程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
. ]9 ^' b# A4 ~6 |& o4 _9 E2 d4 o; [& p* I3 L3 t& P# ^7 r
另外一个小建议,就是move,所有的move都可以这样9 T3 S: s0 K# h7 t% F
if not move() then debug end6 U6 ?2 v9 e. v- f7 U. K/ }% |
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。" _$ [) j! ]% ~
plant simulation中的free libraries有AGV模板,! |) ?# Q( G4 J! Z7 X  Q
里面也有案例。4 d  h4 g5 n9 `4 q
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。* u9 j4 X& d+ |+ x4 [4 i) g
0 C+ ~+ r' T, Z
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
( d& U6 m0 N1 v) r
1 [+ G; a7 [( q! E* i那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
. W1 r0 X. S# D2 B- C这是AGV_putin中arrive的method。! U0 i* t+ e0 ~  F9 P  T

0 G; f  e4 E3 ~. H8 {当到达物料速度越高时,这个报警更多,
$ F6 \3 t% o  ^. j6 @* O! O
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-15 14:37 , Processed in 0.026986 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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