设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7981|回复: 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'
! q# a9 c4 p9 m3 Y/ }5 ^( i*/
7 {$ W' T9 q3 X: @  o0 X  zis
) W" s# q. L# L        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
* I0 B5 z, F7 P$ Q6 {6 A" E! R+ edo
* [3 [) Z3 O# L! ^( r# p9 D( K        Lan := rootfolder.Internal.Tools.AOLlanguage;
  ^& f' C/ I9 v; U        if current = @.Destination -- else return
7 \6 ^0 C1 J1 a2 o/ q8 y        then- c# T7 S1 c( V; K
                @.Destination := void;
% _. x+ w# Q6 ]0 h. _1 L                if @.occupied then3 `4 E4 @( a6 N+ i6 W) G+ A# E
                        part := @.cont;
+ Y4 k5 A) r5 c! Y; Y                        @.transpOrder := void;( F& f7 E( I* x9 p
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, Q" q- y/ t) @; @( V                                @,root.eventcontroller.simTime);
- [/ T  l5 z  R( P                        @.HasOrder := false;
# T  f& x* ~* m% ?3 ^3 V                        @.DrivingHome := true;
6 M5 }" @! D( T) i. ^6 l8 d, X% d- f                        rgManager.tryToStartTransOrder;
# c1 V4 \9 K/ f$ f# M8 U                        if @.Destination = void
) G  Y# d# z6 H) [$ F  Q. t& Q                        then -- no transport order for vehicle @! {3 U* m; n. s6 w- T7 _
                                @.Destination :=/ e  G7 ?$ N* ?3 G1 ^
                                rgManager.nearestFreeStation(@,track.~);; J1 Q# L) A" f& X
                                newDirection(@);   
; w8 |% Q6 z# c; L% i% ^                                if @.Destination /= void then0 r+ u1 i2 p: M& r
                                        @.Destination.NumReservation :=
" x) o% G( ^8 ]8 \: M) w- m2 d                                        @.Destination.NumReservation + 1;
8 P* w2 M7 B: o' x5 U" _) p                                end;3 W# }$ j% H# ^
                                @.CurrIcon := "drivingHome";0 M* x: G6 F0 |
                                @.DrivingHome := true;4 Q5 |8 E1 P/ L3 h% S5 d1 |
                        end;
0 Z' R! g6 ^5 |" y' `- }- q* q( o                else -- the vehicle @ is empty, both vehicle and part are in the same dock station( J9 g7 U7 q$ D) s# z; u" y
                        part := @.transpOrder;
1 U4 l# j5 b2 b) G3 f                        part.move(@);-- load part! _9 O( ~* |3 a- T' A
                        @.CurrIcon := "load";
! d8 G2 |/ K4 c* r6 E; n                        GlobalDistObj := part.globDestination;" F( I) ^4 S2 {- V0 t1 }
                        assignLObj := rgmanager.rgAssignL;
' p( T3 e( x5 a4 Z                        row := assignLObj.getRowNo(GlobalDistObj);
$ m+ s" C! W  ~0 ]! L                        if Row = -1 then -- since 70! p7 |% o, U, N
                                if lan=1 then
- r) k5 @  q  t: W: K" G                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 L5 u6 i; B4 r5 f4 {$ \
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
. ~/ B5 A, d: X' @0 S/ n                                else
0 ?  H2 F: u6 h5 r, ]- A* @                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" F9 ]7 s* H+ X# F                                                to_str("in docking station: \"",?.~.name,"\""));                                ! r; ^' I+ {/ o" H
                                end;" S: C5 I+ y8 q7 \5 @' C# o' A
                        else* I6 g# o7 h# ]$ l% [& }: H
                                @.Destination := assignLObj[1,row];8 O' U/ f5 T3 g$ R8 S
                        end;                        % E. {& d, V7 H$ Q' t3 j) v
                        newDirection(@);# j, {; I* s. h  u) |* W
                        @.HasOrder := true;
  C0 p) b3 a0 ^# D: M! J                end;. i- u2 ?5 C7 n; Z6 I3 `
        end;
3 `, ]! b$ }8 b  z- [end;        -- of the method
2 z7 ^8 G2 g5 t% g; f5 J9 i: h
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
2 N2 p; D5 @1 X/ ], C4 ^4 M
/ Z/ D" E0 C4 Q& @这是AGV_putin中arrive的method。
% R8 S$ M8 {7 l% u7 f
$ d* |, C3 l6 o$ X; S0 \1 A当到达物料速度越高时,这个报警更多,
+ Q: m8 b- I1 @, `可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。. w1 e( G: I6 s* E4 a) V
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?6 @* r+ ]# h& N' k7 a
) r# X" Z, d3 F, Y0 C9 x: s8 {
另外一个小建议,就是move,所有的move都可以这样. A+ ]) E# y( x, ~, e
if not move() then debug end
% `4 y- o) M$ R这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
1 P* j9 \& p0 v, r# kplant simulation中的free libraries有AGV模板,) Y9 p- z. H7 W/ j# [
里面也有案例。
( [# [+ \4 }( k; L; ?# i  G) q我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
1 f+ ^1 e% Z: r. W+ I) z; Q0 G
0 l  j; ~0 s. b1 S2 X2 `我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
) t! g3 O$ w7 S# M6 `( w5 w( L' ~+ z& X9 ^5 C2 k$ O- \$ W
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
" Y. X- Y2 C1 g, d: q这是AGV_putin中arrive的method。$ w$ F5 j9 p- I, ]; E

! x7 q! L' Y& d5 y0 _+ ?3 J; b! h当到达物料速度越高时,这个报警更多,
9 A5 ~8 N! O" k4 \$ L
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-8 23:39 , Processed in 0.026543 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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