设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9254|回复: 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'
& ]$ Y! ^* ~+ o& e2 \*/
2 A+ J9 S$ |: D! u) nis
- Z3 j3 i; I& h7 T: @5 {4 E8 w        part, GlobalDistObj, assignLObj:object;row,Lan:integer;) @  o  V3 R9 Q: a2 X3 p* Q( h: q
do( v. g. C4 I( g9 d
        Lan := rootfolder.Internal.Tools.AOLlanguage;" F3 h2 e4 q" f# ~8 ]
        if current = @.Destination -- else return
$ S7 A& K  B  N$ M! ^        then
3 W3 D" M) H$ t$ r" g1 m6 S( i                @.Destination := void;
, I3 `1 C% T: e! p                if @.occupied then
& D, Z! M* b3 I3 P% G. @                        part := @.cont;
7 n2 i4 C0 U9 n; s! T# f                        @.transpOrder := void;
7 {. h. C) m7 @7 {+ j, ~0 }2 M+ h                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 f1 B  F# r+ a# U- H3 P0 |$ Z3 \
                                @,root.eventcontroller.simTime);
8 X1 f# b& y, I                        @.HasOrder := false;
0 r8 K9 r. Z9 r" I) G8 Y/ a5 W                        @.DrivingHome := true;1 e, \4 x; d! D9 I2 V
                        rgManager.tryToStartTransOrder;
3 D9 [! U* j* `5 }, z                        if @.Destination = void7 x  Z6 Y# A" p' f0 i
                        then -- no transport order for vehicle @
  X1 y( D0 Y. G7 C                                @.Destination :=& i9 c4 u0 ?0 p7 C3 R( \) z
                                rgManager.nearestFreeStation(@,track.~);% J1 r$ f0 z$ E
                                newDirection(@);   ( J9 J# d5 }& ~, h3 U
                                if @.Destination /= void then$ a, w- P( k  Z% a' e3 s
                                        @.Destination.NumReservation :=
1 n6 E* B9 Y8 u) o) b                                        @.Destination.NumReservation + 1;
- C* K/ v2 t+ P8 b                                end;6 l# e9 g, J' E; Y% H2 t
                                @.CurrIcon := "drivingHome";0 S5 H0 Q; A6 ]9 f$ W7 Y
                                @.DrivingHome := true;2 a+ G# t! M/ u5 [/ Q' H2 X* D0 M
                        end;
5 T4 |8 [$ ]+ @) [3 h, k; V3 s                else -- the vehicle @ is empty, both vehicle and part are in the same dock station% q' S4 e: }+ W  q+ K6 H
                        part := @.transpOrder;
. p. ]3 w0 M# N: o1 J9 z                        part.move(@);-- load part4 v2 w9 d1 z& f' N1 e7 o) Y  d
                        @.CurrIcon := "load";/ G# Q8 f! V: E
                        GlobalDistObj := part.globDestination;
) ^3 [2 P# a* ^+ C                        assignLObj := rgmanager.rgAssignL;
' V( `* w  R4 O, }% f2 P. h  ^                        row := assignLObj.getRowNo(GlobalDistObj);! R: d7 V3 m" C3 u! _5 a
                        if Row = -1 then -- since 70
( Z- n: N3 Z6 q' m+ W; G1 o- ?                                if lan=1 then
# S9 U( f2 ^  P# u; X+ b                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; x5 O6 K/ _7 r  ]' m1 M# X# s& j                                                to_str("in der Andockstation: \"",?.~.name,"\""));
7 `) n! R. t; e- c/ B2 x                                else; e4 c6 ]! V. G7 X7 h6 G
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),9 O/ A4 ~& Y, p, P; _" v
                                                to_str("in docking station: \"",?.~.name,"\""));                               
& ^- E# l$ j! A' b. k4 f                                end;" [4 d$ k) s" `1 q8 u2 s9 p/ s
                        else! F3 C' X1 k' t' {$ j& G- t! Y
                                @.Destination := assignLObj[1,row];3 X, x4 W# D# T: H% C& ^
                        end;                        ( I% S! t8 P$ s4 H, N& u7 J) ^
                        newDirection(@);- B* N( d+ g* L9 e, x( q7 V* i
                        @.HasOrder := true;7 B8 t/ K) c0 X2 r4 M
                end;) G2 \# Y. F$ ]; S
        end;
# f; P7 y( m2 Q5 j' X; nend;        -- of the method
" `( l( ]9 h; X+ z: A) ^/ J  h" F
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑   M( G9 j2 X1 V0 n$ O# r2 O- g

9 ?1 g, b' U, z1 c! E+ b这是AGV_putin中arrive的method。1 L& f2 N, A5 Z9 T
/ ~3 Z0 p  b! K& z# u4 P
当到达物料速度越高时,这个报警更多,. r! W! _8 s* Q
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
) q4 O0 F5 B+ p# F程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
" C8 O; h  I( R# c
% c1 m) w! j9 \6 u6 N" x另外一个小建议,就是move,所有的move都可以这样
/ x& @6 P+ W  K4 Xif not move() then debug end. l, q# x( b2 C. b* H; |
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
& ^- ?( o' ^* v" K, Hplant simulation中的free libraries有AGV模板,$ K$ t+ t# P( |5 L7 r% @" [6 u
里面也有案例。0 p$ P# k4 t; ]( w8 Z1 {
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
8 M' g. n3 E$ f3 y, d. }- I7 a' H3 C
9 z* d3 q! w" D2 ?3 s- @) R我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 % S. F, g/ q- Q" S3 m+ P9 A- b

# q$ o% n7 R6 K# U那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
8 K! ^6 M! C: N! y8 @- i5 b这是AGV_putin中arrive的method。" H  \: P5 Y2 q' a' y- L/ X) C3 k" J

) |9 g( [' X: Q5 x0 L: V当到达物料速度越高时,这个报警更多,
5 u, }2 U5 V- n: ?- K, R
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-21 08:42 , Processed in 0.020590 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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