设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6268|回复: 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'$ e4 U9 d* u! b! L7 ~5 E$ D& S" M
*/
0 x, B; ?$ b2 ^. _is' b( h' M" X+ \# u
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; C+ B* ~( O) v( r) W+ p3 Z/ ydo/ h0 J  H: Q" p/ V0 @/ S7 F
        Lan := rootfolder.Internal.Tools.AOLlanguage;
7 O# ^- ^6 P2 V/ U& y        if current = @.Destination -- else return7 D$ S4 z! r- G
        then
$ Q) s8 X5 n% ~& @( S# D                @.Destination := void;! l( Y3 E. g7 i
                if @.occupied then* V) Y- }6 J; |1 C
                        part := @.cont;$ Y5 w6 {) s- [% M9 O9 o
                        @.transpOrder := void;, ?5 t, d3 d) E* N: H- m4 o3 R
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ v5 H9 K! j0 @' [
                                @,root.eventcontroller.simTime);
6 I8 v, q1 _  h1 ~% f                        @.HasOrder := false;
0 ~# I# g! b+ T- Z, S                        @.DrivingHome := true;6 A; e% k7 B, n- P' V6 t7 e/ X$ B
                        rgManager.tryToStartTransOrder;' q; u" w2 o- t1 e
                        if @.Destination = void
9 V1 j# P) Y" i* u* K: H2 e+ H% a                        then -- no transport order for vehicle @3 v4 k' C  x0 u. w/ {, x( R
                                @.Destination :=7 y: ?0 M9 q) l1 U- B2 n
                                rgManager.nearestFreeStation(@,track.~);8 e% s3 g! [: o+ t
                                newDirection(@);   & C3 h# c3 @, c- |
                                if @.Destination /= void then: a/ h9 s' s9 y% @! e/ u8 M! N1 j
                                        @.Destination.NumReservation :=7 f. P  M* I) Q2 \  T
                                        @.Destination.NumReservation + 1;
3 M, `$ S* ?: R" Z3 D) n# `- d                                end;
% d7 q3 m- i( m                                @.CurrIcon := "drivingHome";% J' E+ L! w  I: n9 K% s
                                @.DrivingHome := true;% C8 \; }* x; X" X/ V& J: l; a& o
                        end;
7 _) Z( Y$ J& [" a/ ]                else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ c% F6 ]" S3 V/ O: L
                        part := @.transpOrder;
* M+ J' P# Y, ~                        part.move(@);-- load part4 _( y$ W2 ]: G* R8 Z3 e
                        @.CurrIcon := "load";
8 c  H. q% K% r9 v, {                        GlobalDistObj := part.globDestination;
/ R) k4 V3 k( o! r' W& ?                        assignLObj := rgmanager.rgAssignL;
' H9 N1 j% i2 d) d* G, R$ P, m& l                        row := assignLObj.getRowNo(GlobalDistObj);4 w5 d1 Q9 y' J8 Z: ~
                        if Row = -1 then -- since 70. \8 t) T) x$ `! i, J/ ]
                                if lan=1 then4 m+ {/ `8 w1 D! g  S9 I  n
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; a4 D* h( R) C# _% d% m# L                                                to_str("in der Andockstation: \"",?.~.name,"\""));1 y8 O# w' A' n: i0 G
                                else4 W* P/ Q2 d6 E+ I, G3 h
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ W- y  Q  x$ M3 \, X; {, [
                                                to_str("in docking station: \"",?.~.name,"\""));                                5 [4 N2 i, O$ I. c4 L! c- s
                                end;2 {3 L! O- x3 @( L9 Y% q# k
                        else
+ P, b5 ?& Z# G" P7 G, V                                @.Destination := assignLObj[1,row];# E& L9 f  _/ @/ C
                        end;                        ; C! {; Z, V$ ], t
                        newDirection(@);
8 ~3 v- S! l+ a" C- Q( w                        @.HasOrder := true;8 X7 s6 H" @( }6 [( J  L
                end;, {7 \0 {* i' X3 b0 [: }9 r* z0 x1 r
        end;
3 r7 L$ d+ s7 j* z. e$ X; f; ?end;        -- of the method; ]6 P# w7 F# o7 v+ {+ r
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ( v3 R/ k2 Q# ]' g: j6 |% f
. q; Q" J9 X& C) p3 |
这是AGV_putin中arrive的method。
3 a; N6 }# c: I' J8 r
8 d4 o( {9 y1 D* M( E" P: k当到达物料速度越高时,这个报警更多,
6 q" C7 B& {" v8 Y  S  t可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。; ]  b, p2 ^) `, b' m
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
$ ~- T/ W- Y( S4 p1 R6 y- j  H( j0 K
另外一个小建议,就是move,所有的move都可以这样: L9 h6 z5 O8 M# N/ S' d
if not move() then debug end  |% O, ^( s; A% l
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。7 d) Q/ B, Q$ T& O+ ^4 R& W) C
plant simulation中的free libraries有AGV模板,+ y, A# {. L; S! L4 p) `
里面也有案例。$ ]+ U& ~2 O& _* m, s( h! K: p
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。) A. T( ?: n; f8 H" e& N* l

2 Y* |6 ?% V  m% c' Q  x我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 + h% J# e8 G* Q. [( m% I; {; r

# Y$ Y& K* v" R  b2 A$ Y那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
1 v, f4 D- `& ]' L这是AGV_putin中arrive的method。6 P/ O; K- ]9 U- Y
4 c" l' d, R) j9 L
当到达物料速度越高时,这个报警更多,

) ]9 b3 f# E3 O5 U另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-1-28 00:15 , Processed in 0.039746 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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