设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9662|回复: 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'
- h1 [9 R9 l1 i$ H' B2 j. ]*/2 T$ A) M7 L1 K, ?, e# ~4 A0 R- q
is
) W# ^# P9 L* ?        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' p: r' {5 z2 P, C( A" v5 wdo
$ w7 J9 g2 }, o) D' G% n* ?( A6 B        Lan := rootfolder.Internal.Tools.AOLlanguage;
' c  b% L2 a& X* l        if current = @.Destination -- else return: J8 r: X" j# u3 k- h5 L
        then6 |  o# ]- A$ F0 o7 m
                @.Destination := void;
% E* k( j8 b6 ]4 |* Y9 r; N                if @.occupied then& M% C/ L$ M+ x9 H' n/ _! [% q
                        part := @.cont;
; T. b, Y; U. y2 f" f+ Q                        @.transpOrder := void;
1 M" F8 B3 x3 p' |5 a' ]                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, d/ J  K0 ?2 A9 O
                                @,root.eventcontroller.simTime);
7 H+ Q, e- @$ ~# K6 o  I8 Q                        @.HasOrder := false;
2 _: E5 I- ^( w/ a0 x9 v                        @.DrivingHome := true;: ]5 e9 P. j# c/ o0 f6 {
                        rgManager.tryToStartTransOrder;
* @  w, O  d2 L  z& D                        if @.Destination = void
' x% p3 z9 k- p& m$ O                        then -- no transport order for vehicle @
! A9 u9 q* Z0 Y/ y* T                                @.Destination :=2 ]$ W$ i3 D7 K6 l6 }; p; ?7 O0 ~
                                rgManager.nearestFreeStation(@,track.~);
; f5 s, [9 |' c9 T# z+ p/ E( J                                newDirection(@);   
4 N3 J/ K' _4 f/ p5 }# m% U                                if @.Destination /= void then
, ^, H% K6 O: R                                        @.Destination.NumReservation :=
8 b2 c0 D! p# N+ q. T/ B) P. B                                        @.Destination.NumReservation + 1;
$ y% \+ K4 t1 P. d8 R/ S, x                                end;' D" m4 i) K& ^* }* j
                                @.CurrIcon := "drivingHome";/ o# E% e* ~* s+ x
                                @.DrivingHome := true;
4 ?9 ~% d9 G& E+ o' v  g                        end;3 i/ r+ s; h# I- m
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 q9 p! E5 k1 i% H; L  [1 {' Z                        part := @.transpOrder;
+ E# t1 ]0 d% G                        part.move(@);-- load part
% Z& ?5 l; u0 a! j                        @.CurrIcon := "load";
) W) P8 k' C- W: A+ X5 K                        GlobalDistObj := part.globDestination;
7 _- k: ~; ]% w& w+ L# ^                        assignLObj := rgmanager.rgAssignL;
2 v; W; Q  n. L; L: d                        row := assignLObj.getRowNo(GlobalDistObj);
( r: h% P& Z( s& b                        if Row = -1 then -- since 709 p) h' j) o/ U7 d5 `
                                if lan=1 then
1 g; H0 k# h0 \+ T  c. o# I                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
' N6 [( w/ K5 c, J' |5 L3 m                                                to_str("in der Andockstation: \"",?.~.name,"\""));
! r# ~( o5 P! H6 K                                else5 W6 p( `9 q9 e5 a  v1 L! @
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 V% |4 K5 x3 D# _; h! P' E                                                to_str("in docking station: \"",?.~.name,"\""));                               
% z2 k1 m( ~+ Y: j. J                                end;
: C- p: E) d+ u                        else0 r3 x! `" X, t+ O: n3 _
                                @.Destination := assignLObj[1,row];% \# ~0 `5 `8 h" t8 P
                        end;                        % X, D  n( l- Z8 K1 x5 }  X
                        newDirection(@);: B6 w3 O3 L$ p  u; O5 z9 q
                        @.HasOrder := true;8 z! s7 m9 A. l) V: E
                end;$ l. S0 j0 j$ Z: s
        end;
) l8 Q2 W, M; |. B: s' S( Qend;        -- of the method
; e' _) ?2 B9 f1 l, I( \" N
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 + j; R3 I' J" ?' D! h

/ S3 H" O/ w1 Q3 k这是AGV_putin中arrive的method。; C& I9 B: O6 ?8 H5 f3 T( U$ w
/ e# F% d* ^3 a8 L
当到达物料速度越高时,这个报警更多,. d4 R2 f9 R  Y" `( F  y/ L6 J
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。+ Z% a: Z0 X! \. O3 I
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
' X' z4 ]- b8 Q7 q
4 ^# X2 z, R2 b9 J/ e: r+ X另外一个小建议,就是move,所有的move都可以这样; ?. s% C' f+ O; T" C
if not move() then debug end
, [9 J( {- K1 p0 U( O" F这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。1 U* m1 g) q1 V! z+ n1 S- l' s
plant simulation中的free libraries有AGV模板,& k0 j' v/ ]& S# `( V( x" Y
里面也有案例。6 ^+ H- z8 N- U4 l  }/ U9 H. D! W
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。$ ?; Z- C! j  `5 ?
+ w  w+ P& U2 R$ J; }7 o  E7 v
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 , H- s7 B: Z1 R/ X
5 s& Y) F: Y6 K1 h7 E
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 $ {  {6 a' S( _, T- V7 H
这是AGV_putin中arrive的method。7 f9 E" A, {. }
1 U! G, `# O/ {3 q
当到达物料速度越高时,这个报警更多,

1 k' n# A- z2 h% i; k) ~另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-15 16:00 , Processed in 0.017077 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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