设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8557|回复: 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'5 {) I, |8 x7 L9 K. W
*/( t4 Q. w) y0 w  p
is; b! x0 ?! y9 f- y& ~9 c; m
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 t9 b1 B, k# N- u( K# a( N4 b6 \
do" W5 w' |$ e! `8 S6 c
        Lan := rootfolder.Internal.Tools.AOLlanguage;6 F8 G" G% Y0 d/ b+ b& K5 B& t
        if current = @.Destination -- else return
3 d: n) |; q& t. @        then+ w; ]- a& A5 a5 V" [
                @.Destination := void;" @9 E' \" T+ w' j/ c1 h5 J$ M
                if @.occupied then
3 L( j% F8 H# r                        part := @.cont;
* i1 b9 U, N3 W                        @.transpOrder := void;9 P" n' W% Y1 N) E! M
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
4 l8 J6 E8 H. w( D/ Q2 ?                                @,root.eventcontroller.simTime);# v0 K% o$ Q- V, e! j5 h5 k
                        @.HasOrder := false;! I, J* B  r( S) A- Q, M
                        @.DrivingHome := true;* Q" W: w( [' I' B5 N
                        rgManager.tryToStartTransOrder;1 s7 h, F4 C; C6 V$ b  }5 _+ N
                        if @.Destination = void
+ x2 b# X: }  S5 b5 v$ H                        then -- no transport order for vehicle @; `( v0 x- e, P
                                @.Destination :=
# d) ]' W, g* K$ w' Z4 a                                rgManager.nearestFreeStation(@,track.~);
& n8 Y  \% Q) Q8 j; G                                newDirection(@);   
1 {* F- C# P. Y& W! e- @0 G9 s                                if @.Destination /= void then- d! _* R5 a/ l9 _% u, w
                                        @.Destination.NumReservation :=' u8 l( m, V" G. H- [6 I4 K
                                        @.Destination.NumReservation + 1;: ^! U* s0 L1 V- o& o5 r( {
                                end;
6 C. Q0 ]2 z/ O& O: p                                @.CurrIcon := "drivingHome";2 H* V# b' y7 C
                                @.DrivingHome := true;  t* f2 E7 }  l: d: R9 j
                        end;8 s3 c. F+ ~9 t, k; D! m/ ]
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station) u2 W# {9 @* H
                        part := @.transpOrder;
9 n$ [6 G/ w8 A& S1 I                        part.move(@);-- load part" U+ e- m6 _# r0 J( v, j
                        @.CurrIcon := "load";0 ?' x5 d7 S- L
                        GlobalDistObj := part.globDestination;! f2 O. i. P+ N
                        assignLObj := rgmanager.rgAssignL;% F% \9 c; ?( z) L5 J* H
                        row := assignLObj.getRowNo(GlobalDistObj);
# A! s$ y: f  H+ l                        if Row = -1 then -- since 70
$ r* A" J9 O+ U1 ~( Y5 [                                if lan=1 then
7 [2 G, S6 D+ H4 W' ^* V5 l0 g                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* _6 b+ L* W( Y, X  Q
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
, w9 e% w6 [+ B4 h9 l# a, ^: u                                else
8 A; o+ p4 u& v                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),9 X& r; p8 A2 g) T: r1 \- A
                                                to_str("in docking station: \"",?.~.name,"\""));                                1 w2 a+ L& l. G
                                end;# M. D( V: b& W8 e$ @' Q4 |
                        else. A; ]: J( l0 F1 C- D: y
                                @.Destination := assignLObj[1,row];
4 \; n6 |3 \  O! X- q) D" S- E                        end;                        9 F0 W& A9 v/ x6 s
                        newDirection(@);
2 J$ K" x) c# }. a8 |1 P3 k2 b2 {: N; Q                        @.HasOrder := true;, Q, Z; `# s! _$ D1 H* F: S) ]& g
                end;
; G6 O$ C* u; ]        end;
6 `' M2 y5 v, E6 C2 u& nend;        -- of the method7 ~( K# @; i) t
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ( e# U1 N: y( C" s3 r$ {/ I

: h+ \. z2 C7 y7 X5 d这是AGV_putin中arrive的method。
( z. a( {0 O8 y3 P
# Y4 p: z8 ^$ p当到达物料速度越高时,这个报警更多,
; B. \8 W0 E! K9 s) Y6 r0 u可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
$ P+ Z. x7 E& k程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
" ^( M! @8 i6 M& l4 n# w# s1 |+ V0 j5 b, ?
另外一个小建议,就是move,所有的move都可以这样
* F$ }0 I" |+ ?1 Aif not move() then debug end+ W  z& J% I2 u6 X+ G3 ]
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。% F( G/ ~+ K2 g
plant simulation中的free libraries有AGV模板,
# O, m" _6 f; f; j9 ^: c% j1 t里面也有案例。' R8 G' X( Q! x0 p
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。; j# Z; ?  q3 q* `
5 Y4 j$ f% J/ ?" D4 a
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
9 q1 o5 D2 G- ]+ P5 y; ^/ A& x. ~: x$ }0 n4 E+ Y. t+ B
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ' r# j4 H6 T8 I: Y* e, e" j
这是AGV_putin中arrive的method。
; O, G2 i  Q9 p
( {% [1 l) }& G% T7 c当到达物料速度越高时,这个报警更多,

! j6 b) E) k; B, O1 J# ~2 z$ _另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-11 15:00 , Processed in 0.014886 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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