设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5983|回复: 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'
" O5 |/ F: ^; J& x9 o: U*/. g0 m" Y/ K) C
is
- W" w- B) V8 }; r2 X) R5 A) R7 R8 N        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 k" g$ w- j, udo
% q! Y3 o! V( B* Y8 {0 v5 O8 |* ~        Lan := rootfolder.Internal.Tools.AOLlanguage;
( {. _- T/ \8 {' g4 k3 M        if current = @.Destination -- else return% e' X* v! |( P: F. S" C9 w
        then
2 S" {  U4 z1 D# I                @.Destination := void;- `0 p; D) U7 P/ P
                if @.occupied then, Q* N# j- c4 R$ A  v& P6 c' u8 {
                        part := @.cont;. @% Y- n. d2 n0 {: W
                        @.transpOrder := void;# ^! O! P6 X: j, X9 k" q( k$ H
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# h+ S/ @5 f/ x2 g' O                                @,root.eventcontroller.simTime);4 u* r) d. `- n
                        @.HasOrder := false;0 U9 Q* N  C% z! i5 v+ e8 _
                        @.DrivingHome := true;- P$ w" r0 _1 W! B! H/ x
                        rgManager.tryToStartTransOrder;# M. X/ S0 c. c5 S( F* y& R
                        if @.Destination = void' i! z  @9 t% K. }
                        then -- no transport order for vehicle @
$ J, N+ d. t6 ~* o/ s/ ]                                @.Destination :=
7 u. ^% f% ?* H                                rgManager.nearestFreeStation(@,track.~);! K8 i+ e* r4 H; F3 X
                                newDirection(@);   8 [3 D$ N3 q6 n$ h5 ^; s
                                if @.Destination /= void then3 ~4 e7 B; w6 }5 L0 }3 q
                                        @.Destination.NumReservation :=6 |+ q* n  U9 s! a. D3 [  X$ y. V
                                        @.Destination.NumReservation + 1;
* ]3 i1 l$ |% v                                end;
, u! q: u# ^- ~6 Z+ `                                @.CurrIcon := "drivingHome";
' N3 ~' D  f' X                                @.DrivingHome := true;3 h4 T1 I5 H- z' N4 y# v+ {
                        end;
' K7 j# R& C9 @( O                else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 H7 ~- T' K" j6 E6 @/ |
                        part := @.transpOrder;
2 u9 X. C. b8 x$ ]7 Y, e" H                        part.move(@);-- load part
/ A" I7 X% V* O, {                        @.CurrIcon := "load";5 [/ U4 l; T1 ~* i. Y6 O) B8 i& [' d/ ]
                        GlobalDistObj := part.globDestination;
/ x! u. |* J+ d                        assignLObj := rgmanager.rgAssignL;
$ `: b4 m: W" |! W5 g) n                        row := assignLObj.getRowNo(GlobalDistObj);
7 m( V. t( U2 e: k1 |$ v                        if Row = -1 then -- since 70
$ B' d. }7 E- s" ]& I* w                                if lan=1 then
( n* Y, n, K  y  ~; X* ~3 i                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& A) y) U' r6 n: o                                                to_str("in der Andockstation: \"",?.~.name,"\""));
; v' N( G: ?. u% o: p                                else; r- q# q# s% ?2 J" P. x
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& E! O) Z2 A7 C                                                to_str("in docking station: \"",?.~.name,"\""));                               
9 D! u+ y" I$ K! h: E6 ~                                end;) N. X# T& R# [& W: p- B( \
                        else2 i  K* P- y7 F
                                @.Destination := assignLObj[1,row];4 Z& N2 x4 v( n0 V' o# x1 t( H1 q
                        end;                       
' S2 X' D( ]4 c4 R' {1 k. |                        newDirection(@);
& X) n. G1 R# \( M" `                        @.HasOrder := true;
7 b+ y8 L& f, D0 J                end;# q6 {3 C3 G! x& u: x
        end;+ Z" k) z' g* m; x6 ?; p# {
end;        -- of the method  L* @4 g8 _* C! F& I" ^( N
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
# _/ k* q+ P! `/ V( M5 g4 P
: P* z, r# k  ?0 B这是AGV_putin中arrive的method。. y9 ^# N7 C5 W2 M% C$ [7 R6 P
7 I* h7 o. s- x! P. H: }( X
当到达物料速度越高时,这个报警更多,; k2 I/ p4 m* D
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
+ ?) b' x5 }# G* V: c程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?  r" o8 @  O6 k, I0 n

3 B% P% k+ ?, v- v/ S. [另外一个小建议,就是move,所有的move都可以这样! o. N9 t2 V4 E' V
if not move() then debug end
' L; f: p* A. Q* H- b( [+ {5 B这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。2 X* q! p- f" ?/ k/ k
plant simulation中的free libraries有AGV模板,+ I' f  y2 D3 Y9 u( H
里面也有案例。$ d- A, [- s( I) a: C0 v  g
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。: b7 m- k) j" c% G0 f8 v

: o" {; C1 G+ f$ m8 l6 S5 J4 d5 c我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
4 [& L0 j/ F; x- O* e8 O7 {3 y; f3 b1 T* `4 Y
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 $ t$ i' ?  \1 ]& Z/ m) z
这是AGV_putin中arrive的method。
- ~; ^$ K6 z) }! C5 f% R" v1 }9 c; `2 O1 }4 @9 y
当到达物料速度越高时,这个报警更多,
. u! F4 C% A' }- H4 ~& y
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-1-11 04:13 , Processed in 0.021130 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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