设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9003|回复: 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'% K9 c  @1 c9 S/ n+ e' T
*/. }2 v8 m! |. k5 o% _
is7 M7 G- ~, s  Z6 r
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( `5 V& M: {+ s" r6 y9 pdo
" a7 B! S% I3 b. i$ D7 V2 t        Lan := rootfolder.Internal.Tools.AOLlanguage;1 k8 O8 p( R* ^( v
        if current = @.Destination -- else return
8 {3 c) P6 J1 ~9 D        then: Y4 d! c3 O% _* V
                @.Destination := void;
. ~, M7 E( D+ ?& C/ A                if @.occupied then9 ?8 S: b4 `5 U7 o& r0 F
                        part := @.cont;
8 x" w* \! ^5 M# `' U                        @.transpOrder := void;4 \: ^7 E3 A" K
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,8 B1 S4 n, |! @4 H) }/ [
                                @,root.eventcontroller.simTime);
4 {+ L$ f0 {  H) f! l0 I                        @.HasOrder := false;3 y; P  S% v6 ~$ \7 I
                        @.DrivingHome := true;
' n3 P* @, k* q8 G1 r/ U/ g' |                        rgManager.tryToStartTransOrder;
0 g- }4 b7 `- i4 m                        if @.Destination = void
/ U0 Q! F4 t  |+ s! W                        then -- no transport order for vehicle @* ]% F0 j" P( n& M! d4 P
                                @.Destination :=
& W- O4 O( d0 t, s& g( ^6 N                                rgManager.nearestFreeStation(@,track.~);: L' ~) R4 k* U) }7 Q1 E, ~
                                newDirection(@);   # a9 K+ [7 e# ?* q, D
                                if @.Destination /= void then9 F1 n( R& [7 q+ |# H1 L) H5 a
                                        @.Destination.NumReservation :=# m7 e& T$ N  G* {! D5 N% D3 v1 D
                                        @.Destination.NumReservation + 1;! D' \' B9 Z9 C4 P. }0 ?
                                end;
- j$ Q# v" }7 e                                @.CurrIcon := "drivingHome";  d/ y8 c# K/ {7 h3 z6 ^4 ?
                                @.DrivingHome := true;
" O* B, t4 c$ E8 h, c( s. h# x7 I3 e                        end;
* t- z% n* B. n                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; ~& ]6 |* J. h/ b: M$ Y: U+ u4 f                        part := @.transpOrder;( w* [9 L/ `: M1 @, F9 z7 L" Y) a
                        part.move(@);-- load part
+ x7 w' N! H1 \) j3 F- t% V1 M                        @.CurrIcon := "load";
* T; ~) S  S# q' i; i! N# {                        GlobalDistObj := part.globDestination;
; _* ~# _/ {' e4 ^, T7 o. s9 s                        assignLObj := rgmanager.rgAssignL;
2 e7 o; v( d0 w9 p( Z, J, l3 p                        row := assignLObj.getRowNo(GlobalDistObj);% c* {2 C: s  y# A  d1 E6 e
                        if Row = -1 then -- since 70
, z* y! Z* t$ d( j                                if lan=1 then
# @/ C% j3 g  p  i$ W2 S6 W2 Z                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' D4 K6 p, I8 v
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
+ D$ d# s4 O. H' W7 ?                                else
8 T: U5 S3 m/ d                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) X: G) B/ W' G+ i! f
                                                to_str("in docking station: \"",?.~.name,"\""));                               
8 X. O! v1 x4 l. w) K3 |9 @                                end;4 m9 C: ^: T$ d, x+ i* u( O; w
                        else
  Q5 b, i7 P% k' s( X/ o" _  k3 N3 m! ?                                @.Destination := assignLObj[1,row];
0 c) r) g3 q" _                        end;                       
1 E" J! |  W: \) F3 V                        newDirection(@);
& a/ G- x4 N2 ^% _; p! m+ K                        @.HasOrder := true;) l( B2 t$ \- q# v  t
                end;. J8 ~& k7 I6 S& U  v
        end;% c; ?. \/ t' C6 c- w
end;        -- of the method
6 ^7 A2 c! ^, t* x
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ) B' T9 C7 |+ d8 x

# X0 ]% q1 P. C$ n% D这是AGV_putin中arrive的method。& \5 n2 Y/ h; {
$ y; V* }9 F/ z2 a9 W: D+ _* `
当到达物料速度越高时,这个报警更多,1 j  N9 E- _* e6 q4 ^6 J
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。5 i5 X; f$ C3 X  j% \. S/ Z
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?) d7 r  ?2 D4 X5 `# V

8 M; W4 ^) }- Z: I1 `另外一个小建议,就是move,所有的move都可以这样4 v/ X+ U# _" q
if not move() then debug end
4 U0 r/ f" N8 {" [# D这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。: b6 z' s6 H) E
plant simulation中的free libraries有AGV模板,) ~& Y2 n3 P( c9 N! G3 `5 h/ h
里面也有案例。
6 }8 G! @3 w/ w! n# }9 S我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。8 [7 r' m$ U* n( y! }. [
* u2 E" o& I. m- S
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
" i7 F' z3 l& h& S- C( U
7 l# n: z# `# T  K: B那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
) u. X2 V+ l7 m  C6 Q2 y这是AGV_putin中arrive的method。
7 R: d, ]% m+ c7 y) Z% ]& Y
1 j& j1 u, `) c* c/ Q6 {: x当到达物料速度越高时,这个报警更多,

  u7 l& o4 Z. N/ C8 K7 f另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-8 13:16 , Processed in 0.017208 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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