设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8921|回复: 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'
$ Z' u2 s( Q( p/ v" }1 q*/
1 g* I7 X# V, |is. S; B* r1 j; I6 t9 A
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 F; h( Y" `' Y+ @( _7 fdo
8 z- f& i8 K8 H: k        Lan := rootfolder.Internal.Tools.AOLlanguage;
0 Y+ y* _6 V* f9 l! p9 R+ e        if current = @.Destination -- else return  X4 O7 x0 ]% m0 K
        then# S8 L9 }/ i, h1 A0 q
                @.Destination := void;" Y2 ]/ D9 Z) k' s, b3 h3 |0 @4 N
                if @.occupied then1 [. {0 X7 @+ h% {2 P2 z2 a
                        part := @.cont;
# p/ T6 V( ^* g: q7 }' l6 v                        @.transpOrder := void;
9 M$ w$ ?! I! H. h% ?                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
$ q" d: p1 D5 G: c3 l# d                                @,root.eventcontroller.simTime);9 K, T# `2 k" n, F8 h( l3 m
                        @.HasOrder := false;
3 w" a. Q5 ~! M3 m% q* @' N                        @.DrivingHome := true;/ C- D' J. i+ n* a8 c
                        rgManager.tryToStartTransOrder;
; G2 v( Y/ b0 P# |$ B, ?                        if @.Destination = void
  U& k0 K  C) k3 t5 V                        then -- no transport order for vehicle @8 ^0 A4 }6 |$ f/ e9 E6 W
                                @.Destination :=
" O4 ^, g8 ~8 [; W& V                                rgManager.nearestFreeStation(@,track.~);& T8 U$ S' b1 u& L/ N
                                newDirection(@);   1 T5 a( o& S& Y& L4 d
                                if @.Destination /= void then# s4 @  W& a, @$ _- v
                                        @.Destination.NumReservation :=
' L4 F, Q! P- a# n  \                                        @.Destination.NumReservation + 1;1 r3 O- H4 I2 I1 a
                                end;
) Q8 c# J, h) X( X; |- |1 S                                @.CurrIcon := "drivingHome";7 b( w: c! C$ {
                                @.DrivingHome := true;: T0 e8 X: O6 |# V' d' J
                        end;  O& w. [/ |* T' j- X9 z! O, Y; g
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ l  M8 R3 Y/ E; |                        part := @.transpOrder;& ^. M- B4 k, H' b" T
                        part.move(@);-- load part
8 u3 l# Z- U& a' x                        @.CurrIcon := "load";
" }$ u* s- a6 h8 E                        GlobalDistObj := part.globDestination;
/ X* e" k( E5 k# t                        assignLObj := rgmanager.rgAssignL;
$ c0 K5 q' H1 `( i1 M                        row := assignLObj.getRowNo(GlobalDistObj);
. H8 C, e/ n' _' [5 ~" }* d                        if Row = -1 then -- since 70
0 \; \0 @' N, ?2 R& u- {                                if lan=1 then+ W, E2 v& Y# r7 U7 R5 K
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 D+ o0 R6 U# \& L
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
- i! E0 @7 `) G8 a, m6 k                                else( I0 T3 F; y" B2 a% {; T8 C+ G$ y
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
6 i) D! z- X2 G# s8 P! \8 L8 X/ n                                                to_str("in docking station: \"",?.~.name,"\""));                               
' z  z. B1 g/ z1 Q                                end;
) P( Z* r) N; L  m& E& u# D, |                        else
2 q7 T/ J& R5 y+ p                                @.Destination := assignLObj[1,row];
( V, \& O2 j7 `+ C+ d4 u" k' [                        end;                       
& u+ c; G+ `; Z8 C                        newDirection(@);( }! C4 ~' i! h
                        @.HasOrder := true;. Z2 t- `# O9 D" i6 J6 k
                end;* D1 |6 c8 x; x6 n1 y1 F
        end;
3 P: O+ s5 h+ S* v* z) a) }end;        -- of the method7 d$ X9 R/ W, Y3 b9 }4 A) `
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 3 O! D0 C8 c: \9 n! w$ X; Y# ~! J

' g( s2 H+ q4 C8 A4 R这是AGV_putin中arrive的method。
( _! K; E' U9 c7 j8 W; S5 G( B1 `8 n# p7 E) N
当到达物料速度越高时,这个报警更多,
1 |5 T! O) e3 g* E% f! S, ~. y" ^可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。6 s. |& r( n+ K9 Y: O7 U3 _" Q
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?' C- [2 u" X: Q

: i. C5 l* E4 g  M: U另外一个小建议,就是move,所有的move都可以这样" Q7 ~1 o# {3 Z9 f
if not move() then debug end1 r* y& l: T1 X& {/ `" a
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。$ S9 B% |7 R; ]0 L/ H( x$ V
plant simulation中的free libraries有AGV模板,0 n% h* N6 f, z. [9 `' h
里面也有案例。
2 n; F; X0 U) Q8 Z; `我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
% K' p: G- {# B
( \/ ]7 w/ Q0 N( I% z. B2 Y: I' T我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
3 y0 R: ^/ b" l4 Y6 ^) o5 ~4 f9 i4 m% i8 O( V+ i! t
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
$ ^, T: s# N3 S! m这是AGV_putin中arrive的method。
/ ?& R3 E$ p' [. y1 n4 Y: R( [  x
+ G8 e0 ?. ~3 X( N" K! g当到达物料速度越高时,这个报警更多,
7 y7 h+ w0 A. f- l
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-4 09:55 , Processed in 0.017787 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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