设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5916|回复: 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') f0 U" k: m% T% g3 s# z3 e
*/6 m% _8 o, G: X* }  L
is9 Q+ V, J& k5 s3 M) ^- J
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, v# s' q1 T9 N+ C+ A4 o. jdo
6 Q9 K  U  c9 x# }: |7 P3 |        Lan := rootfolder.Internal.Tools.AOLlanguage;
  q, t. q8 a# b% Y+ W  p9 z        if current = @.Destination -- else return* X6 K3 C$ k/ G0 I
        then
. S- T/ g; \! q2 a, u9 V9 B                @.Destination := void;
( E" E; z1 t4 B5 J2 X! g                if @.occupied then
2 l- Y$ L1 \) \8 Y( H+ P. H- k                        part := @.cont;! X7 w4 F- s: Y- z
                        @.transpOrder := void;% B( s. I3 W1 F
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! I6 O$ |7 S! s* J
                                @,root.eventcontroller.simTime);
( f7 O, u8 x6 D2 O# V$ u: L                        @.HasOrder := false;
: o& J4 o1 C$ R+ ^$ D) x* a                        @.DrivingHome := true;
" d9 w( I, l7 ]- k! L: M1 @                        rgManager.tryToStartTransOrder;
3 Z% N; u, z+ {" i& ^6 a                        if @.Destination = void8 M& a% C: t1 _
                        then -- no transport order for vehicle @
" m3 u* s& `+ E. h  k( [: s. x                                @.Destination :=- `( q( T7 g3 g8 G. t+ K$ i1 q. j
                                rgManager.nearestFreeStation(@,track.~);
/ c8 M+ Z( P; l+ [: e- }                                newDirection(@);   
: x( A) W( j6 }8 d                                if @.Destination /= void then
: n# u( J$ G9 g1 O                                        @.Destination.NumReservation :=) I6 A* d+ r8 o/ E. t1 B
                                        @.Destination.NumReservation + 1;; M: @5 M8 \* j. Z2 p
                                end;9 h0 x7 }+ M* @$ e! A" S9 i
                                @.CurrIcon := "drivingHome";
7 z1 C* c) u2 ~) w* L5 d                                @.DrivingHome := true;& o- G+ ~) E" K- |5 E0 |# G
                        end;0 M) C& f: J2 ^
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: Q; V% }* v- {9 j                        part := @.transpOrder;
# @" N% C$ c. u8 }1 {1 F                        part.move(@);-- load part3 W1 i( b6 m4 D! K7 a% P: W2 U
                        @.CurrIcon := "load";& X: L' E3 e. h
                        GlobalDistObj := part.globDestination;0 q% p% c* k$ A0 n  R5 \3 k
                        assignLObj := rgmanager.rgAssignL;  T6 ]' c( r, z% S2 R8 ~
                        row := assignLObj.getRowNo(GlobalDistObj);7 O, L. D0 ~/ U" S! t! Y. l
                        if Row = -1 then -- since 70! D2 X8 F- A/ c# c6 N
                                if lan=1 then
; i4 x* M9 G7 A- W- p: ~- n& u                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# I8 L4 G# ~1 w1 O
                                                to_str("in der Andockstation: \"",?.~.name,"\""));2 C' d3 L& ]  W
                                else. ^' f# g4 K9 n9 Z3 M9 j
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# H6 l8 D$ d; Y. P- ^                                                to_str("in docking station: \"",?.~.name,"\""));                               
  p( V1 A3 a3 W8 N                                end;
4 }6 p8 @# I% k) G5 r4 C                        else" o) [, g# ^; F
                                @.Destination := assignLObj[1,row];4 t4 _% F, Y8 D- I' I# ]
                        end;                       
& h  l4 `7 Y$ Q+ d, _" E( r$ ]! k                        newDirection(@);# _( A: ~( @5 Y% l; @
                        @.HasOrder := true;
3 u" J! T) F, k* `                end;
8 T1 I0 V+ R: m9 g, ~; H$ R! z        end;9 P: V" n" l( L; m( N, ?
end;        -- of the method- K) ?) _6 V# U. d+ h' [- W- u2 k" ?! \
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 # B, F; a* ~$ U  M" g5 l/ }9 P

$ |) Z8 x& {& Y这是AGV_putin中arrive的method。2 }' {- N2 [6 l- J

; o$ L; u5 Q% I# [' L当到达物料速度越高时,这个报警更多,# ]# O6 n) p* d( R) G6 H. f
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
  L% d. G+ G) M" X/ G& x程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?3 ]* ?- J1 ]3 J( H- N
/ p9 O0 \$ @4 K1 V4 m
另外一个小建议,就是move,所有的move都可以这样7 Z  }1 L$ X0 s! n: q6 s7 n! z
if not move() then debug end
' u$ W/ D; E9 D& {这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。* Y0 G) D9 F9 |
plant simulation中的free libraries有AGV模板,
) E' M. O; I+ }5 _7 J里面也有案例。
! N* Y( _1 P  i) ?$ N我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
6 w5 L& C3 R1 @3 r6 w, @& a" P
7 [5 t! T6 |# }3 ^& U) m$ p我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 7 h1 X; B8 r7 b
) c2 s& ^1 ^" t! h# h( I
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
) m! A+ s; }/ ~8 T1 n9 V1 [& u! d这是AGV_putin中arrive的method。5 U5 s6 ~2 x3 `4 t6 [) T& W

1 F8 F0 Y% z9 c9 }( o" l! B/ d当到达物料速度越高时,这个报警更多,

7 a3 B6 N' ?9 f3 O9 p, Z  I/ J# W- p另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-1-1 23:14 , Processed in 0.018479 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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