设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6346|回复: 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'
; S% W1 Y& d/ D3 j0 [*/2 t: \. n( [) w5 f+ P
is
2 j$ r9 I( a- e        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 M9 R! Z* b: rdo2 u5 w  u& l% c3 S3 j
        Lan := rootfolder.Internal.Tools.AOLlanguage;
; \* K7 {9 D1 i+ M        if current = @.Destination -- else return4 C1 x" Z$ Z4 c" c
        then
1 W1 V3 o) ~; U, E5 y4 |) C5 J: s5 o8 _                @.Destination := void;& R2 n. ~$ ?, j! @( C1 q
                if @.occupied then
' I0 f& A- `3 A$ c/ g& _                        part := @.cont;
. U, a) O( g# J  m) F' _8 n( v. {                        @.transpOrder := void;5 i$ m! i* M  W# w0 ~
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- D) Z, N! j( g/ M* p
                                @,root.eventcontroller.simTime);
2 L* d! {. ?4 x, |8 T- C$ x                        @.HasOrder := false;
% S' [0 a8 E) b) T; f- U! F4 D                        @.DrivingHome := true;# v! _3 W7 J3 B
                        rgManager.tryToStartTransOrder;
$ p$ C9 L" v: j# S+ \# o                        if @.Destination = void
/ u/ x* g5 n5 J, N9 ~( o                        then -- no transport order for vehicle @
+ @$ U/ r' [+ Z' b7 Y4 H( k7 y                                @.Destination :=- e; }) A' C8 f' L
                                rgManager.nearestFreeStation(@,track.~);5 O7 T8 Z' X- [, x. N
                                newDirection(@);   
4 J5 s; p2 S/ [0 y8 G' ?                                if @.Destination /= void then7 e* k0 m$ h& c! `7 r" e1 c
                                        @.Destination.NumReservation :=: N9 {- G' p, S& @& o- |, |8 E- |
                                        @.Destination.NumReservation + 1;
" X3 e  L+ S1 k' ~$ O                                end;8 U" P1 A5 ~; W/ r& l, W, y
                                @.CurrIcon := "drivingHome";
- V0 y9 W: D$ }* b, m+ ]( J                                @.DrivingHome := true;' O  w) T" d" f- e
                        end;
' G) R1 K$ \, b( k# g2 U+ X( [' u                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 E6 `, k/ b4 `5 e" t! k                        part := @.transpOrder;
% B4 ?  H. K8 k; M                        part.move(@);-- load part
0 {; l7 G9 ~. l; ]  i                        @.CurrIcon := "load";
) e( c+ c) z0 W( h                        GlobalDistObj := part.globDestination;( g3 R0 q, \) y& T/ u* {
                        assignLObj := rgmanager.rgAssignL;: N+ D  b# ~5 f* v( D( j* Q
                        row := assignLObj.getRowNo(GlobalDistObj);
2 l, D7 y9 F/ G' q                        if Row = -1 then -- since 70- _2 V6 G% y8 h" B; a9 H  p
                                if lan=1 then
. `9 b) m/ a; e( b. Y0 V                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& U" A3 T& c5 c6 [" e& n
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
" y- d7 z& j0 b& J. C0 n                                else
7 _3 O- e% S) ]% m+ }, J1 w                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: x! b8 L! E* B6 [6 K
                                                to_str("in docking station: \"",?.~.name,"\""));                                + x+ \% @* q# X' l- T  q, H. ~7 f
                                end;. G4 o" X3 ~) }6 [
                        else% s  \4 J! n! V* Y
                                @.Destination := assignLObj[1,row];# T! o) W) h' j
                        end;                       
$ J3 V1 l$ n+ `                        newDirection(@);, p# H/ \/ m" _& c
                        @.HasOrder := true;
+ U, |) t+ `' \9 _5 o* P                end;# ~1 E! L! ~; l. O
        end;/ k# x1 B- ~+ G
end;        -- of the method
8 o% ~5 c$ x7 b% _% }
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 8 u. T: N7 Z6 a3 v/ B: X

' P& \# D5 N1 G( t: B2 p' ~这是AGV_putin中arrive的method。
" q' \8 Y8 e* }) t
) R% N! G- _! ^# g当到达物料速度越高时,这个报警更多,
! d$ r/ y8 X( W% M' s可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
2 r% Y! j0 ~; `5 @' m程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?% H! B% w) q' V$ E7 ?
" ?  y4 D+ u  N( F+ i/ b& c
另外一个小建议,就是move,所有的move都可以这样
9 A' s7 D  V  W# y  u. }" N4 Q. Rif not move() then debug end( w7 l  w- D$ Z, ]& |! C
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。- B1 a8 Z0 F' u, j9 K
plant simulation中的free libraries有AGV模板,
& F: i+ n* e8 ?4 ]! ~* L! m% }  S里面也有案例。$ ~3 l" s5 L$ ?* J* ^
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
! L7 @. R1 r' x% n6 I' X7 D) n- n! a: x2 e' E$ H
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
9 ?0 F* c( `; {& F" q2 L) K2 |" ?% A1 F/ L" [
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
7 _" m. v1 o4 K/ [这是AGV_putin中arrive的method。
8 P- p5 u, I/ v0 e3 h  Y/ g2 I; o" y$ Z7 R, M0 @8 t( m
当到达物料速度越高时,这个报警更多,
4 k- H7 h5 V4 D2 s3 c
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-1 00:50 , Processed in 0.018715 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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