设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6578|回复: 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'3 M9 @! @5 t. R2 a
*/
/ @. d2 V% e1 i9 R6 l' gis; \' q. M- B! Q  p! A- }+ _
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;  z$ B) t6 H( B  o
do3 k' d, E/ h+ ~$ S& \
        Lan := rootfolder.Internal.Tools.AOLlanguage;
3 I# W8 ]* r  X) g        if current = @.Destination -- else return* E& U9 ]" [* V1 D0 R- q
        then
+ t% m5 F( m3 [" U6 `' I# h3 d6 \                @.Destination := void;+ v! t! K, ^8 t6 W! Z
                if @.occupied then! Y" O! o1 W3 L( ^' N4 r6 E/ G4 d
                        part := @.cont;) L2 m# h, |- l
                        @.transpOrder := void;( |$ l/ O  x! x) L8 K$ K
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 r/ C0 \: f7 i9 k# v% M& |                                @,root.eventcontroller.simTime);
4 r1 v' n) y/ _9 z                        @.HasOrder := false;$ w# D. c2 \$ e+ z3 J
                        @.DrivingHome := true;
1 U  ~4 Z8 v0 V9 C- r                        rgManager.tryToStartTransOrder;
6 h% g4 K* H& c; J                        if @.Destination = void/ K/ K% H$ ^% C. R7 i- b
                        then -- no transport order for vehicle @4 s) J! S" L8 u( L# i3 q
                                @.Destination :=
' j5 Q7 R+ r' T: n0 h, [. ~                                rgManager.nearestFreeStation(@,track.~);
4 e+ ~1 v  Y  N1 k6 o% J; O                                newDirection(@);   
3 Z3 p- ]& ~- d0 I2 _                                if @.Destination /= void then( h9 R* r, I1 x. b% _1 b
                                        @.Destination.NumReservation :=" M! l3 O; S- P; h1 T+ \
                                        @.Destination.NumReservation + 1;9 \" h9 V; ~  S3 `; y4 R
                                end;
* E2 \8 K# _1 H, x9 q                                @.CurrIcon := "drivingHome";9 }8 U9 m* Z/ F- r: o' C3 `3 e% n
                                @.DrivingHome := true;
$ y) m5 _7 Y2 |) `( [0 y                        end;& \6 G5 `& i" A! e. c
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station) W# E, S) t* r; K
                        part := @.transpOrder;
6 o0 E7 w2 b. U0 M                        part.move(@);-- load part
; P1 K" p" b8 g) F, X                        @.CurrIcon := "load";' n6 L& M3 n0 g+ {- J
                        GlobalDistObj := part.globDestination;% \$ a* d! h4 q" |' _
                        assignLObj := rgmanager.rgAssignL;
% g; q+ I/ r+ p5 b                        row := assignLObj.getRowNo(GlobalDistObj);6 O# k8 x& J+ Z9 Z0 m1 y; o1 W: t, m
                        if Row = -1 then -- since 708 n8 X0 ^! f# e" G# ~0 @
                                if lan=1 then
. ~1 K! p! u* q- p                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; }, f. S5 M5 l7 I* ~
                                                to_str("in der Andockstation: \"",?.~.name,"\""));6 W; w+ J+ N9 b" u' p+ ~3 X
                                else
; G* N: V: X6 ?9 K$ {                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: @3 _9 X! U, s. W) }8 p! H                                                to_str("in docking station: \"",?.~.name,"\""));                                0 f8 \% l- {+ m0 W8 c3 Y0 }; O- i6 a  [
                                end;7 A% E) Y2 {. Q
                        else/ {7 E8 j* t1 v8 r: b9 Q
                                @.Destination := assignLObj[1,row];
' q: c& P) C) v                        end;                        2 s$ B3 ^- |  u4 d) m/ X
                        newDirection(@);# ?' r/ f: C" f" [( }' f2 g  v
                        @.HasOrder := true;2 k! w- n9 k; N- |
                end;* h3 E8 p# M- W4 |1 ]
        end;
3 z% T7 X7 l; @3 iend;        -- of the method" c0 a; Q! E) k- v, @
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑   Q7 d0 z7 o3 v

( m3 D# n& g1 e( r/ r这是AGV_putin中arrive的method。
# c) ^2 ~# d" B9 i+ E5 s" G- \$ Z0 [3 S! U
当到达物料速度越高时,这个报警更多,' l. T: B$ E2 Y6 t. l. ~
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。/ q4 d0 {4 u$ M& b
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
& {, j. J  J  `& L: f# A; ~: z
1 D& y% m+ I8 M4 M另外一个小建议,就是move,所有的move都可以这样, I% ?$ l* q. T7 x) ^
if not move() then debug end9 I* J! X8 c1 h0 Q7 i, u
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
  _% g2 S' @0 Vplant simulation中的free libraries有AGV模板,( t9 A3 {5 u; a# ^
里面也有案例。- u4 R0 K$ [- p* [) S7 m0 `
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
8 _+ q- V. P( E( r  b, g1 i3 T: E% P0 G8 l1 n# j$ ?
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
6 @+ \7 X! u$ V& G/ I5 X- ^6 z4 B  v8 M* p- N6 Q* p3 t7 p
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
* q4 y; x5 a* }" a) [这是AGV_putin中arrive的method。9 O6 [& X# b2 x- z, u2 m

: G  u7 {8 V* B3 F" O当到达物料速度越高时,这个报警更多,

, n" h$ `* N+ M# x$ C另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-13 23:38 , Processed in 0.017509 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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