设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8959|回复: 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'
! Y0 S3 Y" l( R' @( w! \5 E3 }2 u*/
, z: R! Q  K+ Kis
+ f" ?( P$ O+ t' [8 O        part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 c0 v: m. K2 f4 V
do' g& q' K# t$ c2 \* {
        Lan := rootfolder.Internal.Tools.AOLlanguage;, `% e3 v# J, g# O4 }
        if current = @.Destination -- else return; n5 ?' ?/ A) W
        then
2 N* O8 L6 X3 R                @.Destination := void;, g8 Y, E1 w" \8 [% A+ h) A) _) g" z
                if @.occupied then
+ X$ D; A# w* U$ Q4 w( ^                        part := @.cont;. `1 A) e% ]  a7 ~8 o
                        @.transpOrder := void;
9 b9 P. E$ x. V1 S                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* D/ ]: O) c, S; b  O: t8 P: O7 T* _% t
                                @,root.eventcontroller.simTime);2 E, J6 }( ?; e( I$ Q5 {
                        @.HasOrder := false;/ X2 w" v% e; a! E; Q! c# T  w( a% O
                        @.DrivingHome := true;0 u* E0 G' F4 x- W
                        rgManager.tryToStartTransOrder;; }  m% @# c, d4 h+ a5 K9 ]" \
                        if @.Destination = void# E: g# @2 r) ^! u5 @  ]
                        then -- no transport order for vehicle @
: e5 E( h0 Q0 h4 f/ G- a# c                                @.Destination :=! p& p* R+ ~0 [+ }$ p  w
                                rgManager.nearestFreeStation(@,track.~);  R# C9 |/ g5 K1 N1 X
                                newDirection(@);   
5 `3 Z8 j8 I: J; D' t: o                                if @.Destination /= void then
4 G4 ?) r- m' b/ t                                        @.Destination.NumReservation :=
3 L5 ]' i- L2 y2 |& x3 o3 Y                                        @.Destination.NumReservation + 1;
1 [; s# S) u: A7 n                                end;1 ^6 ?. a" G5 W1 T; u
                                @.CurrIcon := "drivingHome";
6 _* ?' b  s: ?' M1 v% y+ i* k& t                                @.DrivingHome := true;* b) o, I; v8 O: s+ ^
                        end;& j8 @9 ]' |$ t
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" |# D, X/ @8 ^+ S                        part := @.transpOrder;8 ~! E* v# D' O$ o' O" y
                        part.move(@);-- load part2 G* Z0 A6 }# q) _5 _' A
                        @.CurrIcon := "load";" h, C3 C5 d0 ^9 T5 F+ m
                        GlobalDistObj := part.globDestination;+ L6 ^2 X8 o7 v# Y( I
                        assignLObj := rgmanager.rgAssignL;# Y4 T8 T. ~* Y. g  S  r- i% J
                        row := assignLObj.getRowNo(GlobalDistObj);
# A, h4 \' o0 t6 C                        if Row = -1 then -- since 70+ m+ J; [3 m1 {; q
                                if lan=1 then9 w2 b( D" n1 n* j- G7 N6 t2 F
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- d8 ?1 a/ i2 ]1 }. B, ^                                                to_str("in der Andockstation: \"",?.~.name,"\""));! a* R+ X( i6 H* J5 p8 \2 m+ I
                                else4 P2 W% s; y$ ^
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 |6 ~! j( p5 ^4 R3 A1 e# A% ~8 @1 Y                                                to_str("in docking station: \"",?.~.name,"\""));                               
8 g/ r# j7 s1 s! f( a7 g9 {                                end;6 w# A* S4 |8 Z% ~
                        else
' j9 D: F& G  O, V! O8 H                                @.Destination := assignLObj[1,row];( E' v+ a3 |4 [. u+ i( w
                        end;                       
; [" x" d/ M5 r                        newDirection(@);, P6 G+ `$ |# c: w8 A# Z# g' G
                        @.HasOrder := true;% O- J& {* D& o" I7 B* ]
                end;
9 ?7 ?0 n8 Q" Z/ |: ]* @) }        end;
# Y7 M' {7 f- w& y3 eend;        -- of the method% w: y( r& b* g9 \1 _5 K
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 # ~, P1 Z' w7 v3 s6 f
5 w9 k! {% e1 z- A
这是AGV_putin中arrive的method。
) _1 S5 i/ B' `2 r, f: h8 Q4 l! a3 A! v
, \* f2 J; S2 g* |& f2 ^3 c当到达物料速度越高时,这个报警更多,
; G/ [0 J. d: }- F可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。, ^) k/ O; u: z& v9 S8 c* K: I+ X
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
% `( G4 P; h; ], z. i+ l& \6 Y
( C* a  [0 B- g. [$ U另外一个小建议,就是move,所有的move都可以这样
9 F$ O$ R( R9 b' jif not move() then debug end; P4 c: y1 V5 ?
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。, s& G) R# b( e$ T
plant simulation中的free libraries有AGV模板,, Y3 l) p' {+ R3 [* o# F' r
里面也有案例。
" g; V& }) b2 @" ?我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
+ h% k9 x" G2 }/ u6 Q8 y+ _
& C+ m# a) O: d* N; }我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
5 i2 Z, U9 F0 E3 I5 a4 `0 H( T/ g
9 N8 y& Z( Q: N1 z那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
# C. J6 |$ {& a这是AGV_putin中arrive的method。
( L5 Q/ F) u+ Q( n0 e
8 N3 p7 u# E& R7 q0 ~' i# e当到达物料速度越高时,这个报警更多,
- C; O! A; p8 |" i/ C
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-6 11:47 , Processed in 0.018651 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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