设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 10179|回复: 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/ H) D2 U  d! D: x
*/
/ a& S( N8 J8 Zis. V! z7 {* w  G; _* ~+ {4 `! v
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;( ~; a+ V' m# \8 K! M$ W7 P$ E
do
( Z9 H6 I$ K6 j        Lan := rootfolder.Internal.Tools.AOLlanguage;6 G  d' T; \$ i+ h
        if current = @.Destination -- else return4 L' ]2 T  i; r7 r/ ^
        then6 \9 X: Q* m: e* S( x! p4 J4 g" W+ E
                @.Destination := void;
  o# B; ~1 J) r7 L/ C                if @.occupied then
- f, _* s8 L; r* U5 |; }3 `1 V                        part := @.cont;) b8 N* B: o0 D6 B: X% Z" Y4 ~9 q
                        @.transpOrder := void;8 E# @9 @; G' ^: ~
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 M" F3 B6 b/ Z6 P" c                                @,root.eventcontroller.simTime);
4 S) g! R1 R1 \  s) g( l( @3 d                        @.HasOrder := false;
% P9 t! H7 {& f                        @.DrivingHome := true;
2 \8 G' i5 o/ c                        rgManager.tryToStartTransOrder;1 a7 Z. b& L+ ]0 x# p
                        if @.Destination = void
( K. b' l' B7 v: a+ w                        then -- no transport order for vehicle @; r! p/ X. J9 l) C
                                @.Destination :=
" Z1 q0 ~. i% d. Q  l; s7 ?                                rgManager.nearestFreeStation(@,track.~);
+ d% d3 G5 A" Z: X2 U+ n2 A                                newDirection(@);   
2 |5 N% `* M- _                                if @.Destination /= void then
4 I: b& \6 \0 r                                        @.Destination.NumReservation :=
% c# v) ^! V& O7 j                                        @.Destination.NumReservation + 1;
# [7 H; @" q& t: {1 ?                                end;
6 e' r. t9 V4 a* w                                @.CurrIcon := "drivingHome";3 _/ t: ^  E. r6 B! c' j* g
                                @.DrivingHome := true;0 z* h0 Q& J, g8 m. `1 v) ~
                        end;; u9 p; b. d$ U+ W' F# c$ g
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
( V2 v: g# t8 O* C, Y; h/ J                        part := @.transpOrder;7 ]9 {+ y1 L3 z9 `2 Q7 i3 o7 Z4 n
                        part.move(@);-- load part
* c9 ]$ i0 S# P0 x/ t3 R. I7 L                        @.CurrIcon := "load";, C, A. S. n0 b" ^8 e- [, c
                        GlobalDistObj := part.globDestination;# {6 m0 Y1 X* G  V0 _
                        assignLObj := rgmanager.rgAssignL;) U# j4 j# f; `2 L6 e* {
                        row := assignLObj.getRowNo(GlobalDistObj);, z$ D* V' b9 K! U" D. G( D8 Y
                        if Row = -1 then -- since 70
! v. _* ^& Y  Y) f& r1 _                                if lan=1 then
! Z7 `/ y6 `+ K5 C" [2 T                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 h- g3 H. X" I. S
                                                to_str("in der Andockstation: \"",?.~.name,"\""));4 }1 @* O9 ?$ X2 [
                                else
& A, J. F; J% X+ ~# {5 O                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 @  L8 V& E' f) R
                                                to_str("in docking station: \"",?.~.name,"\""));                                , P  R7 ?& p) d; i# E% Y
                                end;/ F8 S0 W* C7 F
                        else
$ z1 Q3 A& ^- G, b                                @.Destination := assignLObj[1,row];/ \2 s1 a1 ?1 M4 G7 J5 q" V
                        end;                       
' m. E; t9 h( _- W- V1 D                        newDirection(@);
- x* B! L$ C: M/ d) i( D; a7 V                        @.HasOrder := true;" x6 k* z' _5 a5 ]- h
                end;
' q/ B0 G' r  s- A  w; a7 @0 j        end;3 q! F/ h1 g+ C; s0 {
end;        -- of the method
+ V+ j" d% C3 s; c
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
4 ?' t9 M* }9 Y$ P
- X& b- b$ K  ^+ ~: @8 h/ b% O这是AGV_putin中arrive的method。: {- i  O# o8 |; k3 i
# b- R0 ^" q) ]5 ]9 |% B. U0 J
当到达物料速度越高时,这个报警更多,; t9 ]' u* Q0 l$ Z
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
! [& n$ m6 y1 z& z. z程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?6 R6 P- D& E& {! ~* `: _

- g% u3 f" c0 d另外一个小建议,就是move,所有的move都可以这样
( B$ m$ ]% w! L% I6 Nif not move() then debug end$ X- V# J' U0 P) d4 q
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。6 C, q8 m) O/ c
plant simulation中的free libraries有AGV模板,4 x3 s  r& U8 v+ v" U
里面也有案例。3 t* {# M! i6 {4 X4 _! v$ A
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。$ V, P6 `0 Q9 I% c+ |  S4 K

+ U$ e/ C5 n  P. [, ^. U! _3 n0 g) z我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
+ Y# U' T! d  A/ I. o, t" [0 T( Y' |, C, d% r/ k9 {8 X
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 . e' E( ], l% j- v. U9 N
这是AGV_putin中arrive的method。: Y) _0 s. }3 m* j8 Y& d

) C. Z5 Z" w' p& o8 T3 V当到达物料速度越高时,这个报警更多,

/ n7 R7 A( \" W: ~4 O/ g另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-9-18 15:09 , Processed in 0.017355 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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