设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6139|回复: 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'( f; h) ~6 A+ e6 R! G2 N3 P* b& k" z
*/
) r; O" ^3 q+ e) ^2 ]3 h1 _is
. f# G3 a3 n7 S        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: r; g/ z9 z" F3 L+ X6 H1 Z/ ?) c6 w6 qdo' a2 ^7 G* P& B3 `8 ?: K" v3 T
        Lan := rootfolder.Internal.Tools.AOLlanguage;
8 u6 A" h! c+ R; v2 ?1 j        if current = @.Destination -- else return1 M, M. p2 K; x, c2 i* k9 P! w: e
        then% Z3 Q8 _' G; s5 f, h
                @.Destination := void;3 V& b3 U$ f/ {* n
                if @.occupied then9 W) O8 l+ T& C5 ]
                        part := @.cont;
- E. o+ E$ _2 c5 b: Z2 f1 t. X  P" W4 _                        @.transpOrder := void;4 L2 U5 F% _& C* D  N
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) K1 C, x* L1 ?6 \                                @,root.eventcontroller.simTime);( T" }3 t0 ^9 h, a9 ?
                        @.HasOrder := false;
) B# L6 A  [: ?8 q                        @.DrivingHome := true;
/ R  l" @9 q& X! q                        rgManager.tryToStartTransOrder;% m: E4 O* z$ I5 [) |4 B7 R
                        if @.Destination = void  v- z* U$ U/ q+ h# ]0 f: u
                        then -- no transport order for vehicle @
1 S5 [9 {: j% [' B9 o0 `- e" n                                @.Destination :=- [5 [% K7 m/ C) P
                                rgManager.nearestFreeStation(@,track.~);
" J8 N3 K7 w* c' p4 B+ C: \' J, |                                newDirection(@);   ) J5 v/ ]; D  ]3 M
                                if @.Destination /= void then
( A: e- W! M  b  k: t+ i2 k( ]% O6 [                                        @.Destination.NumReservation :=
; i. Q* c6 V  Z2 e8 F6 m                                        @.Destination.NumReservation + 1;; S; }/ `' B7 I9 L+ s) r
                                end;. y9 H4 B: C6 T5 O6 a& @3 \# ~4 E
                                @.CurrIcon := "drivingHome";
* C: h3 E+ ?1 T6 g; r8 u                                @.DrivingHome := true;& ], O) s$ z" S+ z' Y$ `) f
                        end;
4 Z+ L8 o; c- J! Q. Y% t7 f                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" a' |* E+ k$ m7 C; P. Z                        part := @.transpOrder;5 l' s# C. x5 ?9 r# k0 i
                        part.move(@);-- load part" _6 s& [. z0 G$ G8 Y0 T: @
                        @.CurrIcon := "load";
6 z  V0 @0 N' x. |                        GlobalDistObj := part.globDestination;
3 D4 v4 Q2 j* m" D; j" g2 c                        assignLObj := rgmanager.rgAssignL;
! m# g' Q! @$ Z0 i8 w2 Z0 p1 g$ b                        row := assignLObj.getRowNo(GlobalDistObj);/ y; z% o+ @$ x# A
                        if Row = -1 then -- since 702 t) `7 ~# [  d7 N( e7 i; O$ N
                                if lan=1 then
3 ^( y9 \: P- V+ H6 w% }- Q                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 X3 U3 t$ ?* T9 t* R  U$ ^' t5 ~                                                to_str("in der Andockstation: \"",?.~.name,"\""));  m# x; ~" y! X1 ?8 U
                                else# Y* `9 @& c* o& ~3 b2 j9 w1 K$ `
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! D1 H. O2 A2 o5 k9 j8 z
                                                to_str("in docking station: \"",?.~.name,"\""));                               
8 n$ S) M4 @7 \  J6 l. C8 Z7 g                                end;
* X. [: V# t/ I0 h, \; {                        else9 C' y8 {8 B+ c- q
                                @.Destination := assignLObj[1,row];
" i4 q; u; X8 c+ k+ N# c& ?% o                        end;                        ) t" m" h  d% C! R* Y6 l8 S
                        newDirection(@);
# E5 V* K9 |3 c                        @.HasOrder := true;
0 y; v0 n3 d8 }" s                end;
, q9 L, P( ]: f1 L( d        end;
$ x  P0 r4 i7 y3 g/ Aend;        -- of the method# H3 P! K2 H/ K0 K+ x  M9 |
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
0 d9 ]1 g) s' z9 ~5 k' u# R$ z( ~2 h8 U' E' N! b: X6 Z. D
这是AGV_putin中arrive的method。, |# X2 h# g5 M/ D
0 J/ i# o* \# v" C
当到达物料速度越高时,这个报警更多,, c+ d' d' @0 _8 P0 f3 \
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。+ c  _- B" b+ ^
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
5 Z5 e- g4 s  R3 E5 V/ N' D: `( e$ f1 A: W2 A
另外一个小建议,就是move,所有的move都可以这样
; j+ X. Z( w% B- A# L7 Dif not move() then debug end$ r$ P% c2 w/ L
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
. x! l' T2 U, C% g1 l$ A3 ^2 yplant simulation中的free libraries有AGV模板,6 e% ]" x+ f/ Y8 c
里面也有案例。  y: Y/ ]$ F" W. _+ a# r$ N3 j( C
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。6 D8 D# Z" O5 B' S+ [* f
3 w; k+ @- G0 A2 W7 }1 L6 Y; B. b
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 $ ^( {5 L5 n, x- q7 K" p* u" N+ x

0 y9 Q6 E* J2 U# {8 U5 g* X那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
: B/ g& U4 L- }这是AGV_putin中arrive的method。4 S) g3 U* M/ S* Y7 R: u9 v
. O- B% Q5 Q% c  t+ r2 h1 r/ v! ^8 v
当到达物料速度越高时,这个报警更多,
3 Z4 Z* n, n- M" q. r
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-1-20 23:00 , Processed in 0.025357 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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