设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6997|回复: 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'
0 i- y7 O( v- w8 I0 {*/7 \4 F9 O+ h- c& h4 r, R# J5 \
is/ }4 b9 p" C% h& o2 V( P+ \3 }9 i
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" P: r  Y; D, f' G6 m0 L# Qdo
! X5 s! R" H8 ?! e        Lan := rootfolder.Internal.Tools.AOLlanguage;
$ u6 s' w( q! k) V2 {- }        if current = @.Destination -- else return8 O5 B/ L4 N! Y% @1 X/ D
        then
% y* j% X7 u! }: M                @.Destination := void;
  u7 k! |8 }' a8 T- G                if @.occupied then
& [2 Y$ c# r8 U                        part := @.cont;
& V, u4 h# p: K! G! x, Y, _                        @.transpOrder := void;! i2 D% f+ f* X+ b
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' Q8 \% y6 c" o- l# r
                                @,root.eventcontroller.simTime);
4 K1 Q9 r: X& x7 S; s                        @.HasOrder := false;8 J4 _, B& A3 c6 R
                        @.DrivingHome := true;# m3 \; J  r1 b# |2 t, n9 i
                        rgManager.tryToStartTransOrder;
# x" c4 b* N* k" \                        if @.Destination = void3 C( M) r8 f- Q7 c, m
                        then -- no transport order for vehicle @
9 E. G! y+ c+ V' r) i/ L* _' ?                                @.Destination :=
3 }2 V# r6 S/ U, [                                rgManager.nearestFreeStation(@,track.~);
9 {- h6 ]" q* H# }: Y                                newDirection(@);   
1 [* w, C) g- z  H! x                                if @.Destination /= void then
3 S0 N1 ]5 Z& I3 O                                        @.Destination.NumReservation :=
# X: z% U3 ^' j  Y  T                                        @.Destination.NumReservation + 1;  \0 f$ A1 |7 R% ^) M: g( d
                                end;
; i" f8 t2 I1 ^/ m                                @.CurrIcon := "drivingHome";/ ?9 N* q# P" f& j$ [
                                @.DrivingHome := true;
+ ?! c! V; B& h$ z3 @                        end;" M( k# o: o- @% J
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* T3 a* M, x' d' s                        part := @.transpOrder;
9 w. Q3 _4 t1 b7 Q" y, c, I9 X* R                        part.move(@);-- load part) Q( n8 e& o2 c9 z
                        @.CurrIcon := "load";" v7 A$ r* \( `! C* x
                        GlobalDistObj := part.globDestination;' j0 Q' s! \) e0 F6 j0 S
                        assignLObj := rgmanager.rgAssignL;* l" R* Q4 V% i7 ?/ p7 k
                        row := assignLObj.getRowNo(GlobalDistObj);7 W- X, W- w: g3 b
                        if Row = -1 then -- since 700 }: t+ F$ H7 s/ l% w
                                if lan=1 then/ @+ p& u0 c5 j; G: Q
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
. V/ {9 ~- U6 d0 A( X                                                to_str("in der Andockstation: \"",?.~.name,"\""));# J, k  m% g% s, `3 v4 K1 F
                                else
! z# D, L% h5 j' v2 ^4 |2 e                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),6 Q+ k* G" H  M$ i0 j# T  i
                                                to_str("in docking station: \"",?.~.name,"\""));                               
$ Q# K% K4 w- g8 N/ x9 t                                end;/ |/ Q- l1 ~* o0 e0 u% U7 ?9 ?' O  s8 R; F
                        else- P" {. j( B) ]8 W; ]
                                @.Destination := assignLObj[1,row];1 K. z+ O# V, D# _! ]
                        end;                       
3 X, }1 I* |- B3 t* r2 p& t$ Z                        newDirection(@);; H. g4 c6 o4 ~% M
                        @.HasOrder := true;6 l0 h. j5 S  c0 [9 G- B
                end;1 J9 g. V' w# F- q* D5 ~
        end;
5 R  g# i. r. r% ~, V9 d# G/ V% vend;        -- of the method
% y2 c& h% r: x8 A- P
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
$ Y  W) H! h  E' r7 K5 K- i
0 @5 H' E8 [0 a( l  W0 x4 h这是AGV_putin中arrive的method。
& B5 y1 ^! Q. O, u
% [/ o3 X9 p* f6 E3 i" J, f: G当到达物料速度越高时,这个报警更多,
# R4 _+ G  B/ D; I" {' C0 C可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。; @7 D; A# T+ D! a1 ]
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?7 Q, f, y# m1 _

& ^" a8 P1 _: T; y另外一个小建议,就是move,所有的move都可以这样
8 Q3 \/ u4 R+ R; Wif not move() then debug end! _  @( }- G- G+ E( k/ x
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
$ [. l0 ~! {. x: o- Aplant simulation中的free libraries有AGV模板,
# ~; m; L+ T0 G) a( ]' m里面也有案例。( [$ d8 h/ E; z; ~4 ~4 c
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
5 g. U6 w# t8 x+ u: V* \' Y0 R) G/ o$ s6 w( f
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
- M- t) t! Z, z* T8 l
) |! @; d+ j3 s: b) m$ f! k/ a那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
* D5 D' ^# O, Y9 t这是AGV_putin中arrive的method。2 f$ _% w5 k& [" z  F& G

8 \; l' a$ p, g- G2 a; Y当到达物料速度越高时,这个报警更多,
! o) |0 N7 i% @' E6 d+ z) }+ H" A
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-10 07:17 , Processed in 0.023854 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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