设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8136|回复: 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'
* L/ v) B' Q5 [& Q. t9 t/ Z: N*/% g; D1 u/ w/ E4 T
is+ ?! c# K/ n8 G
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 W7 u. F$ j, Z" q3 l* Hdo- P2 w4 l( x* q1 {
        Lan := rootfolder.Internal.Tools.AOLlanguage;( I4 {3 J2 U8 ^
        if current = @.Destination -- else return8 H5 N1 b/ B4 A7 [, d$ h
        then* g+ l7 L) l% x/ c
                @.Destination := void;
! ?" J& w! q2 m/ q# x! T' @# `                if @.occupied then
: Z) [: X* c1 m/ L                        part := @.cont;* v: ^& N  ~* M4 r
                        @.transpOrder := void;
7 x2 {7 |6 a' O& m                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. M6 \3 a1 e) P7 s5 o
                                @,root.eventcontroller.simTime);
& h6 x: ]) V# H% U                        @.HasOrder := false;8 G# X. `- J- Z/ X, A  ^# H
                        @.DrivingHome := true;. {; x$ J' |" s+ f) \
                        rgManager.tryToStartTransOrder;
9 W  U6 C0 g( f9 ?                        if @.Destination = void% I9 f3 B0 O0 W# V
                        then -- no transport order for vehicle @0 I& s. b. r. Y
                                @.Destination :=
$ M4 Y* ~! Y5 z* n- d# r, n8 B                                rgManager.nearestFreeStation(@,track.~);, G; Y: _5 P0 c
                                newDirection(@);   
6 w' s- K% m9 \                                if @.Destination /= void then4 Z  M7 k3 f  J' k
                                        @.Destination.NumReservation :=
, A" N3 M" S8 ^2 @                                        @.Destination.NumReservation + 1;3 z* k  o8 {+ \, G" v! C
                                end;
& @: F) l4 E( }( I9 B- s0 j% o$ J                                @.CurrIcon := "drivingHome";, J" d) d2 I7 x2 E) }" q/ k
                                @.DrivingHome := true;, H- n! W+ _8 ?6 w  t
                        end;7 f+ ^. z8 Q9 t: o, D9 B& q
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station% V/ [6 z: e2 f& u5 ]
                        part := @.transpOrder;; N: Y. h& o+ f0 q; z7 ?
                        part.move(@);-- load part  J0 l* Q9 d8 y5 R8 P- W
                        @.CurrIcon := "load";
# d. \0 d( v3 b2 Z; w0 D                        GlobalDistObj := part.globDestination;5 g8 N+ D% X, z3 o# ?# }6 V! ~
                        assignLObj := rgmanager.rgAssignL;0 M+ K% p) {3 Q' y9 n
                        row := assignLObj.getRowNo(GlobalDistObj);
" B4 c6 q: H7 A6 h" e+ v7 j9 z                        if Row = -1 then -- since 700 t8 r7 q  K3 o9 L- c
                                if lan=1 then' }9 m, v" a; [' z1 b3 ?
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( X8 }4 J0 O, E- O+ ]                                                to_str("in der Andockstation: \"",?.~.name,"\""));
- O% j2 T% M+ C2 X( s- q6 ~                                else
9 i# Z' Z, _* ?& S  I0 p  [                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," g, ^( P: |/ n6 ?5 |
                                                to_str("in docking station: \"",?.~.name,"\""));                                2 j" a$ a/ L' W+ k, |
                                end;
* w: z" H% X. M5 r                        else
( N0 M" b$ N- n7 V4 [                                @.Destination := assignLObj[1,row];+ H, k8 @' f* S4 Q! a
                        end;                       
) z! T- n+ c! y1 a5 v1 n. `                        newDirection(@);# ?- H5 O( \- j4 V  j9 X
                        @.HasOrder := true;
+ V5 F8 E$ R- K                end;
4 R, d2 j  L! l# _- x        end;" x$ h/ b7 ?- `# N" U' G( W8 ]0 Q
end;        -- of the method
' T- v) W. E' L6 s$ B/ Z& z! V, U. K% j
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 / E; o( A$ e! T# E( K9 C
' x( `7 b& V7 M- Z& |3 ]
这是AGV_putin中arrive的method。* m! s/ M6 |- X9 \* x

, j( d$ U+ ^' R$ G7 Z2 |# [9 Y2 W+ L当到达物料速度越高时,这个报警更多,( \1 m% w0 e/ @- v8 U, t' X% ?  {% U
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。- C( d8 F' K0 W5 T8 R5 ]
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?: h# c5 @( E5 R( p

$ W& d9 u: U' N; q3 C; s另外一个小建议,就是move,所有的move都可以这样" S& L# J' B' L; v" q& ?
if not move() then debug end# X5 `/ l" I3 `0 E
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
: W# E8 T* X1 x& Q) c' T3 uplant simulation中的free libraries有AGV模板,% h# K# E, V+ _# D
里面也有案例。
& g: e9 p/ ?4 G) l, f+ z2 O我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。4 O1 N' s1 a/ S. F& x

( N2 y  [1 k7 I+ t  ~我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
5 [/ D# q8 T" K# m; F; z$ \3 m
% w! C6 D5 [! U' E3 d那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 6 L6 e4 m) o% [7 \1 f- Y
这是AGV_putin中arrive的method。
* F: @) q+ \8 b2 t1 ~; b, E$ [8 S; K
当到达物料速度越高时,这个报警更多,
: X) ~2 @1 M# ^5 ~5 E
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-16 17:18 , Processed in 0.026383 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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