设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7166|回复: 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 ]4 h( ^- U; T) ^/ p1 z*/2 J/ p; A' t2 e2 ]; P7 i
is' |. g3 g' O. u& ~
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;( b* f; h7 C" b3 F# Y2 y$ Y3 P
do
$ M9 F- N9 t: E3 i$ F5 R. z        Lan := rootfolder.Internal.Tools.AOLlanguage;! A; [+ b8 T) P6 w: d: }' t6 T# k
        if current = @.Destination -- else return
+ s5 o, B& z6 t# A3 a        then" Z1 V* y+ s2 q2 _( y2 u! e/ B! J$ ^  W
                @.Destination := void;
8 I" T! t3 |5 i                if @.occupied then7 ?. ?9 z( z# R- d
                        part := @.cont;
0 G4 K' T, Z" q! B                        @.transpOrder := void;# ~/ E8 z4 q) l# N% u5 w" @; f
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 H' N% i( g# }$ Z! a( {2 E, }1 L
                                @,root.eventcontroller.simTime);: f/ }2 L8 E8 c  }+ P9 R
                        @.HasOrder := false;
. T/ k. y1 u$ ?) m2 u                        @.DrivingHome := true;
" Q' \8 b! k( Y. B                        rgManager.tryToStartTransOrder;% P' t6 p' q% w2 L- r
                        if @.Destination = void7 e8 d; B. H. Z6 n6 E" w$ r' ~
                        then -- no transport order for vehicle @
) A1 l. ?% \* Q                                @.Destination :=
/ e. B1 z* k  \% Z                                rgManager.nearestFreeStation(@,track.~);
8 Q' x, N, o$ `2 B1 y8 h+ j                                newDirection(@);   $ ?/ a$ k3 D' y8 m
                                if @.Destination /= void then, m$ i7 z( S9 [9 B' b6 s2 h" o
                                        @.Destination.NumReservation :=- B+ w- g4 p& y! }
                                        @.Destination.NumReservation + 1;+ D; l( B: U$ G6 u$ e2 {6 }
                                end;
+ f; ]# o% h& c- G  v* o' W                                @.CurrIcon := "drivingHome";, B. d9 P' w! D; u( p: @
                                @.DrivingHome := true;
: V5 \! T# T: g$ m8 N7 f% D' G                        end;6 M; e. M8 w+ \' y1 V
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station+ ]4 |0 H8 t# U3 x
                        part := @.transpOrder;
8 S; W, P9 ?( }                        part.move(@);-- load part! ]1 H8 p5 U3 @8 ?
                        @.CurrIcon := "load";
/ T# R& L2 P  d7 X* J& {. y+ A( S                        GlobalDistObj := part.globDestination;
. y3 ?7 @" K1 {5 R; e& [, _; t* l                        assignLObj := rgmanager.rgAssignL;
  b1 k9 q9 ~) l2 m1 w                        row := assignLObj.getRowNo(GlobalDistObj);
0 {( P2 b; t) |% }( L4 b                        if Row = -1 then -- since 703 a; j& ^1 e& I% W  v% ~0 _, r
                                if lan=1 then( }; w3 a, d% C
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( y/ e3 x& c% ?5 f2 L+ X
                                                to_str("in der Andockstation: \"",?.~.name,"\""));; H: [4 L+ W4 a9 }5 ]
                                else
) H9 q# H, z  z% _" K, M6 M                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) f0 D$ P  V$ z; H8 E
                                                to_str("in docking station: \"",?.~.name,"\""));                               
4 R% q8 a! a4 y4 ]/ c                                end;. V) I- U+ M! |
                        else+ t# [( z4 _7 }7 d
                                @.Destination := assignLObj[1,row];
# h$ b* n, w9 j& Q4 M' B3 R                        end;                       
8 x% h' c9 `) S# k" c                        newDirection(@);
5 |- d$ G4 w+ e$ W0 q                        @.HasOrder := true;% b$ y' u  r  s6 j8 J
                end;
* q) ?& f0 O5 S, _, Y        end;
6 {% y4 b8 ?% v# g) _end;        -- of the method
3 d& S7 t; ?- p9 v+ L/ V0 p% E
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 - j/ u" T, {* y' {* o: ]: b7 A& D
3 c" V1 L* I/ @+ a5 q! t1 l
这是AGV_putin中arrive的method。( h9 O8 c9 l$ T% m9 g
# n% y" U+ E" V, I2 B" W0 c9 n
当到达物料速度越高时,这个报警更多,
5 L4 p& P0 {, e' |: Y3 x可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。2 \$ r2 [' v5 N/ G' K7 j6 `0 o# U* d, z
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
- t8 ]: q- c5 D5 x6 ~% q4 Q9 z9 U" s8 ^/ Q; m
另外一个小建议,就是move,所有的move都可以这样
/ l/ C* a9 D5 ]9 j; ~' rif not move() then debug end! [! a+ i% ~1 x) o
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。) h/ B; H8 i- J- [0 L' d
plant simulation中的free libraries有AGV模板,
7 v! Q; p/ Q! C8 Z8 Y  y里面也有案例。
; P5 \- }2 n" i2 @" j- v1 G* z6 F我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。/ R" W6 u) [( m& `  k0 t

" E" E6 Y% F6 l) Z6 J6 c& ]# [我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
, T# m+ R" a/ Z7 b$ S/ _0 d* d3 e' S) c; e& [  a7 j
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
  o9 ]* w& {7 ]3 P. \6 T这是AGV_putin中arrive的method。
& S( R# O8 o  R8 J7 E* ]
* i1 H% r& ]" A9 B1 L2 v* \当到达物料速度越高时,这个报警更多,
5 E1 b. s& I9 z  [- t" W7 N
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-23 18:30 , Processed in 0.015338 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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