设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8311|回复: 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', |  Z3 G! ?; G# x/ e* Q2 h, H- @
*/& x5 J0 p) c9 C/ o
is0 \% f$ w" N0 D/ K- S  H3 g% I
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
6 [6 l; {& H: a- W4 o2 @6 Xdo
# |: \4 g( n# ^4 n8 w  x        Lan := rootfolder.Internal.Tools.AOLlanguage;
+ D* y1 x* t" g" R! a: e        if current = @.Destination -- else return2 q- p+ E! _' Y$ U+ m
        then
1 h( j, ?+ y# ^                @.Destination := void;  h# d' S' {( e! t" F0 @4 y
                if @.occupied then" A4 V2 c/ J, ?: x% |
                        part := @.cont;
* X9 }  M( g# R$ c# |5 p1 n" K                        @.transpOrder := void;
; B8 L& [' I5 G2 ~' V' a9 z                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# p1 y5 c- U# y
                                @,root.eventcontroller.simTime);
3 e, h. Z5 q! o; B# j( n                        @.HasOrder := false;
7 I% s# j% i+ q% U, a                        @.DrivingHome := true;8 t* [: c; I$ N, R
                        rgManager.tryToStartTransOrder;
- c2 D/ B( N9 Z/ H- Y% Q7 w) b                        if @.Destination = void
  N+ c/ D1 ^3 A7 @" E# i5 [                        then -- no transport order for vehicle @! \- q; R6 b: A; A. D% C
                                @.Destination :=
( w' G0 N# c- p4 E* b# y, w3 u3 t                                rgManager.nearestFreeStation(@,track.~);$ H/ q+ L# C, m8 L9 l; k* k0 z
                                newDirection(@);   0 z5 c' a6 K, l% w% I0 B
                                if @.Destination /= void then4 O1 Y2 T: \9 n3 ?( P8 s
                                        @.Destination.NumReservation :=
/ y! p3 ~5 Z' N3 W9 E' C                                        @.Destination.NumReservation + 1;' r+ `+ l  a- T) @! Q* q# J
                                end;
$ [8 T4 c, j0 j                                @.CurrIcon := "drivingHome";0 K& b/ n$ ?5 k( O) k1 [- e8 j
                                @.DrivingHome := true;
; Z. C( Q4 T, b5 s% D* f5 ~9 ^% f+ ?                        end;
1 y1 m! w4 ]$ U$ m8 n6 v# J% m                else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 u6 y! |0 Z5 X# }
                        part := @.transpOrder;) d* K" d! S4 E- M- E. S
                        part.move(@);-- load part
9 o. D, q# [7 g/ c- e! P2 R0 o6 X2 b" F& z                        @.CurrIcon := "load";
3 g+ C( R" N: L& f* \; o' h                        GlobalDistObj := part.globDestination;
$ A! H2 {4 Z, m; T/ x3 p  v                        assignLObj := rgmanager.rgAssignL;
2 E4 L2 ?3 S' m5 n) d, v                        row := assignLObj.getRowNo(GlobalDistObj);
8 c! ^7 q. C$ K- j" x3 i3 N                        if Row = -1 then -- since 70! T2 E: V8 W, y
                                if lan=1 then6 I; o. L& r0 h. `  S) j+ S
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# K9 |) ], x9 L, s8 E7 ]9 u3 O9 j                                                to_str("in der Andockstation: \"",?.~.name,"\""));) \# r# q. k7 @
                                else7 H7 J& Y+ |0 E$ V; P# b
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 H8 s. L: x8 h1 W                                                to_str("in docking station: \"",?.~.name,"\""));                               
0 k- s5 W# X' u- @                                end;' Z7 ~! V. a5 G! L3 d1 a
                        else
* T: u2 v% `/ P                                @.Destination := assignLObj[1,row];: E/ P& e- E3 D/ S8 H9 `' W+ z
                        end;                        % j7 U- D" n* _7 ~' q% k1 d4 K
                        newDirection(@);
3 r4 a, G3 G' ^. v" @* q                        @.HasOrder := true;. q0 Y2 B8 {- c2 G- G! g! X& `
                end;, D' z  \& o( s( m- c/ Q$ p& M! P
        end;
( Q4 K3 U4 B. d5 pend;        -- of the method! p5 H8 T( ^- H8 ]/ ~7 j- W: k
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 # f! s: `/ Q  z

/ l& |9 y2 a" [! `这是AGV_putin中arrive的method。
' A$ D: u! e) ~5 w+ B  ~* r: W! o; S1 ^3 E
当到达物料速度越高时,这个报警更多,6 d: n, u- L& e4 [- {. t
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。: ]) v$ u1 f! a1 K9 `2 |! `3 S  Z
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
$ `" W* Z; `4 Y& r4 ], Y/ ]" T3 {
4 ^  k* C% r. n5 `& `另外一个小建议,就是move,所有的move都可以这样" W3 h; ]- B: ]
if not move() then debug end9 a4 d, |/ ^6 }+ V; y
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。5 q0 g3 C& `( M8 E
plant simulation中的free libraries有AGV模板,0 i2 ~/ d  ~( V: B. @: u8 p
里面也有案例。
# g( I0 w2 F+ r2 A) c0 h我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。+ k( ?& c$ ]$ y& m2 \

8 ^- v1 h0 |( U! {% E我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
  k; E( z3 T! ~1 k8 S! x
0 y* L6 j/ f3 I那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
& B  `8 }  _+ b5 j0 o/ T2 P8 L2 s这是AGV_putin中arrive的method。
7 Z) U! M) U* z: h, \$ H. p
, @! J1 V/ K" t4 V9 m8 D当到达物料速度越高时,这个报警更多,
; F: U' R: T2 k* _
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-27 01:42 , Processed in 0.018688 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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