设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5879|回复: 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'( T! q, {$ t' l5 |+ F0 a
*/' L9 q- T# f7 B5 u3 l; k$ k8 h
is
* f# {, o6 t) }        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' N4 I1 l. t* \5 t3 A. s6 Sdo
$ b+ q, U0 b, E$ T( u0 u        Lan := rootfolder.Internal.Tools.AOLlanguage;
; ~- E5 r* E4 z! W& F: x  t        if current = @.Destination -- else return
7 L% E, n+ S2 \; y/ X        then. ]* A5 X0 X" e5 J) w4 b
                @.Destination := void;
2 b# h7 R5 A% B/ W& r                if @.occupied then' [7 z$ j6 R* ]9 K+ y- D. q% b2 X
                        part := @.cont;
' l: R% `# a% L5 U1 X                        @.transpOrder := void;
' y; t% {- }7 X6 Q/ ]5 x                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; G1 b) W  Z' a& N+ Y                                @,root.eventcontroller.simTime);& I2 J# A. p4 s
                        @.HasOrder := false;5 k  Q6 i) I0 K4 l6 b9 i9 k
                        @.DrivingHome := true;/ M# K" m1 S3 Y4 G3 @. F; Y9 J1 U1 z$ O
                        rgManager.tryToStartTransOrder;
: ]/ l$ f, p2 Y" C& D3 S6 |# U                        if @.Destination = void
/ {* b# x; P# P4 A                        then -- no transport order for vehicle @
6 l: o4 Q* r) M                                @.Destination :=- d. y5 q1 c# v3 t1 m
                                rgManager.nearestFreeStation(@,track.~);7 _7 S% p/ r4 S0 x; r% V* |
                                newDirection(@);   
3 @. v9 o$ |2 U8 v% ^& I! P' R                                if @.Destination /= void then
3 _2 X/ D* ?& }- p- \# Z                                        @.Destination.NumReservation :=( x! v9 y- W- t' V' i
                                        @.Destination.NumReservation + 1;8 T: U3 H: y9 E$ z! ]2 f( Q
                                end;' r! y  @. J$ o7 l8 j
                                @.CurrIcon := "drivingHome";
1 {) a, _' Y9 V$ M9 ^( W/ ]1 ~4 g                                @.DrivingHome := true;: b: J& _/ k$ g' w( L- F
                        end;( j$ L8 R' s& o3 e  E
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station- ^. I. K, F" [6 T; d
                        part := @.transpOrder;
, o& w7 ^% A$ Z8 b# W0 o' h; Q                        part.move(@);-- load part: K( |, V5 A1 `& N% ~
                        @.CurrIcon := "load";4 b& B) |# m! A6 O7 E+ t0 ?4 i
                        GlobalDistObj := part.globDestination;* A0 z" q+ t' I/ g2 c% O' j
                        assignLObj := rgmanager.rgAssignL;/ f% e6 u/ F/ E: i
                        row := assignLObj.getRowNo(GlobalDistObj);
6 j* T; {- `. K/ v                        if Row = -1 then -- since 70
+ U5 e0 x* t2 i0 h                                if lan=1 then
# d  ^6 T& |) ?* ]: o. k1 e                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' @0 T; Z6 y, f6 S6 i( L+ c
                                                to_str("in der Andockstation: \"",?.~.name,"\""));. p5 \. u/ U* l1 ~6 t0 \0 o
                                else
. i: U& o+ z( T( w: U1 ]0 M                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 d& ?& S# U' D; z) k+ L+ R
                                                to_str("in docking station: \"",?.~.name,"\""));                               
8 x' Z2 D  k- x- i& Q. q; W                                end;
& [& Z/ S$ o8 F3 [- ~                        else! X3 C2 O" Q: @( H% N6 F
                                @.Destination := assignLObj[1,row];
. W& n( X4 {* v" N  X* L0 v7 Z  `                        end;                       
( L# \1 w0 e5 r                        newDirection(@);8 n. u* f$ e3 D. ~" x1 A
                        @.HasOrder := true;/ X; I, A0 P! U
                end;, s! f* h. H: |7 R+ w3 w) v  j
        end;: m! n* H& E- Z0 h( \2 S3 Z* T
end;        -- of the method; o) ]( s# p$ {* @5 I* w
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
( X9 ?& F( Z& P- ?# a4 L) j% O+ N6 P. \9 X' P2 g
这是AGV_putin中arrive的method。7 F; Y7 j% C0 x! D& {  T

- e( E  `0 P' A当到达物料速度越高时,这个报警更多,# p# V: K% a9 X0 y
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。8 }: h' ^9 L5 @/ W
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?6 F) {$ i9 ^) _) F3 g( h, A
# B  R, }' ]6 L, v+ ?6 C
另外一个小建议,就是move,所有的move都可以这样' e8 q9 d2 `  o
if not move() then debug end
0 Y) }( B9 _6 t4 C0 m这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
6 x* s8 L2 G8 m4 @5 t1 iplant simulation中的free libraries有AGV模板,7 Q2 _5 v( \/ ]% N- [
里面也有案例。
9 e) P- |* x( \8 k, h5 ~我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
( w; q0 B7 [" ?" l) F; h
$ r! I9 v4 s# r  z7 C  ^8 ?! s5 S我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
9 Z5 j2 f& Y& X' c  ]! f) E! [; T7 h7 L. ]0 A! |- V; z9 D
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
: \" ]! E1 a1 \+ W4 Z这是AGV_putin中arrive的method。% q! D- ]/ m8 O3 G6 w! P6 A3 |) @% l
" L. ?& }& Q( ^$ b" k8 V, E$ _7 _
当到达物料速度越高时,这个报警更多,

4 G( C1 f2 u' X另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-12-29 07:43 , Processed in 0.022500 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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