设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5482|回复: 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'
- _7 R, I- T% P( {) p( c*/
+ U/ H0 G3 n2 X' `: T  ?is
( v* n$ V6 h/ G4 ^) L( \5 m6 l, K        part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 @$ g! Q& `  {: P8 r1 O
do# V9 o4 f7 t+ t- \0 G) }. d
        Lan := rootfolder.Internal.Tools.AOLlanguage;
) J1 \) S9 Q  D        if current = @.Destination -- else return
/ U7 j0 U/ u9 E        then' N0 v7 a  M% s% O4 T
                @.Destination := void;+ E* j+ J. q4 ?: c4 ]
                if @.occupied then5 Q+ h% }+ w) T6 V5 k: ~
                        part := @.cont;
% y4 k( m) Q) U% z% E, H6 J6 q                        @.transpOrder := void;
4 F8 g4 K$ S1 h, R$ X                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& m/ t6 ~$ n% L$ I+ D2 f0 _
                                @,root.eventcontroller.simTime);
. o* I; M( m7 E. F6 X" _1 u) N                        @.HasOrder := false;# ~! d: X, @  V" {& ~; I0 F
                        @.DrivingHome := true;
+ k! X9 z1 \& M, }; q. R3 ^( h                        rgManager.tryToStartTransOrder;
, A1 G" E1 W; x) c5 Y( W                        if @.Destination = void
( v( m+ E$ }" o  _# T                        then -- no transport order for vehicle @; M1 }4 g6 Z" P) @; ?2 K6 x- I# G
                                @.Destination :=
* Q5 B3 _+ Y- j  i                                rgManager.nearestFreeStation(@,track.~);
* w$ I' z8 ~$ I* Q; H                                newDirection(@);   
8 Y# E4 x. U: u2 d, b                                if @.Destination /= void then  z+ x: F* `8 J( F, T) I
                                        @.Destination.NumReservation :=
3 \8 w2 _  [, `! ]                                        @.Destination.NumReservation + 1;
4 W& a3 P1 o5 f                                end;" _6 E" ?% R! o' {
                                @.CurrIcon := "drivingHome";7 Q3 `& a6 ?5 @: y$ @" }9 E4 U7 Q
                                @.DrivingHome := true;( f$ A9 k0 n" t$ Z. Z
                        end;2 h0 A* m* {# |5 Y" N! K3 N
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station- q/ J& |; L# y& n& m0 G
                        part := @.transpOrder;
1 j' Q' J$ z; t4 O- q2 x+ n' r                        part.move(@);-- load part3 b% s0 i+ V9 ?( R5 ~
                        @.CurrIcon := "load";9 P4 D& v7 d- ~0 D% {
                        GlobalDistObj := part.globDestination;
* @* i# m, d/ n, L: Q; s5 \                        assignLObj := rgmanager.rgAssignL;. H! [+ P: k' ], C/ J1 f
                        row := assignLObj.getRowNo(GlobalDistObj);$ T6 d/ l% b2 ~; z- K
                        if Row = -1 then -- since 70
0 E- s& c4 ?. A  [                                if lan=1 then
( L& M; _, j- ?                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* ]7 X4 h/ W3 q/ d0 D: U2 |  K, s                                                to_str("in der Andockstation: \"",?.~.name,"\""));7 h5 P% c; d8 Y
                                else
3 i5 B. S( k9 f                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 R1 m4 Y2 z# }0 E( U
                                                to_str("in docking station: \"",?.~.name,"\""));                               
) O$ }% R; L( P& a+ Z                                end;
5 D( O; e/ y- j                        else% W3 q, c) H; p) ~
                                @.Destination := assignLObj[1,row];- U# q% `- R% l+ D8 f
                        end;                       
- a; _7 \7 @% |( J$ g7 x* c/ c                        newDirection(@);
- K3 C9 c! o( }+ K2 T. `# g2 K% w                        @.HasOrder := true;; m3 ^, x; ?, u- |
                end;
* e% Y4 v3 ~) \1 x" b. `6 A        end;$ |1 \7 b/ s7 j: `  K
end;        -- of the method- B: B1 J- ~, A  ~0 `
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 " l) I+ F- b, ]0 J" i  F
! N" j% H* t- k9 ?! Y4 \
这是AGV_putin中arrive的method。
( R8 f  t/ P) G# s$ T, j" [/ D$ x
当到达物料速度越高时,这个报警更多,, U8 @7 M4 o+ Q/ K! C" n
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
  t% E1 O/ x; I3 U  `程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
2 \$ a# |. i3 v& N! N' O2 e6 n! j6 E. s, n
另外一个小建议,就是move,所有的move都可以这样6 @) a  s0 D7 r  O9 O1 r& f
if not move() then debug end
- G0 \# ]5 V3 t/ L这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。/ w6 x, m, X% L, N5 M
plant simulation中的free libraries有AGV模板," k7 f! V9 P1 r) W6 O0 Z0 \
里面也有案例。$ A0 I/ x/ T# {/ |3 J% j
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
  W% Y- r  e, n5 H4 Y9 h. K7 n* m; a0 }: D
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 - H5 ]7 m" v) L1 w+ p7 D

! T, `* V. y+ D5 z& z. Z那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 + p7 p0 s6 j0 j" {
这是AGV_putin中arrive的method。' k8 r0 \7 P& x$ B" y8 z0 f- j

7 X0 \" X& Z9 o当到达物料速度越高时,这个报警更多,
3 m4 A0 {5 i1 O- g- P+ g* ?+ m5 \
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-11-26 17:38 , Processed in 0.025545 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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