设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6955|回复: 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'4 Q" X( E& p" ~+ N0 R2 h
*/+ o, I. @! J( Z+ k
is5 k2 t" m! u& j8 {2 Q
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ G- E% B; t6 `$ edo
1 e6 `2 X. q9 }1 z1 U  p        Lan := rootfolder.Internal.Tools.AOLlanguage;$ j6 O6 d4 U6 w; i2 y
        if current = @.Destination -- else return8 Q+ v7 R$ h% H; B1 o
        then
! ?" j6 N$ F" s. p0 e1 _                @.Destination := void;. q* U0 ~! c4 O4 ?0 C/ P- j" x: T  t
                if @.occupied then( O( F# W& U% K  y* i
                        part := @.cont;) d( Z8 l$ I" X8 q
                        @.transpOrder := void;8 Q5 j$ U3 K2 N# H" R
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
4 |( @) C! A( z$ k  }                                @,root.eventcontroller.simTime);
7 D# u+ m* `/ _6 a; G" Z* n4 {3 y4 U                        @.HasOrder := false;5 n! p9 K/ i/ t6 L/ d
                        @.DrivingHome := true;* }1 f4 t; F# B3 D7 w& P6 l$ j0 H
                        rgManager.tryToStartTransOrder;6 w! H1 u* ?7 y4 V9 E5 I" x9 a0 I
                        if @.Destination = void6 n2 @8 p! J& Y: i9 B3 U
                        then -- no transport order for vehicle @
. M: B2 Y% |$ n$ r  U# v9 ^+ J                                @.Destination :=8 v$ O9 b' E' K
                                rgManager.nearestFreeStation(@,track.~);
( p+ O- {% f8 Y3 t: m, c) |% T6 [                                newDirection(@);   
3 F& r5 y0 |) L, t% K' {' J2 _! m                                if @.Destination /= void then  e# l2 W( O. m) H" x1 i
                                        @.Destination.NumReservation :=
# P9 ?, U% w+ N" ^                                        @.Destination.NumReservation + 1;
6 q' q+ L9 \* |/ G1 R7 T" [: D6 Q                                end;
# a6 q* _0 r+ O0 v# _                                @.CurrIcon := "drivingHome";7 P% n$ a% a0 n+ E6 H+ R5 ?
                                @.DrivingHome := true;6 M% r# k4 ~* d4 a
                        end;
4 a( z5 O, `* x8 x; ^6 G) I                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
3 x) T3 @: P( k' W; e8 l$ C+ x1 N                        part := @.transpOrder;! F1 d( I- V$ |' g4 m2 _: ?+ x
                        part.move(@);-- load part
/ ~% Y: x& h4 C5 c* f+ w                        @.CurrIcon := "load";: h/ B+ w2 s) S4 ~: V+ n
                        GlobalDistObj := part.globDestination;$ s( V  t2 x" m
                        assignLObj := rgmanager.rgAssignL;
0 o' _' C' }3 y7 g8 X- o2 n, h                        row := assignLObj.getRowNo(GlobalDistObj);
8 s+ X6 K. `2 m2 Y) g                        if Row = -1 then -- since 701 P; l: q- X8 m9 n5 k# D4 t
                                if lan=1 then0 r1 O$ _, k9 Y7 V' o9 @7 i" X  h
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
3 d/ f/ @. h: y. d9 }, r" |                                                to_str("in der Andockstation: \"",?.~.name,"\""));+ Z& a% G! W5 V' ]* d) B1 E( i7 ^) a
                                else
" a. J) O6 T$ B7 S# \                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 D  p" X6 Q; F7 H/ T
                                                to_str("in docking station: \"",?.~.name,"\""));                               
% v+ z6 @( m7 M' j                                end;1 a9 _0 p) `, N# B* |
                        else
( w3 k1 D  y( v3 G! d                                @.Destination := assignLObj[1,row];
6 E- r3 f) y  ^! w                        end;                       
, `4 p! i) h: x0 b- K. b: J                        newDirection(@);
2 _$ \/ J9 Y: }" y0 V8 e1 K% N8 l1 u, `" q                        @.HasOrder := true;
  _# l5 ~% e8 g$ s' w( q  P                end;( T1 t- {- ^; d9 B" w) c) e
        end;' ]2 c+ V7 O7 u8 |
end;        -- of the method
, b0 |; E, W& Q4 F3 G
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 2 v' U/ L2 [5 B1 i6 j

2 u; \+ v7 T3 U) ]这是AGV_putin中arrive的method。+ P* U0 c) g/ z

& ~5 n7 U' W0 M当到达物料速度越高时,这个报警更多,
- L$ c2 u. C, o/ h+ e* K' ~6 c% U可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
, x7 S  e/ q% r% z3 f# I程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
1 ?; }. @3 K4 `7 z, u' R  e, V% I" h
0 |6 m% |- x* Y( N9 o$ v另外一个小建议,就是move,所有的move都可以这样3 E1 x3 V, Y: F; h8 L2 [
if not move() then debug end
8 V4 c( V6 X. A( \, J这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
2 s  q* ], r* `( D5 Pplant simulation中的free libraries有AGV模板,
' y5 t2 j. U$ ?9 q. V: C. o8 B$ [里面也有案例。5 ~# c( _7 a; u7 w
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
" V3 _4 u& ^/ f
8 Z7 x" S8 H, i* b* z. E( W我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
9 `1 {8 L* y0 i, {
  o8 j, Z2 @0 d7 `, J那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 0 I  g6 I8 b3 f+ u' j
这是AGV_putin中arrive的method。
7 w- e- i4 R9 M/ i% k7 w
( d; @9 b7 T- S; w: A当到达物料速度越高时,这个报警更多,

; _) p; K. @4 D* u6 k另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-8 02:56 , Processed in 0.021401 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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