设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6831|回复: 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 H: ~! ]/ J# X' n6 Z- S7 Q& P*/) I" ?. G! z) ^8 K/ m5 D
is0 Q+ U' ?" _  h7 k# q' p
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;( q- t! ]  C! k! Q% [3 F2 Q! ]
do
& Y: X; Z/ ?4 \$ y" {/ g        Lan := rootfolder.Internal.Tools.AOLlanguage;
' l* o! Q! @4 ]. M/ A/ o4 v  M        if current = @.Destination -- else return
/ j# H; ?+ Z8 f8 \  W+ ]1 G* F        then' z* Y5 {) k# y, K
                @.Destination := void;% g' h5 `1 d7 M3 l# o/ t6 k
                if @.occupied then! _8 {# O$ l& W& N& ]
                        part := @.cont;+ g) }2 b7 k7 v  I4 ]+ B
                        @.transpOrder := void;4 H* S( U8 y# ]6 Q3 ^+ d6 x
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,/ r+ j, i4 n& p9 W
                                @,root.eventcontroller.simTime);
* v- F) j7 h/ O# x0 R, ^9 U                        @.HasOrder := false;/ Z4 W( h) u  \) ^7 _) \) V9 E
                        @.DrivingHome := true;
2 j4 p, i( F& Q4 F9 P5 T/ Z                        rgManager.tryToStartTransOrder;
- I$ l1 q: X$ A/ w3 a                        if @.Destination = void
8 q& a% D) K6 }2 |0 j                        then -- no transport order for vehicle @4 K/ O7 y4 u6 m
                                @.Destination :=
% h* j2 f. g2 R3 l. W! G1 }                                rgManager.nearestFreeStation(@,track.~);
5 C* k0 e* I6 K: E" T8 ?( v5 R                                newDirection(@);   # t0 S' G% `: ?; u. _
                                if @.Destination /= void then0 a* q, B! z! |6 I# `/ I8 O# g
                                        @.Destination.NumReservation :=
3 P; ?2 C; J! d9 c                                        @.Destination.NumReservation + 1;
/ Y2 m$ H* _2 ?% y6 {                                end;7 f& I. _( C; O  j  r; y, C% A
                                @.CurrIcon := "drivingHome";7 e9 K, g0 l5 K4 B
                                @.DrivingHome := true;6 ?2 t8 X7 N4 t3 O
                        end;  M  L. h$ w. f- w1 P6 G+ T' e
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 v7 P2 |" F0 ^( _9 s+ _                        part := @.transpOrder;4 ~% u% ?/ I' F1 l. g4 d
                        part.move(@);-- load part$ J* W, g% Q# P) V2 `
                        @.CurrIcon := "load";
/ T2 @' B; j1 ?% T& B* M. r( ?                        GlobalDistObj := part.globDestination;
7 u/ {; @% Q. ?& \2 J5 y                        assignLObj := rgmanager.rgAssignL;& s# w* r" b' g5 N
                        row := assignLObj.getRowNo(GlobalDistObj);
8 V8 ~! M6 [' k, G6 n4 x                        if Row = -1 then -- since 70
7 t  M, t1 o; e4 I) h5 \+ c                                if lan=1 then! {  Z7 C! s7 w) n$ I' \
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),  R* s; U1 @. R! @1 I
                                                to_str("in der Andockstation: \"",?.~.name,"\""));: p' J; X! A" |# G4 v1 }( O
                                else3 k' g; u$ t! |( t+ g5 F
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; Z$ h8 h6 r7 l6 K
                                                to_str("in docking station: \"",?.~.name,"\""));                               
7 k1 H( W. s2 X+ i+ P+ V1 L                                end;
6 U: q9 S* \" r                        else; x2 x" ]% N+ T2 i3 r% ?* X8 t
                                @.Destination := assignLObj[1,row];2 |9 g0 h1 Y  ^3 p0 E2 |
                        end;                        * S+ k) @  S7 M
                        newDirection(@);
! \6 ?, A, X+ a2 I: g                        @.HasOrder := true;
6 [$ ~  ?- R8 z! ]# }+ |" w& ^                end;" f3 t  z; b; V$ j
        end;. t& q" `- j" Y9 y/ M
end;        -- of the method
; q3 T7 _! m! Y# G! h' [
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
. Q6 c7 [+ ~. h& G0 s
' X9 M4 T* o$ Z3 |/ u) z这是AGV_putin中arrive的method。
2 R# ^; K2 ]4 }& R1 i/ o' z; z
3 P; t. `/ g- u1 ?+ C当到达物料速度越高时,这个报警更多,
% G& N; }9 Z  n" R# V" r6 x可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。: l! g) k: t' m4 w7 x
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
2 M+ n' y; G6 w3 ~3 N7 u; E
8 l5 y# Y* u7 Z1 y$ t! P/ _1 Y; d另外一个小建议,就是move,所有的move都可以这样
0 j4 ?& S) @( n4 [+ }+ ?3 \if not move() then debug end$ a# ^8 D: G2 i$ C) b0 J+ f
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
; y5 [0 F: g; X6 Nplant simulation中的free libraries有AGV模板,
7 x0 d, D& Y1 T7 w) b里面也有案例。
6 F' T+ x6 ]( N. M4 K6 Y1 x我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。3 o8 W% W0 M4 p. b3 e0 x. O
' _" U, ^$ u5 V- K6 k
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
3 S( f  i) n" ~. c; B: P. _, |" u, k+ A) C/ I6 \# q' |
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 - d! I  @* V7 [9 i7 L; v" x( _
这是AGV_putin中arrive的method。6 @2 |" J; u3 \9 y  R% L
# j& T8 n2 `; |, Q
当到达物料速度越高时,这个报警更多,
7 l- K( n! |0 y. m* }* J
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-1 07:53 , Processed in 0.027596 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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