设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6498|回复: 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'/ Q9 Z2 |( B& p) k+ z3 H
*/0 R' D! N$ j$ q9 r9 V3 ]
is; G' c4 a" l4 P7 G
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 X$ _. ~6 p4 @
do& ]# j) S! M8 N- O# P' Y
        Lan := rootfolder.Internal.Tools.AOLlanguage;/ G" c6 t9 Z" M
        if current = @.Destination -- else return
; F4 T: [" {; z! s1 Z( B        then1 g! B+ l9 e8 h" t
                @.Destination := void;) `4 s0 m% v% @. V9 u
                if @.occupied then
. G' C( i8 D: X3 t# T                        part := @.cont;% W* e% ^3 C- ?2 w, T. H
                        @.transpOrder := void;
0 h- s* J+ N  X8 n3 v$ z" Q                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 ~6 d. F9 U: t: ]6 v
                                @,root.eventcontroller.simTime);
# X  J4 q0 v$ Q2 I  \1 h4 D                        @.HasOrder := false;
1 ~. V1 q1 y% ~3 L$ {                        @.DrivingHome := true;
5 H1 A  w3 b$ G$ s- E8 @* D' w3 l                        rgManager.tryToStartTransOrder;8 J2 @: w  Y. w3 }/ m) ]2 w
                        if @.Destination = void
5 d, R8 M: w  T  `2 V8 h$ h                        then -- no transport order for vehicle @  H, b5 j3 }9 k# G
                                @.Destination :=
; Q+ _+ X8 J9 y2 \% @. [                                rgManager.nearestFreeStation(@,track.~);
' o7 F# N0 j, T# h" @: h* M                                newDirection(@);   / N6 P9 x" J0 Q. j. q( l
                                if @.Destination /= void then
- o, F3 P4 @- F& I                                        @.Destination.NumReservation :=
0 X" ]0 @) A2 B8 d: @                                        @.Destination.NumReservation + 1;- [9 V! n2 u7 c, G
                                end;
: [2 e9 O# {5 B  m( c5 u1 {: N                                @.CurrIcon := "drivingHome";: D' e- d" A! y
                                @.DrivingHome := true;8 S3 M8 B& c( k4 Z
                        end;% W8 m$ R" l4 o
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
& q# H3 O2 u* }/ A, W* K; f                        part := @.transpOrder;
4 b  R2 O0 `2 \6 w                        part.move(@);-- load part7 G: N7 q$ ]3 [
                        @.CurrIcon := "load";
: ]+ {6 _& h. U                        GlobalDistObj := part.globDestination;
5 J% Y$ Z/ Y5 R- D                        assignLObj := rgmanager.rgAssignL;6 q7 s* Y( t( Q' d, t
                        row := assignLObj.getRowNo(GlobalDistObj);
9 V5 x( S* U, J( q3 j+ @% n                        if Row = -1 then -- since 70" Y9 ]% [" t; {/ \& B7 }3 f
                                if lan=1 then- D; w; l( G. i- x! r
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# B9 T& u# t2 E# ~* J2 a. m9 ^                                                to_str("in der Andockstation: \"",?.~.name,"\""));$ d& l( E6 o* R) i/ e( L- U; m
                                else" C: x# y" f; d) X/ P
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," w0 R0 G  `, N9 s4 g
                                                to_str("in docking station: \"",?.~.name,"\""));                               
6 n  `! B+ K1 K! ?( [/ z8 Z                                end;% e" b7 F/ O* S& \5 E
                        else* m2 M8 q% l, {% F/ z5 q
                                @.Destination := assignLObj[1,row];
9 [/ s7 o8 N5 e$ W4 Z) b* f                        end;                       
" p4 t! g/ i0 |6 q5 I0 E* k                        newDirection(@);
( G* r. q9 c0 m' [' X' }6 X" q( N0 E                        @.HasOrder := true;/ I3 ]* U! G0 A6 A. ~- L
                end;
) Y5 D4 {& O8 ~7 g% f  A; _        end;" Y7 k* w# H' s  a9 l3 d8 Q
end;        -- of the method; j6 R- A: T6 M- Z. s  o* B
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
/ u! @; s5 p7 q% j, c8 B
& F4 M' Z" B2 J0 R- C: |这是AGV_putin中arrive的method。
6 U. z% q3 @5 c4 I$ d/ n, t# c. q0 h$ |- c) y7 j6 P4 d* A  U$ a
当到达物料速度越高时,这个报警更多,
$ n% q( h) y6 L( L) D可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。5 x! t% l. A0 {* A
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?. D! B; ]% k3 }

6 p- Y- R; m* b7 ]+ p5 x0 [另外一个小建议,就是move,所有的move都可以这样
2 @( |, W& a3 C6 G) q; q0 b" `if not move() then debug end: F0 _) P) p5 F* x
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。9 T$ }( y( [8 N
plant simulation中的free libraries有AGV模板,, t- R) c+ R8 ?1 D
里面也有案例。
6 X3 F0 h# T$ n1 R. P我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。- ~- Y0 p% U% c! U, l
! P0 t2 y/ R8 E- w5 K
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
9 n, Y* r$ j) \, ?4 b" b9 o4 l- N  W1 @& D! a
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
$ i" z- ~1 h+ r" v) }这是AGV_putin中arrive的method。# X: D: b; P/ {5 E: X

6 p1 W5 E% H) V! I; J% _0 d$ y当到达物料速度越高时,这个报警更多,
, f$ }7 {* k# D0 c. y6 n
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-9 21:17 , Processed in 0.021738 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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