设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5463|回复: 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'
8 C' @. u0 ?  g& a4 ^: l; _*/
- m. Z. u, Y# e& c) P9 Wis( i: Q3 o6 _7 ], ]/ U
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; [/ O1 D+ M! c" o0 a- {do) f' L% H& F# w9 G  j6 q& L
        Lan := rootfolder.Internal.Tools.AOLlanguage;9 T+ \" @' W/ i1 R/ r5 X. @
        if current = @.Destination -- else return4 d  _" X: V  O. V/ Y5 J
        then
5 z( c& j& J" Q7 F                @.Destination := void;
+ ^, d; X2 r, e( Z                if @.occupied then
: }; C1 W' g- u( @                        part := @.cont;$ h* }% k/ U5 `% n8 ?  ?/ s
                        @.transpOrder := void;% l$ {, b' w5 }+ u
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
$ T! e) J2 f; ]2 [7 X. P; D* D                                @,root.eventcontroller.simTime);, x2 s9 d. I: M& @. r# i
                        @.HasOrder := false;. o+ |# q! F# y( m/ @1 |, Z
                        @.DrivingHome := true;8 |: A9 W  h" H( D
                        rgManager.tryToStartTransOrder;
- N, Q- k* f) W0 [                        if @.Destination = void
: \7 A& E* F# e1 c! Z; P& C                        then -- no transport order for vehicle @8 A% I2 j5 w8 B5 }
                                @.Destination :=
  u; ^2 l' \2 a  `                                rgManager.nearestFreeStation(@,track.~);
) \4 j  J2 D( }* O: \2 S                                newDirection(@);   3 E% C+ W# q4 F! ?
                                if @.Destination /= void then
, ?1 C' E  c7 ^, c- d8 w                                        @.Destination.NumReservation :=) D" R& ?' l, @8 R
                                        @.Destination.NumReservation + 1;& f1 i3 z9 B# A0 k" N5 \. w
                                end;
( c, e+ l  A7 D                                @.CurrIcon := "drivingHome";9 a7 e8 {' w, X& h# c! A. T# O, X+ ^. J
                                @.DrivingHome := true;
. D( k2 C; W0 A) v                        end;& }0 ~* t$ X6 c
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: e% }3 S0 B& Q* `0 e                        part := @.transpOrder;
9 I4 Y6 Q3 h+ U* A% h1 I                        part.move(@);-- load part# {- W% U7 m8 L5 L$ W
                        @.CurrIcon := "load";
- v5 H& g+ K0 R" V+ T( j8 |/ q                        GlobalDistObj := part.globDestination;7 }6 E$ y5 T9 x2 P6 ]
                        assignLObj := rgmanager.rgAssignL;6 n% r  T  K9 t, E. M
                        row := assignLObj.getRowNo(GlobalDistObj);3 q9 |, R# ^- p" ^$ T6 f% d
                        if Row = -1 then -- since 70
2 d1 v2 x6 i0 F4 L' }                                if lan=1 then
3 W; m8 H, e6 c3 q8 W, J                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 @/ b. R  ?- O! o3 t7 R5 l6 k% }                                                to_str("in der Andockstation: \"",?.~.name,"\""));
5 y' w' U. n. O9 I* G+ ^! P                                else
2 s* D) }# S+ K; C$ C" f                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),( ?9 y  R9 `4 V2 l! m
                                                to_str("in docking station: \"",?.~.name,"\""));                               
7 |7 p: e! M' E* X                                end;4 G5 d2 d# e) }
                        else; Q9 `5 @1 G% g- _6 c
                                @.Destination := assignLObj[1,row];0 D1 X1 u) I. p9 b; R
                        end;                        4 j) n; O5 q/ I' z, W7 K
                        newDirection(@);8 `4 u+ m7 r6 _0 @, R1 h6 |
                        @.HasOrder := true;  c8 y/ c) Z# D7 v) C! x
                end;2 g$ n: I$ }5 O$ v7 D4 p3 `# }8 \
        end;0 Y5 ~! b2 B! T; n) u9 y2 r* W: B
end;        -- of the method
* l! i5 H# J; L/ z$ u% g9 f
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
  t( c% F' |. q9 E" y3 r$ \: G8 l* ], C1 c. ]7 K
这是AGV_putin中arrive的method。
& a& p* V% [+ M) z) r
3 _$ m( w2 v  \$ }; ^6 |6 V当到达物料速度越高时,这个报警更多,6 M( T. @3 `+ |
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。. x$ V" T  U$ c4 Q" h' R/ a
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?, H" a8 n- u+ G. p5 n1 k! Y+ l
# o  R8 M8 k% p7 o1 C# l
另外一个小建议,就是move,所有的move都可以这样$ v7 a: G! b! ^3 ?1 Z% ?
if not move() then debug end
, _/ R5 s; |5 C( l3 R这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
0 }, ]2 C0 d* Cplant simulation中的free libraries有AGV模板,
% i. `- n1 `# ], j1 j里面也有案例。
% w# p' s" ~( ^9 c9 }我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。4 t, E/ ?8 F* f- t  M) P0 _
$ f" g, j/ R$ E6 M( w+ T
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
0 Q% I$ H# L! \# f
) i) Z2 y, E( J0 v( V9 W% u" i那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
" ]+ m& F0 c+ l' X7 o: A+ J" |9 a这是AGV_putin中arrive的method。) k6 a0 Y, N) y1 s! L
/ m! [3 K; `/ Q" O+ \3 t5 D
当到达物料速度越高时,这个报警更多,

- v3 m5 _8 o0 B: j. A另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-11-25 18:19 , Processed in 0.016702 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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