设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5633|回复: 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 r# d* c2 {6 H% H
*/
3 ^, U+ [, A5 v4 B9 mis1 n! T# A7 B) ~; o) @0 @
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;) ^8 m  v& _7 q; S$ S! V- S
do+ L- j8 ]% K2 `$ C! v
        Lan := rootfolder.Internal.Tools.AOLlanguage;5 B9 i* x7 P. `( ?3 ^: U3 G
        if current = @.Destination -- else return+ m" X! W# p# h
        then" S( X' T' {$ L4 [: Q; O
                @.Destination := void;
# F5 ]+ S$ l* \1 Z! n" j1 d+ ~( y) \( o                if @.occupied then- q- F3 p6 u4 T: {* v  ?' `
                        part := @.cont;
/ \! _: ~2 ^1 ^  O5 m$ N2 X                        @.transpOrder := void;
& g3 F$ U. g0 U' n                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 Y3 b4 j$ D% o2 }" T                                @,root.eventcontroller.simTime);# w1 D$ R7 E/ q) i
                        @.HasOrder := false;5 o$ |2 @' ]+ H7 Y& p6 z( j
                        @.DrivingHome := true;1 R$ n6 O4 f% l' {0 e0 Q
                        rgManager.tryToStartTransOrder;1 s8 V4 m8 h- I- {
                        if @.Destination = void) s2 t( M* B4 x/ s
                        then -- no transport order for vehicle @7 B+ D( P( t: ~9 Z* [2 X5 D7 E
                                @.Destination :=
# A' |# M# r. `! M                                rgManager.nearestFreeStation(@,track.~);% p# b4 S6 @! Q9 V% r
                                newDirection(@);   
' o' J) n% X! }0 f8 x! m                                if @.Destination /= void then( T8 B. Y# E+ E2 i. J3 Y  P. g" Z
                                        @.Destination.NumReservation :=/ U3 E8 \& W: A& Q
                                        @.Destination.NumReservation + 1;1 r. o) ^2 J8 O! p
                                end;
* e- y' ^/ U  \! t  ?                                @.CurrIcon := "drivingHome";
: L$ y$ B- N- G( k! H, r( |                                @.DrivingHome := true;
, @* d6 {* ]( @2 A( r6 S                        end;
0 b( D/ q5 d; }2 s( e                else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 b3 o" z, u# l) i  @& ~
                        part := @.transpOrder;
( \& z0 m2 w5 ]5 n' @, |                        part.move(@);-- load part
' U# b" V# C# C) U                        @.CurrIcon := "load";
6 }/ |  z1 I! Z. c2 l: E- a                        GlobalDistObj := part.globDestination;
" M- U4 b" F& W: u                        assignLObj := rgmanager.rgAssignL;: h4 W! v) H2 f! ?/ V/ |% u
                        row := assignLObj.getRowNo(GlobalDistObj);
+ T& E* e2 {: A; |7 u0 @  J( w                        if Row = -1 then -- since 70  I9 a# _, M6 _4 X! E; H
                                if lan=1 then
' B2 l$ t9 i' o                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* M- m) r7 O* `" I/ p
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
& q& N) {7 X3 n# b5 i' ]/ K% {                                else
* i( j  V  S4 b/ H) z0 y                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# J; i$ G9 Z+ `" [: J
                                                to_str("in docking station: \"",?.~.name,"\""));                               
( |- V4 c) ?% q: `4 k                                end;
5 ?% _! V0 S7 u% o; t& n$ S. U9 B                        else4 M' g; p6 [. \: N0 [
                                @.Destination := assignLObj[1,row];/ N% p$ ]+ j5 @; z
                        end;                        - y6 }# h# v  D' r
                        newDirection(@);7 j. l# a3 J, Q4 |0 s1 t; U! d
                        @.HasOrder := true;
& I' j4 h' z: {2 x! J                end;& @2 b0 f( a0 R2 D9 J/ P- d
        end;, M; B9 c! F0 w5 O* S8 I! ~) ?" n
end;        -- of the method* ~1 l+ w# j0 W
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 & a/ b1 x! B9 _6 Y
, o  u5 g  v" o! B1 k% F' b
这是AGV_putin中arrive的method。
+ r. J1 `- K1 c, n% m. j; b+ R0 I7 F
当到达物料速度越高时,这个报警更多,5 u/ [: \0 v8 C6 O8 }6 t
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
6 p2 b9 N, U  K, T+ T4 ?) L4 S程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
# y( L/ Y3 M; V8 `# T, j5 R* [) ?& t9 A1 y% r- E
另外一个小建议,就是move,所有的move都可以这样
5 r! B/ ^$ Z  a+ _3 oif not move() then debug end
: H! v2 J% J: t" k2 _4 c9 H这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
$ L% p, P* _  r6 n& t$ jplant simulation中的free libraries有AGV模板,
: k2 I! L. D" h里面也有案例。) i) I# _$ b# K2 ^  L
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。1 b: s, S8 Q+ h! f5 U
. J; x6 q9 D8 O, H; u, P7 e0 u
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
  k' ~; u- V- }( a/ |5 l" @9 ~$ z7 @; A
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
" z% F5 t) E" u, l* A( W# D这是AGV_putin中arrive的method。
4 Q& D) F$ G/ Z% v6 H$ r3 ~  H$ |/ {& P
当到达物料速度越高时,这个报警更多,

% ~/ r- s9 x- M另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-12-10 10:16 , Processed in 2.722869 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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